-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(comms): ensure signature challenge is constructed consistently (#…
…3725) Description --- - Ensure timestamp is timezone independent - Ensure multiple addresses are lexicographically ordered for the signature challenge - Add extra info in peer validation errors - migration that clears out all signatures (allowing new ones to take their place if provided) Motivation and Context --- Some base nodes are being banned for propagating invalid peer signatures - it is still not clear how this happens but since peer signatures are checked before being committed it must be an inconsistency between base nodes in how the challenge is being constructed. Two possible but unconfirmed issues are that the integer timestamp from the naive date-time is effected by timezones (this PR replaces with `DateTime<Utc>`) and/or the addresses were not ordered consistently (doubtful because all peers currently only ever advertise one address, this PR sorts them lexicographically) How Has This Been Tested? --- Manually: ban still occurs, but it seems as if only the same few nodes somehow accepted an invalid signature, this PR will clear the invalid signatures and we can monitor from there.
- Loading branch information
Showing
9 changed files
with
58 additions
and
65 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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