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

chaincfg: Enforce globally unique vote IDs. #3057

Merged

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Feb 15, 2023

This requires #3056.

The code currently supports reusing the same vote ID to refer to different agendas as long as they are in different agenda versions.

While there is nothing technically incorrect about this, and part of the design is to allow it, various other software in the ecosystem implicitly assumes the IDs are globally unique across all agendas.

Due to this, and also because supporting it makes the internal code more complex to deal with as well, there is currently a bit of an unwritten rule that the vote ID for every agenda across all versions should be unique.

This change effectively formalizes that unwritten rule by modifying the validation logic that happens at initialization time to reject deployments that have duplicate IDs across agenda versions.

@davecgh davecgh added this to the 1.8.0 milestone Feb 15, 2023
@davecgh davecgh force-pushed the chaincfg_enforce_globally_unique_voteids branch from 4ca0c6b to 74df71a Compare February 15, 2023 00:28
@davecgh davecgh force-pushed the chaincfg_enforce_globally_unique_voteids branch from 74df71a to 0e11f17 Compare February 15, 2023 15:41
The code currently supports reusing the same vote ID to refer to
different agendas as long as they are in different agenda versions.

While there is nothing technically incorrect about this, and part of the
design is to allow it, various other software in the ecosystem
implicitly assumes the IDs are globally unique across all agendas.

Due to this, and also because supporting it makes the internal code more
complex to deal with as well, there is currently a bit of an unwritten
rule that the vote ID for every agenda across all versions should be
unique.

This change effectively formalizes that unwritten rule by modifying the
validation logic that happens at initialization time to reject
deployments that have duplicate IDs across agenda versions.
@davecgh davecgh force-pushed the chaincfg_enforce_globally_unique_voteids branch from 0e11f17 to 3d38b7b Compare February 24, 2023 08:54
@davecgh davecgh merged commit 3d38b7b into decred:master Feb 24, 2023
@davecgh davecgh deleted the chaincfg_enforce_globally_unique_voteids branch February 24, 2023 19:45
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