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

verify the ignored fee is still 0 #3007

Merged
merged 2 commits into from
Aug 29, 2019

Conversation

antiochp
Copy link
Member

Resolves #2859.

While we continue to support kernel features using protocol version 1 -

  • read but ignore fee on coinbase kernels
  • but verify these ignored bytes are indeed 0

@antiochp antiochp requested review from garyyu and tromp August 29, 2019 09:36
@antiochp antiochp self-assigned this Aug 29, 2019
@antiochp
Copy link
Member Author

@garyyu @tromp This is all that should be required here right?
When we read the bytes we still discard the fee and lock_height if not applicable, but we need to verify the bytes are all 0 before we discard them.

Copy link
Contributor

@tromp tromp left a comment

Choose a reason for hiding this comment

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

I prefer a test

if lock_height/fee != 0

instead of > 0, because the latter has me wondering about whether it could be negative (they can't because they're unsigned), whereas comparing for equality is immediately clear.

Copy link
Contributor

@tromp tromp left a comment

Choose a reason for hiding this comment

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

otherwise, looks fine.

@antiochp antiochp merged commit 97f961f into mimblewimble:master Aug 29, 2019
@antiochp antiochp deleted the verify_ignored_zeros branch August 29, 2019 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants