-
Notifications
You must be signed in to change notification settings - Fork 107
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
Fix mmr generation #1307
Fix mmr generation #1307
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.
Having some tests for this with mocked data would be great. Doesn't have to be in this PR but something that would be nice in the future.
@@ -72,7 +66,8 @@ func ParachainHeadProofFn(cmd *cobra.Command, _ []string) error { | |||
copy(beefyBlockHash[:], beefyBlockHashHex[0:32]) | |||
|
|||
relayChainBlock, _ := cmd.Flags().GetUint64("relaychain-block") | |||
mmrProof, err := conn.GenerateProofForBlock(relayChainBlock, beefyBlockHash) | |||
// magic plus 1 to make the block a leaf index |
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.
Is this command used in prod or is it a convenience method for testing?
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.
Convenience for testing. If you are concerned about the magic +1 we also do that in the code that runs in prod.
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.
Tested this branch on Westend and transfer for both direction work as expected.
Waiting on paseo confirmation to merge. @claravanstaden I can also pick up testing if you have not managed to get this far. |
@alistair-singh testing now... |
@alistair-singh Paseo works:
|
The slice length changes after filtering parathreads.
Test old mmr format without parathreads included:
Test new mmr format with parathreads included:
Commands will exit with 0 exit code if successful.