-
Notifications
You must be signed in to change notification settings - Fork 17
[BUG] eth_getBlockByHash returns some fields equal to zero #564
Comments
Why you need to perform hardhat fork on godwoken ? |
Hardhat fork would be great debugging tool that could speed up our development and made it easier to detect potential bugs on chain. It should be working on every EVM compatible chain, but right now I am having issues with |
I have tried |
We should be able to send various eth methods {
"method": "eth_getBlockByHash",
"jsonrpc": "2.0",
"id": 1,
"params": [
"0xf54a7d4c97ebdf4cb4409e962e0d9e8deeb625beb4ae5041ff10f46f0bc5accc",
false
]
} returns null which is incorrect and we can see this block and gw scan This is happening because local fork doesn't have this block and and needs this make rpc call to |
The block hash is calculated from We can re-index l2 blocks with the ethereum compatible block hash and provide a new endpoint: Developers can use the new RPC to execute the fork command. But we still had a little issue, the |
I like the idea of another endpoint with |
Unfortunately, Godwoken uses a sparse-merkle-tree to replace the MPT, which uses a different algorithm to calculate the state root, so Which feature do you expect from the |
We still need I am using |
Hi, a new debugging API has been implemented in Godwoken. It is like the Don't worry about the output, the logs will be adjusted before release.
|
Performing RPC call
eth_getBlockByHash
tohttps://v1.mainnet.godwoken.io/rpc
return some values equal to zero. For example Rpc call with body:returns
Also visible on gwscan
mixHash, stateRoot, sha3Uncles, receiptsRoot and transactionsRoot are all equal to zero. Doing same call to ethereum mainnet for block
0xa9f6827e3a12cd76be9d2327c6545b57f947ba748ab5506a49b92728c71b16f7
we get response like this:Lack of those fields makes calculating block hash impossible for
hardhat fork
feature which make whole fork blockchain invalid. I have setup test with simple test that performseth_getBlockByHash
parse rpc call result with hardhat block object and calculates hash from call data.The text was updated successfully, but these errors were encountered: