add deployment phase for Capella-ready networks (#4607)

Allow distinguishing Capella-ready networks from non-upgraded networks
based on `CAPELLA_FORK_EPOCH` being set (Zhejiang public testnet).
This commit is contained in:
Etan Kissling 2023-02-10 14:26:01 +01:00 committed by GitHub
parent 20fc355ff1
commit 09dd64df32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -116,6 +116,7 @@ type
DeploymentPhase* {.pure.} = enum DeploymentPhase* {.pure.} = enum
Devnet = "devnet" Devnet = "devnet"
CapellaReady = "capella"
Testnet = "testnet" Testnet = "testnet"
Mainnet = "mainnet" Mainnet = "mainnet"
None = "none" None = "none"

View File

@ -1870,6 +1870,9 @@ proc doRunBeaconNode(config: var BeaconNodeConf, rng: ref HmacDrbgContext) {.rai
# works # works
for node in metadata.bootstrapNodes: for node in metadata.bootstrapNodes:
config.bootstrapNodes.add node config.bootstrapNodes.add node
if not (metadata.cfg.CAPELLA_FORK_EPOCH == FAR_FUTURE_EPOCH or
config.deploymentPhase == DeploymentPhase.None):
config.deploymentPhase = DeploymentPhase.CapellaReady
let node = BeaconNode.init(rng, config, metadata) let node = BeaconNode.init(rng, config, metadata)