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

multi: Enable vote for DCP0004. #1579

Merged
merged 1 commit into from Jan 28, 2019

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Jan 26, 2019

This requires PR #1578.

This implements the agenda for voting on the sequence lock fixes as defined in DCP0004 along with consensus tests and mempool acceptance tests to ensure its correctness.

It also modifies the mempool to conditionally treat all transactions with enabled sequence locks as non standard until the vote passes at which point the will become standard with the modified semantics enforced.

The following is an overview of the changes:

  • Generate new version blocks and reject old version blocks after a super majority has been reached
    • New block version on mainnet is version 6
    • New block version on testnet is version 7
  • Introduce a convenience function for determining if the vote passed and is now active
  • Enforce modified sequence lock semantics in accordance with the state of the vote
  • Modify the more strict standardness checks (acceptance to the mempool and relay) to enforce DCP0004 in accordance with the state of the vote
    • Make all transactions with enabled sequence locks non standard until the agenda vote passes
    • Add tests to ensure acceptance and relay behave according to the aforementioned description
  • Add tests for determining if the agenda is active for both mainnet and testnet
  • Add tests to ensure the corrected sequence locks are handled properly depending on the result of the vote

blockchain/agendas_test.go Outdated Show resolved Hide resolved
Copy link
Member

@matheusd matheusd left a comment

Choose a reason for hiding this comment

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

Manually verified voting process and deployment activation on simnet.

@davecgh
Copy link
Member Author

davecgh commented Jan 28, 2019

I should note that I also manually tested the deployment activation semantics on simnet, created spend transactions with various sequence locks active to ensure mempool rejects them prior to the vote passing as well as accepting them 1 block before (since it can be included in the next block), verified proper version rejection of the blocks and stake versions at the enforcement thresholds, and examined the mining templates at the relevant points.

This implements the agenda for voting on the sequence lock fixes as
defined in DCP0004 along with consensus tests and mempool acceptance
tests to ensure its correctness.

It also modifies the mempool to conditionally treat all transactions
with enabled sequence locks as non standard until the vote passes at
which point the will become standard with the modified semantics
enforced.

The following is an overview of the changes:

- Generate new version blocks and reject old version blocks after a
  super majority has been reached
  - New block version on mainnet is version 6
  - New block version on testnet is version 7
- Introduce a convenience function for determining if the vote passed
  and is now active
- Enforce modified sequence lock semantics in accordance with the state
  of the vote
- Modify the more strict standardness checks (acceptance to the mempool
  and relay) to enforce DCP0004 in accordance with the state of the vote
  - Make all transactions with enabled sequence locks non standard until
    the agenda vote passes
  - Add tests to ensure acceptance and relay behave according to the
    aforementioned description
- Add tests for determining if the agenda is active for both mainnet and
  testnet
- Add tests to ensure the corrected sequence locks are handled properly
  depending on the result of the vote
@davecgh davecgh merged commit 4e8dc45 into decred:master Jan 28, 2019
@davecgh davecgh deleted the multi_consensus_fixseqlocks branch January 28, 2019 15:48
@davecgh davecgh added the consensus changes Changes that involve modifying the consensus rules and thus are required to be gated behind a vote. label Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus changes Changes that involve modifying the consensus rules and thus are required to be gated behind a vote.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants