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

Remove pre-Durango networking checks #3018

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 14 additions & 25 deletions network/peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -708,14 +708,6 @@ func (p *peer) shouldDisconnect() bool {
return false
}

if p.ip.BLSSignature == nil {
p.Log.Debug("disconnecting from peer",
zap.String("reason", "missing BLS signature"),
zap.Stringer("nodeID", p.id),
)
return true
}

validSignature := bls.VerifyProofOfPossession(
vdr.PublicKey,
p.ip.BLSSignature,
Expand Down Expand Up @@ -1075,23 +1067,20 @@ func (p *peer) handleHandshake(msg *p2p.Handshake) {
return
}

// TODO: After v1.11.x is activated, require the key to be provided.
if len(msg.IpBlsSig) > 0 {
signature, err := bls.SignatureFromBytes(msg.IpBlsSig)
if err != nil {
p.Log.Debug("peer has malformed signature",
zap.Stringer("nodeID", p.id),
zap.String("signatureType", "bls"),
zap.Error(err),
)
p.StartClose()
return
}

p.ip.BLSSignature = signature
p.ip.BLSSignatureBytes = msg.IpBlsSig
signature, err := bls.SignatureFromBytes(msg.IpBlsSig)
if err != nil {
p.Log.Debug("peer has malformed signature",
zap.Stringer("nodeID", p.id),
zap.String("signatureType", "bls"),
zap.Error(err),
)
p.StartClose()
return
}

p.ip.BLSSignature = signature
p.ip.BLSSignatureBytes = msg.IpBlsSig

// If the peer is running an incompatible version or has an invalid BLS
// signature, disconnect from them prior to marking the handshake as
// completed.
Expand Down Expand Up @@ -1228,8 +1217,8 @@ func (p *peer) handlePeerList(msg *p2p.PeerList) {
zap.String("field", "Port"),
zap.Uint32("port", claimedIPPort.IpPort),
)
// TODO: After v1.11.x is activated, close the peer here.
continue
p.StartClose()
return
}

discoveredIPs[i] = ips.NewClaimedIPPort(
Expand Down
22 changes: 11 additions & 11 deletions proto/pb/sdk/sdk.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions proto/sdk/sdk.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ package sdk;
option go_package = "github.com/ava-labs/avalanchego/proto/pb/sdk";

message PullGossipRequest {
// TODO: Remove reservation after v1.11.x activates.
reserved 1;
bytes salt = 2;
bytes filter = 3;
}
Expand Down
Loading