tari icon indicating copy to clipboard operation
tari copied to clipboard

feat!: add custom noise prologue to comms nodes

Open hansieodendaal opened this issue 6 months ago • 4 comments

Description

Added a custom noise prologue to the noise protocol to be hashed into the handshake hash value. This enables an application to specify a unique identifier like the genesis block hash as the noise prologue, effectively stopping any communication handshake from succeeding with nodes not on the same genesis block.

Thanks to @sdbondi for brainstorming and suggesting the way this requirement could be implemented.

Motivation and Context

Base nodes and wallets maintained numerous connections from which they could not sync or obtain useful information. This caused base nodes to try and follow other base nodes that were on a higher proof of work but on a different genesis block, and caused wallets to query base nodes that supplied information from a different blockchain.

How Has This Been Tested?

Passed all unit tests. Passed system-level testing.

What process can a PR reviewer use to test or verify this change?

Code review. System-level testing.

Breaking Changes

  • [ ] None
  • [ ] Requires data directory on base node to be deleted
  • [ ] Requires hard fork
  • [X] Other - Please specify

BREAKING CHANGE: Communication between base nodes and wallets will be exclusively linked to the genesis block hash once this PR is implemented. They will not be able to communicate to any previous release.

hansieodendaal avatar Aug 22 '24 16:08 hansieodendaal