-
Notifications
You must be signed in to change notification settings - Fork 316
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
chore(CON-1412): Avoid handling VetKdKeyId
s in the IDKG component
#2388
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sawchord
changed the title
Leon/no vetkeys in idkg
chore(COn-1412): Avoid handling Nov 12, 2024
VetKdKeyId
s in the IDKG component
Sawchord
changed the title
chore(COn-1412): Avoid handling
chore(CON-1412): Avoid handling Nov 12, 2024
VetKdKeyId
s in the IDKG componentVetKdKeyId
s in the IDKG component
Sawchord
commented
Nov 12, 2024
eichhorl
reviewed
Nov 13, 2024
maksymar
approved these changes
Nov 13, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for execution part.
eichhorl
approved these changes
Nov 13, 2024
alin-at-dfinity
approved these changes
Nov 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replicated state changes LGTM.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a PR to secure, that the IDKG protocol can only be invoked with IDKG compatible variants of the
MasterPublicKeyId
.It does so by introducing a new type
IDkgMasterPublicKeyId
, which wrapsMasterPublicKeyId
and assures, that only an IDKG compatible variant is uses (Either::Schnorr
orECDSA
).Then it changes the type at some places in the code and then makes changes upstream, such that the Key only needs to be checked once, and from then on it is guaranteed to be IDKG compatible key.
The newly introduced
::VetKD
variant necessitates the introduction of this change. The VetKeys will be using the NiDKG protocol for its key generation, and therefore, a lot of the functions in theconsensus::idkg
submodule don't make sense to be used with the new variant.The keys get transformed back into
MasterPublicKeyId
for serialization, so this change does not introduce compatibility issues.When deserializing a
IDkgMasterPublicKeyId
, we need to check that it is IDKG compatible and reject otherwise. Since we did not introduce VetKeys yet (and in fact lack the code to do so), there can be no::VetKD
variants ofMasterPublicKeyId
yet in the state.