Skip to content
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

[5.0.x] Fix PIBD segments #3532

Merged
merged 1 commit into from
Dec 23, 2020
Merged

Conversation

jaspervdm
Copy link
Contributor

I performed a bunch of tests on testnet using other 5.0.x nodes and found a couple of bugs in the code that generates/validates PIBD segments

  • When generating the bitmap segments, we incorrectly assumed that the segments were always full, resulting in a panic
  • We forgot a negation in the range proof segment height check
  • During validation of bitmap segments, we need to hash the output|bitmap root with the output MMR size, not the bitmap MMR size, so we need to add an argument to the validate_with functions. This does not affect current nodes since they don't do any validation but we might as well fix it now.

@jaspervdm jaspervdm added this to the 5.0.0 milestone Dec 23, 2020
Copy link
Member

@antiochp antiochp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks good. Thanks for catching these!

@jaspervdm jaspervdm merged commit 49f0f3b into mimblewimble:current/5.0.x Dec 23, 2020
quentinlesceller pushed a commit to quentinlesceller/grin that referenced this pull request Mar 3, 2021
quentinlesceller added a commit that referenced this pull request Mar 3, 2021
Co-authored-by: jaspervdm <j@sper.dev>
@antiochp antiochp mentioned this pull request May 6, 2021
bayk added a commit to mwcproject/mwc-node that referenced this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants