-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(engine, tree): witness invalid block hook #10685
Conversation
fdb47fb
to
8a557f4
Compare
8dc3efc
to
f5bcce1
Compare
f5bcce1
to
fc92bb6
Compare
…id-block-hook-witness
96e6827
to
c0295d2
Compare
c0295d2
to
6f32102
Compare
4573c80
to
1b91e73
Compare
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.
lgtm, have one nit about field docs
a6f5e3b
to
e1981d8
Compare
_output: &BlockExecutionOutput<Receipt>, | ||
_trie_updates: Option<(&TrieUpdates, B256)>, | ||
) { | ||
) -> eyre::Result<()> { |
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.
hmm, not a fan of returning a result here because this is a bit meaningless and results in more code in engine which just logs the error, but is fine
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.
agreed, also by handling errors inside the hook, we will have better logging with the origin of error
Closes #10547
Implements the Witness invalid block hook that saves the witness and preimages to
<DIR>/<CHAIN_ID>/invalid_block_hooks/witness/<BLOCK_NUMBER>_<BLOCK_HASH>.json
.Tested by running with a following diff
and comparing the hook output against a remotely running healthy node using
cast rpc localhost:8543 debug_executionWitness $(cast to-hex BLOCK_NUMBER) true
. Output JSONs were exactly matching when keys are sorted usingjq -S
.