-
Notifications
You must be signed in to change notification settings - Fork 722
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
Verify BLS signature provided in Handshake messages #2735
Conversation
if err := p.VersionCompatibility.Compatible(p.version); err != nil { | ||
p.Log.Verbo("peer version not compatible", | ||
zap.Stringer("nodeID", p.id), | ||
zap.Stringer("peerVersion", p.version), | ||
zap.Error(err), | ||
) | ||
p.StartClose() | ||
return | ||
} |
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.
Now done in the below p.shouldDisconnect()
check
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 - agree with @patrick-ogrady 's comment https://github.com/ava-labs/avalanchego/pull/2735/files#r1488716828 on verifying the signature when a validator is added as opposed to periodically when sending ping messages.
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.
Nice testing improvements!
} | ||
|
||
// If Durango hasn't activated on mainnet yet, we don't require BLS | ||
// signatures to be provided. However, if they are provided, verify 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.
❤️
Why this should be merged
This enforces that nodes are signing their IPs with their BLS keys after the activation of Durango on mainnet. This enforces the mainnet upgrade time rather than the currently running network to provide Fuji operators a time period to update their nodes since the Fuji Durango upgrade has already happened.
If a node provides a BLS signature. It will be verified regardless of the Durango upgrade time.
How this works
How this was tested