Skip to content

Commit

Permalink
Merge pull request #2552 from oasislabs/peterjgilbert/disable_consens…
Browse files Browse the repository at this point in the history
…us_addr_check_genesis

Temporarily disable consensus address checks at genesis
  • Loading branch information
peterjgilbert authored Jan 14, 2020
2 parents f059460 + 4af892f commit 4363b0a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions .changelog/2552.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Temporarily disable consensus address checks at genesis
19 changes: 12 additions & 7 deletions go/registry/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,18 @@ func VerifyRegisterNodeArgs( // nolint: gocyclo
return nil, ErrInvalidArgument
}
consensusAddressRequired := n.HasRoles(ConsensusAddressRequiredRoles)
if err := verifyAddresses(params, consensusAddressRequired, n.Consensus.Addresses); err != nil {
addrs, _ := json.Marshal(n.Consensus.Addresses)
logger.Error("RegisterNode: missing/invalid consensus addresses",
"node", n,
"consensus_addrs", addrs,
)
return nil, err
if !isGenesis {
// XXX: Re-enable consensus address checks at genesis after
// existing deployments have cleaned up registries.
// https://github.com/oasislabs/oasis-core/issues/2428
if err := verifyAddresses(params, consensusAddressRequired, n.Consensus.Addresses); err != nil {
addrs, _ := json.Marshal(n.Consensus.Addresses)
logger.Error("RegisterNode: missing/invalid consensus addresses",
"node", n,
"consensus_addrs", addrs,
)
return nil, err
}
}

// If node is a key manager, ensure that it is owned by the key manager
Expand Down

0 comments on commit 4363b0a

Please sign in to comment.