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

blockchain: No votes/revocations in header sanity. #1007

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Feb 2, 2018

This changes the validation that the block does not contain any votes or revocations before stake enabled height and stake validation height to make use of the values committed to by the header and thus moves the test into checkBlockHeaderSanity accordingly.

It also combines the two checks to only check before stake validation height since that always comes after stake enabled height and adds an assertion to ensure that optimization assumption holds.

This is acceptable since the code also validates the header commitments for the number of votes and revocations later and therefore implies correctness.

This changes the validation that the block does not contain any votes or
revocations before stake enabled height and stake validation height to
make use of the values committed to by the header and thus moves the
test into checkBlockHeaderSanity accordingly.

It also combines the two checks to only check before stake validation
height since that always comes after stake enabled height and adds an
assertion to ensure that optimization assumption holds.

This is acceptable since the code also validates the header commitments
for the number of votes and revocations later and therefore implies
correctness.
@davecgh davecgh force-pushed the blockchain_validate_novotes_revocations_header_sanity branch from 92cdf09 to 370dfa1 Compare February 2, 2018 02:34
Copy link
Member

@dajohi dajohi left a comment

Choose a reason for hiding this comment

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

ok

@davecgh davecgh merged commit 370dfa1 into decred:master Feb 2, 2018
@davecgh davecgh deleted the blockchain_validate_novotes_revocations_header_sanity branch February 2, 2018 02:53
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.

3 participants