-
Notifications
You must be signed in to change notification settings - Fork 111
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
Validate nConsensusBranchId #2100
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.
Looks good, just needs some doc and spec updates.
I also suggested a rename for the new 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.
Thanks, that all looks good.
I also just realised that we need some tests.
Here is my suggestion:
- run
merkle_root_validity
on all the blocks inMAINNET_BLOCKS
andTESTNET_BLOCKS
- run
merkle_root_validity
on all the blocks inMAINNET_BLOCKS
andTESTNET_BLOCKS
, after converting them using thefake_nu5
function
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.
Looks like we need to fix a bug in transaction_to_fake_v5
- I don't think either of us thought about upgrades after NU5.
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.
Thanks for these fixes, looks good to me!
I just added a comment explaining what the fake v5 test doesn't cover.
Motivation
In #2075 we added the
nConsensusBranchId
toV5
transactions however we are not validating it yet.Solution
Validate the field as described in the second action item of #2066
The code in this pull request has:
Review
Related Issues
Close #2066 when merged.
Follow Up Work
We could add a test case to test the error.