Use digests for proposal ids, rather than incrementing integers#2104
Merged
achamayou merged 9 commits intoJan 25, 2021
Conversation
Closed
|
switch_proposal_ids_to_digests@17904 aka 20210125.5 vs master ewma over 50 builds from 17274 to 17901 |
eddyashton
reviewed
Jan 22, 2021
eddyashton
reviewed
Jan 22, 2021
eddyashton
reviewed
Jan 25, 2021
|
|
||
| if (!set_jwt_public_signing_keys( | ||
| ctx.tx, INVALID_ID, parsed.issuer, issuer_metadata, parsed.jwks)) | ||
| ctx.tx, "", parsed.issuer, issuer_metadata, parsed.jwks)) |
Member
There was a problem hiding this comment.
Nit: Would prefer if "" was INVALID_PROPOSAL_ID, set to something like INVALID_PROPOSAL_ID = "INVALID" in proposals.h, so we can catch if this ever leaks somewhere unexpected.
eddyashton
approved these changes
Jan 25, 2021
jumaffre
approved these changes
Jan 25, 2021
Member
@achamayou Is this tracked somewhere? |
This file contains hidden or 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
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 part of #1649, and a chunk of #2087.
Proposal ids are updated to become hex-encoded digest strings, rather than integers. The digest only covers the proposal request itself at the moment, and votes are therefore no more replay-proof than under the previous integer scheme unless the user includes a nonce in their proposal.
Once necessary changes have been made to the history/KV/frontend, this digest will be combined with the root of the transactions' Merkle Tree as of the transaction read_version. Users will no longer need to include a nonce in their proposal to ensure votes cannot be reused.