-
Notifications
You must be signed in to change notification settings - Fork 21.2k
core/stateless, eth: add debug_executionWitnessByHash + debug_executionWitness #32216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
I checked the difference in witness between geth and reth for block https://etherscan.io/block/23174550. Apart from the differences noted above:
In addition, good to clarify these in the spec:
|
Does anyone know what Keys refers to? |
|
For the same block I realized that the are differences also in the trie nodes. Namely reth and geth share 8536 nodes in common, but reth has an extra 52 not present in geth response, and geth has 4 nodes not present in reth response. The list of these nodes is available on request. One of those nodes that reth includes extra is |
yeah could you please share them? |
Here you go: |
eth/api_debug.go
Outdated
@@ -443,3 +444,18 @@ func (api *DebugAPI) GetTrieFlushInterval() (string, error) { | |||
} | |||
return api.eth.blockchain.GetTrieFlushInterval().String(), nil | |||
} | |||
|
|||
func (api *DebugAPI) ExecuteWitnessByHash(hash common.Hash) (*stateless.ExtWitness, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename to ExecutionWitnessByBlockHash
and add in ExecutionWitness
(takes number) for consistency with reth.
Signed-off-by: Guillaume Ballet <[email protected]> fix some issues Signed-off-by: Guillaume Ballet <[email protected]> fix some encoding issues Signed-off-by: Guillaume Ballet <[email protected]> fix linter issue Signed-off-by: Guillaume Ballet <[email protected]>
59b8f78
to
ad17d3e
Compare
213e1d4
to
8f7cb13
Compare
This is a request by @kevaundray.
This PR adds a new system call, which re-executes a block with stateless mode activated, so that the witness data are collected and returned.
This has some differences with the reth equivalent (list will likely :
nil
codes aren't addedkeys
field is present but is always empty - this is an agreement with Kev, that will be done in a later PR. The role of this PR is to find the disagreements with reth.Note that, besides these issues, I still do find some differences with what reth returns, which is why this PR is in Draft mode.