-
Notifications
You must be signed in to change notification settings - Fork 5
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
Verify block id as part of block header validation for savanna blocks #730
Comments
What about |
It is known before they are applied, see: https://github.com/AntelopeIO/spring/blob/main/libraries/chain/controller.cpp#L4127 |
Thanks. I was looking at the transaction_mroot for producing. |
spring/libraries/chain/block_state.cpp Line 286 in af51472
It is only available after transactions are applied. That's why 2 stages are currently used (step 7 in the Changes Required section): AntelopeIO/leap#2080. Currently finality_tree root is checked by spring/libraries/chain/controller.cpp Line 3791 in af51472
block id is checked by spring/libraries/chain/controller.cpp Line 3812 in af51472
Not sure if we can move the checks any earlier. I also think the following check is unnecessary as it uses the same value to check itself spring/libraries/chain/controller.cpp Line 4152 in af51472
|
But we can verify |
For legacy blocks, the block id can't be verified until the
action_mroot
(merkle root of action receipts) is calculated which requires applying the transactions. For Savanna blocks theaction_mroot
is thefinality_mroot
(merkle root of the finality tree) which is known before applying the transactions.For savanna blocks, verify the block id as part of block header validation.
The text was updated successfully, but these errors were encountered: