mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
Add medalla testnet configuration. (#6700)
This commit is contained in:
parent
2c11fcb242
commit
415cb9ff8d
@ -33,7 +33,8 @@ type Flags struct {
|
||||
// State locks
|
||||
NewBeaconStateLocks bool // NewStateLocks for updated beacon state locking.
|
||||
// Testnet Flags.
|
||||
AltonaTestnet bool // AltonaTestnet defines the flag through which we can enable the node to run on the altona testnet.
|
||||
AltonaTestnet bool // AltonaTestnet defines the flag through which we can enable the node to run on the altona testnet.
|
||||
MedallaTestnet bool // MedallaTestnet defines the flag through which we can enable the node to run on the medalla testnet.
|
||||
// Feature related flags.
|
||||
WriteSSZStateTransitions bool // WriteSSZStateTransitions to tmp directory.
|
||||
InitSyncNoVerify bool // InitSyncNoVerify when initial syncing w/o verifying block's contents.
|
||||
@ -120,6 +121,12 @@ func ConfigureBeaconChain(ctx *cli.Context) {
|
||||
params.UseAltonaNetworkConfig()
|
||||
cfg.AltonaTestnet = true
|
||||
}
|
||||
if ctx.Bool(medallaTestnet.Name) {
|
||||
log.Warn("Running Node on Medalla Testnet")
|
||||
params.UseMedallaConfig()
|
||||
params.UseMedallaNetworkConfig()
|
||||
cfg.MedallaTestnet = true
|
||||
}
|
||||
if ctx.Bool(writeSSZStateTransitionsFlag.Name) {
|
||||
log.Warn("Writing SSZ states and blocks after state transitions")
|
||||
cfg.WriteSSZStateTransitions = true
|
||||
@ -263,6 +270,12 @@ func ConfigureValidator(ctx *cli.Context) {
|
||||
params.UseAltonaNetworkConfig()
|
||||
cfg.AltonaTestnet = true
|
||||
}
|
||||
if ctx.Bool(medallaTestnet.Name) {
|
||||
log.Warn("Running Validator on Medalla Testnet")
|
||||
params.UseMedallaConfig()
|
||||
params.UseMedallaNetworkConfig()
|
||||
cfg.MedallaTestnet = true
|
||||
}
|
||||
if ctx.Bool(enableLocalProtectionFlag.Name) {
|
||||
cfg.LocalProtection = true
|
||||
} else {
|
||||
|
@ -140,6 +140,10 @@ var (
|
||||
Name: "altona",
|
||||
Usage: "This defines the flag through which we can run on the Altona Multiclient Testnet",
|
||||
}
|
||||
medallaTestnet = &cli.BoolFlag{
|
||||
Name: "medalla",
|
||||
Usage: "This defines the flag through which we can run on the Medalla Multiclient Testnet",
|
||||
}
|
||||
enableAccountsV2 = &cli.BoolFlag{
|
||||
Name: "enable-accounts-v2",
|
||||
Usage: "Enables usage of v2 for Prysm validator accounts",
|
||||
@ -566,6 +570,7 @@ var ValidatorFlags = append(deprecatedFlags, []cli.Flag{
|
||||
disableDomainDataCacheFlag,
|
||||
waitForSyncedFlag,
|
||||
altonaTestnet,
|
||||
medallaTestnet,
|
||||
enableAccountsV2,
|
||||
}...)
|
||||
|
||||
@ -608,6 +613,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
|
||||
newBeaconStateLocks,
|
||||
forceMaxCoverAttestationAggregation,
|
||||
altonaTestnet,
|
||||
medallaTestnet,
|
||||
batchBlockVerify,
|
||||
initSyncVerbose,
|
||||
enableFinalizedDepositsCache,
|
||||
|
@ -12,6 +12,7 @@ go_library(
|
||||
"network_config.go",
|
||||
"testnet_altona_config.go",
|
||||
"testnet_e2e_config.go",
|
||||
"testnet_medalla_config.go",
|
||||
"testnet_onyx_config.go",
|
||||
"testutils.go",
|
||||
],
|
||||
|
27
shared/params/testnet_medalla_config.go
Normal file
27
shared/params/testnet_medalla_config.go
Normal file
@ -0,0 +1,27 @@
|
||||
package params
|
||||
|
||||
// UseMedallaNetworkConfig uses the Medalla specific
|
||||
// network config.
|
||||
func UseMedallaNetworkConfig() {
|
||||
cfg := BeaconNetworkConfig().Copy()
|
||||
cfg.ContractDeploymentBlock = 3085928
|
||||
cfg.DepositContractAddress = "0x07b39F4fDE4A38bACe212b546dAc87C58DfE3fDC"
|
||||
cfg.BootstrapNodes = []string{}
|
||||
|
||||
OverrideBeaconNetworkConfig(cfg)
|
||||
}
|
||||
|
||||
// UseMedallaConfig sets the main beacon chain
|
||||
// config for medalla.
|
||||
func UseMedallaConfig() {
|
||||
beaconConfig = MedallaConfig()
|
||||
}
|
||||
|
||||
// MedallaConfig defines the config for the
|
||||
// medalla testnet.
|
||||
func MedallaConfig() *BeaconChainConfig {
|
||||
cfg := MainnetConfig().Copy()
|
||||
cfg.MinGenesisTime = 1596546000
|
||||
cfg.GenesisForkVersion = []byte{0x00, 0x00, 0x00, 0x01}
|
||||
return cfg
|
||||
}
|
Loading…
Reference in New Issue
Block a user