Skip to content

Commit

Permalink
Merge pull request #5168 from oasisprotocol/ptrus/fix/validator-p2p-c…
Browse files Browse the repository at this point in the history
…heck

go/consensus/supplementarysanity: Fix checks for legacy validators
  • Loading branch information
ptrus authored Feb 7, 2023
2 parents fd955b7 + f790a1f commit 82199f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/5168.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go/consensus/supplementarysanity: Fix checks for legacy validators
2 changes: 1 addition & 1 deletion go/common/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const (
LatestNodeDescriptorVersion = 3

// Minimum and maximum descriptor versions that are allowed.
minNodeDescriptorVersion = 2
minNodeDescriptorVersion = 3
maxNodeDescriptorVersion = LatestNodeDescriptorVersion

nodeSoftwareVersionMaxLength = 128
Expand Down
3 changes: 2 additions & 1 deletion go/registry/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,9 +706,10 @@ func VerifyRegisterNodeArgs( // nolint: gocyclo
}
expectedSigners = append(expectedSigners, n.P2P.ID)
p2pAddressRequired := n.HasRoles(P2PAddressRequiredRoles)
switch isGenesis {
switch isGenesis || isSanityCheck {
case true:
// Allow legacy descriptor with optional p2p address for validator.
// XXX: Remove this after 23.0.x.
if n.HasRoles(node.RoleValidator) {
p2pAddressRequired = false
}
Expand Down

0 comments on commit 82199f2

Please sign in to comment.