-
Notifications
You must be signed in to change notification settings - Fork 219
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
feat!: make DhtHeader field non-malleable #3243
feat!: make DhtHeader field non-malleable #3243
Conversation
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.
Looking great, happy to approve with clippy passing
78a45ac
to
cf1b6d3
Compare
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
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.
Happy to merge this once a WIREMODE update is included
### Breaking Change to comms This PR includes the relevant DhtHeader fields in the commitment of a Dht Message MAC signature so that they cannot be changed while in route. The header fields included in the commitment are: - Major version - Minor version - Destination - Message type - Message flags - Expiry time (if exists) - Ephemeral public key (if exists)
cf1b6d3
to
b8cc0a3
Compare
Ahh yes you are correct I should have incremented the DHT_MAJOR_VERSION and have updated that. |
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.
utAck - obviously would be nice to DRY up the challenge construction
… compatibility (#3372) Description --- Block v1 (compatible with weatherwax at all heights): - Kernel ordering using every kernel field - Input MR commits to empty serialization of bitmap Block v2 (Igor, breaking change) - Kernel ordering (#3193) - Input MR uses input hashes only without extaneous empty bitmap bytes (#3195) Misc - Add missing kernel order block validation - Removed unnecessary transaction body sorting in wallet, it (still) is the responsibility of the GetNewBlockTemplate to assemble a final sorted block body. Motivation and Context --- Allow consensus breaking code to be merged without hard forking weatherwax. Igor will have to be reset. To follow in subsequent PR: network breaking changes from DHT header malleability fix (#3243 ) How Has This Been Tested? --- Archival sync weatherwax node from scratch, received propagated blocks Washing machine between two weatherwax wallets
Description --- - implements DHT protocol versioning allowing the same codebase to be used for multiple networks - DRY dht header signature construction - Pre-version 2 DHT protocol does not use the entire header in signature challenge - minor DHT builder improvements Motivation and Context --- Allow new break protocols to be introduced while old protocols still exist. Setting the protocol version sets the DHT to speak that version, while still supporting previous versions Closes #3243 How Has This Been Tested? --- Tested discovery on weatherwax which uses versioned challenge construction
Description
This PR includes the relevant DhtHeader fields in the commitment of a Dht Message MAC signature so that they cannot be changed while in route.
The header fields included in the commitment are:
How Has This Been Tested?
Rust integration test provided and existing tests updated.
BREAKING CHANGE: Previous message signatures will not be valid