Skip to content

Commit

Permalink
Temporarily disable consensus address checks at genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjgilbert committed Jan 14, 2020
1 parent f059460 commit 4af892f
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 4af892f

Please sign in to comment.