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

feat: implement DHT protocol versioning, includes #3243 #3377

Merged
merged 3 commits into from
Sep 22, 2021

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Sep 22, 2021

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

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)
@sdbondi sdbondi changed the title feat: implement DHT protocol versioning feat: implement DHT protocol versioning, includes #3243 Sep 22, 2021
- 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
@aviator-app aviator-app bot merged commit d676bba into tari-project:development Sep 22, 2021
@sdbondi sdbondi deleted the igor-network branch September 22, 2021 13:24
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