-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: Add method to verify the prestate in the execution witness #44
Conversation
@@ -26,13 +27,17 @@ export const loadVerkleCrypto = async (): Promise<VerkleCrypto> => { | |||
): Commitment => | |||
updateCommitmentBase(verkleFFI, commitment, commitmentIndex, oldScalarValue, newScalarValue) | |||
|
|||
const verifyExecutionWitnessPreState = (prestateRoot: string, execution_witness_json: string): boolean => |
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.
This is essentially doing nothing, wasn't sure if you wanted to keep this so it follows the same pattern as everything else. Will remove if so
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.
What's the difference between this function and what is being done in this PR?
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.
The difference is that my ethereumjs PR is verifying that the prestate is minimal (i.e. it contains no extra data in the witness), whereas this verifies and proves that the prestate belongs the the parent state root.
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.
Thank you very much for this @kevaundray !
I've modified the test data so that it taps into existing kaustinen6 blocks. The proof verification works with one of the test blocks, but not with one of the larger ones (~100 txs and a massive witness). I've commented out that second one for now.
@gabrocheleau what happens on the larger ones? Timing out, or a concrete error message (in that case, can you post)? |
here is the log:
From Kev: it is failing due to an invariant failing We can still make progress on the stateless client front with what we have here, but this will need fine-tuning in order to properly verify all blocks. (I believe Kev is looking into this). The current version will at least give us some API to interact with and test. |
This adds a method that verifies the proof in the execution witness.
It takes in: