dusk-network / kadcast

Official rust implementation of the Kadcast P2P protocol for ultra-efficient message dissemination within Dusk Network
Mozilla Public License 2.0
22 stars 3 forks source link

Use provided nonce instead of regenerate it #110

Closed herr-seppia closed 2 years ago

herr-seppia commented 2 years ago

Describe the bug Current implementation regenerate the remove nonce for every incoming message. This leads to: 1) waste CPU consumption 2) mismatched ID if the remote peer generate the nonce with a different mechanism

Expected behaviour When a message is received from the network, the carried nonce should be used to calculate the BinaryID