-
Notifications
You must be signed in to change notification settings - Fork 38
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
Process state trie at the end #476
Conversation
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!
@@ -139,7 +139,7 @@ pub(crate) fn prepare_interpreter<F: Field>( | |||
account: &AccountRlp, | |||
) -> Result<()> { | |||
let mpt_insert_state_trie = KERNEL.global_labels["mpt_insert_state_trie"]; | |||
let check_state_trie = KERNEL.global_labels["check_state_trie"]; | |||
let check_state_trie = KERNEL.global_labels["check_final_state_trie"]; |
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.
I don't think this is even being used? It was probably aimed at being the halt offset but is being overwritten in tests
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.
It is used as the initial offset for hashing, is it not? check_txn_trie was used as a halt offset, and I should indeed remove it now, though
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! But the name of the PR should be " Process txns and receipts trie at the end".
What do you mean? We hash the state trie after the txn and receipt tries, now, don't we? |
I thought this PR was moving the hash of the initial txns and receipts tries to the end instead. I was misunderstanding #406 |
This PR closes #406 .
This PR changes the order at which the tries are processed: the initial and final state tries are processed and hashed after the transaction and receipt tries.