diff --git a/beacon-chain/blockchain/process_attestation_test.go b/beacon-chain/blockchain/process_attestation_test.go index 443581dad8b8..e78b0a63cc83 100644 --- a/beacon-chain/blockchain/process_attestation_test.go +++ b/beacon-chain/blockchain/process_attestation_test.go @@ -135,7 +135,6 @@ func TestStore_SaveCheckpointState(t *testing.T) { ctx := context.Background() db := testDB.SetupDB(t) defer testDB.TeardownDB(t, db) - params.UseDemoBeaconConfig() cfg := &Config{ BeaconDB: db, diff --git a/endtoend/README.md b/endtoend/README.md index b20b4a985cd8..75a9f77810e8 100644 --- a/endtoend/README.md +++ b/endtoend/README.md @@ -12,7 +12,7 @@ Evaluators have 3 parts, the name for it's test name, a `policy` which declares ## Current end-to-end tests * Minimal Config - 4 beacon nodes, 64 validators, running for 6 epochs -* ~~Demo Config - 2 beacon nodes, 16,384 validators, running for 5 epochs~~ Disabled for now +* ~~Mainnet Config - 2 beacon nodes, 16,384 validators, running for 5 epochs~~ Disabled for now ## Instructions If you wish to run all the E2E tests, you can run them through bazel with: diff --git a/shared/featureconfig/config.go b/shared/featureconfig/config.go index f7a1470f5343..466700ecaeb8 100644 --- a/shared/featureconfig/config.go +++ b/shared/featureconfig/config.go @@ -28,29 +28,28 @@ var log = logrus.WithField("prefix", "flags") // Flags is a struct to represent which features the client will perform on runtime. type Flags struct { - NoCustomConfig bool // NoCustomConfigFlag determines whether to launch a beacon chain using real parameters or demo parameters. - MinimalConfig bool // MinimalConfig as defined in the spec. - WriteSSZStateTransitions bool // WriteSSZStateTransitions to tmp directory. - InitSyncNoVerify bool // InitSyncNoVerify when initial syncing w/o verifying block's contents. - EnableDynamicCommitteeSubnets bool // Enables dynamic attestation committee subnets via p2p. - SkipBLSVerify bool // Skips BLS verification across the runtime. - EnableBackupWebhook bool // EnableBackupWebhook to allow database backups to trigger from monitoring port /db/backup. - PruneEpochBoundaryStates bool // PruneEpochBoundaryStates prunes the epoch boundary state before last finalized check point. - EnableSnappyDBCompression bool // EnableSnappyDBCompression in the database. - ProtectProposer bool // ProtectProposer prevents the validator client from signing any proposals that would be considered a slashable offense. - ProtectAttester bool // ProtectAttester prevents the validator client from signing any attestations that would be considered a slashable offense. - DisableStrictAttestationPubsubVerification bool // DisableStrictAttestationPubsubVerification will disabling strict signature verification in pubsub. - DisableUpdateHeadPerAttestation bool // DisableUpdateHeadPerAttestation will disabling update head on per attestation basis. - EnableByteMempool bool // EnaableByteMempool memory management. - EnableDomainDataCache bool // EnableDomainDataCache caches validator calls to DomainData per epoch. - EnableStateGenSigVerify bool // EnableStateGenSigVerify verifies proposer and randao signatures during state gen. - CheckHeadState bool // CheckHeadState checks the current headstate before retrieving the desired state from the db. - DontPruneStateStartUp bool // DontPruneStateStartUp disables pruning state upon beacon node start up. - DisableNewStateMgmt bool // NewStateMgmt disables the new state mgmt service. - DisableInitSyncQueue bool // DisableInitSyncQueue disables the new initial sync implementation. - EnableFieldTrie bool // EnableFieldTrie enables the state from using field specific tries when computing the root. - EnableBlockHTR bool // EnableBlockHTR enables custom hashing of our beacon blocks. - NoInitSyncBatchSaveBlocks bool // NoInitSyncBatchSaveBlocks disables batch save blocks mode during initial syncing. + MinimalConfig bool // MinimalConfig as defined in the spec. + WriteSSZStateTransitions bool // WriteSSZStateTransitions to tmp directory. + InitSyncNoVerify bool // InitSyncNoVerify when initial syncing w/o verifying block's contents. + EnableDynamicCommitteeSubnets bool // Enables dynamic attestation committee subnets via p2p. + SkipBLSVerify bool // Skips BLS verification across the runtime. + EnableBackupWebhook bool // EnableBackupWebhook to allow database backups to trigger from monitoring port /db/backup. + PruneEpochBoundaryStates bool // PruneEpochBoundaryStates prunes the epoch boundary state before last finalized check point. + EnableSnappyDBCompression bool // EnableSnappyDBCompression in the database. + ProtectProposer bool // ProtectProposer prevents the validator client from signing any proposals that would be considered a slashable offense. + ProtectAttester bool // ProtectAttester prevents the validator client from signing any attestations that would be considered a slashable offense. + DisableStrictAttestationPubsubVerification bool // DisableStrictAttestationPubsubVerification will disabling strict signature verification in pubsub. + DisableUpdateHeadPerAttestation bool // DisableUpdateHeadPerAttestation will disabling update head on per attestation basis. + EnableByteMempool bool // EnaableByteMempool memory management. + EnableDomainDataCache bool // EnableDomainDataCache caches validator calls to DomainData per epoch. + EnableStateGenSigVerify bool // EnableStateGenSigVerify verifies proposer and randao signatures during state gen. + CheckHeadState bool // CheckHeadState checks the current headstate before retrieving the desired state from the db. + DontPruneStateStartUp bool // DontPruneStateStartUp disables pruning state upon beacon node start up. + DisableNewStateMgmt bool // NewStateMgmt disables the new state mgmt service. + DisableInitSyncQueue bool // DisableInitSyncQueue disables the new initial sync implementation. + EnableFieldTrie bool // EnableFieldTrie enables the state from using field specific tries when computing the root. + EnableBlockHTR bool // EnableBlockHTR enables custom hashing of our beacon blocks. + NoInitSyncBatchSaveBlocks bool // NoInitSyncBatchSaveBlocks disables batch save blocks mode during initial syncing. // DisableForkChoice disables using LMD-GHOST fork choice to update // the head of the chain based on attestations and instead accepts any valid received block // as the chain head. UNSAFE, use with caution. @@ -221,27 +220,12 @@ func complainOnDeprecatedFlags(ctx *cli.Context) { } func configureConfig(ctx *cli.Context, cfg *Flags) *Flags { - if ctx.Bool(noCustomConfigFlag.Name) { - log.Warn("Using default mainnet config") - cfg.NoCustomConfig = true - } if ctx.Bool(minimalConfigFlag.Name) { log.Warn("Using minimal config") cfg.MinimalConfig = true - } - // Use custom config values if the --no-custom-config flag is not set. - if !cfg.NoCustomConfig { - if cfg.MinimalConfig { - log.WithField( - "config", "minimal-spec", - ).Info("Using custom chain parameters") - params.UseMinimalConfig() - } else { - log.WithField( - "config", "demo", - ).Info("Using custom chain parameters") - params.UseDemoBeaconConfig() - } + params.UseMinimalConfig() + } else { + log.Warn("Using default mainnet config") } return cfg } diff --git a/shared/featureconfig/flags.go b/shared/featureconfig/flags.go index c0a13225c72b..d12cd2ebf7e0 100644 --- a/shared/featureconfig/flags.go +++ b/shared/featureconfig/flags.go @@ -9,10 +9,6 @@ var ( Name: "broadcast-slashing", Usage: "Broadcast slashings from slashing pool.", } - noCustomConfigFlag = &cli.BoolFlag{ - Name: "no-custom-config", - Usage: "Run the beacon chain with the real parameters from phase 0.", - } minimalConfigFlag = &cli.BoolFlag{ Name: "minimal-config", Usage: "Use minimal config with parameters as defined in the spec.", @@ -142,6 +138,11 @@ var ( const deprecatedUsage = "DEPRECATED. DO NOT USE." var ( + deprecatedNoCustomConfigFlag = &cli.BoolFlag{ + Name: "no-custom-config", + Usage: deprecatedUsage, + Hidden: true, + } deprecatedEnableNoiseHandshake = &cli.BoolFlag{ Name: "enable-noise", Usage: deprecatedUsage, @@ -280,6 +281,7 @@ var ( ) var deprecatedFlags = []cli.Flag{ + deprecatedNoCustomConfigFlag, deprecatedEnableNoiseHandshake, deprecatedEnableInitSyncQueue, deprecatedEnableFinalizedBlockRootIndexFlag, @@ -324,7 +326,6 @@ var E2EValidatorFlags = []string{ // BeaconChainFlags contains a list of all the feature flags that apply to the beacon-chain client. var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{ - noCustomConfigFlag, customGenesisDelayFlag, minimalConfigFlag, writeSSZStateTransitionsFlag, diff --git a/shared/params/config.go b/shared/params/config.go index cde379749a6b..e507666ce06e 100644 --- a/shared/params/config.go +++ b/shared/params/config.go @@ -229,24 +229,6 @@ func MainnetConfig() *BeaconChainConfig { return defaultBeaconConfig } -// DemoBeaconConfig retrieves the demo beacon chain config. This is mainnet config with 1/10th of -// mainnet deposit values. -func DemoBeaconConfig() *BeaconChainConfig { - demoConfig := *MainnetConfig() - - demoConfig.MinDepositAmount /= 10 - demoConfig.MaxEffectiveBalance /= 10 - demoConfig.EjectionBalance /= 10 - demoConfig.EffectiveBalanceIncrement /= 10 - - demoConfig.InactivityPenaltyQuotient /= 10 - - // Increment this number after a full testnet tear down. - demoConfig.GenesisForkVersion = []byte{0, 0, 0, 4} - - return &demoConfig -} - // MinimalSpecConfig retrieves the minimal config used in spec tests. func MinimalSpecConfig() *BeaconChainConfig { minimalConfig := *defaultBeaconConfig @@ -319,11 +301,6 @@ func MinimalSpecConfig() *BeaconChainConfig { return &minimalConfig } -// UseDemoBeaconConfig for beacon chain services. -func UseDemoBeaconConfig() { - beaconConfig = DemoBeaconConfig() -} - // UseMinimalConfig for beacon chain services. func UseMinimalConfig() { beaconConfig = MinimalSpecConfig() diff --git a/tools/blocktree/BUILD.bazel b/tools/blocktree/BUILD.bazel index 3d385bd46719..fb7ad2e7c7f9 100644 --- a/tools/blocktree/BUILD.bazel +++ b/tools/blocktree/BUILD.bazel @@ -12,7 +12,6 @@ go_library( "//beacon-chain/db/filters:go_default_library", "//shared/attestationutil:go_default_library", "//shared/bytesutil:go_default_library", - "//shared/params:go_default_library", "@com_github_emicklei_dot//:go_default_library", "@com_github_prysmaticlabs_go_ssz//:go_default_library", ], diff --git a/tools/blocktree/main.go b/tools/blocktree/main.go index c55221e49ef4..f5a73a4ff52d 100644 --- a/tools/blocktree/main.go +++ b/tools/blocktree/main.go @@ -23,7 +23,6 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" "github.com/prysmaticlabs/prysm/shared/attestationutil" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/params" ) var ( @@ -41,8 +40,6 @@ type node struct { } func main() { - params.UseDemoBeaconConfig() - flag.Parse() db, err := db.NewDB(*datadir, cache.NewStateSummaryCache()) if err != nil { diff --git a/tools/cluster-pk-manager/server/BUILD.bazel b/tools/cluster-pk-manager/server/BUILD.bazel index 540c96063cdb..ea4c8841eb89 100644 --- a/tools/cluster-pk-manager/server/BUILD.bazel +++ b/tools/cluster-pk-manager/server/BUILD.bazel @@ -22,7 +22,6 @@ go_library( "//shared/bls:go_default_library", "//shared/bytesutil:go_default_library", "//shared/keystore:go_default_library", - "//shared/params:go_default_library", "//shared/prometheus:go_default_library", "@com_github_ethereum_go_ethereum//:go_default_library", "@com_github_ethereum_go_ethereum//accounts/abi/bind:go_default_library", diff --git a/tools/cluster-pk-manager/server/main.go b/tools/cluster-pk-manager/server/main.go index 597374100ef9..ad716d968481 100644 --- a/tools/cluster-pk-manager/server/main.go +++ b/tools/cluster-pk-manager/server/main.go @@ -6,11 +6,11 @@ import ( "net" pb "github.com/prysmaticlabs/prysm/proto/cluster" - "github.com/prysmaticlabs/prysm/shared/params" - "github.com/prysmaticlabs/prysm/shared/prometheus" "github.com/sirupsen/logrus" _ "go.uber.org/automaxprocs" "google.golang.org/grpc" + + "github.com/prysmaticlabs/prysm/shared/prometheus" ) var ( @@ -33,8 +33,6 @@ func main() { if *verbose { logrus.SetLevel(logrus.DebugLevel) } - // use demo-config for cluster deployments - params.UseDemoBeaconConfig() if *ensureDeposited { log.Warn("--ensure-deposited: Ensuring all keys are deposited or deleting them from database!") } diff --git a/tools/forkchecker/forkchecker.go b/tools/forkchecker/forkchecker.go index f67733636547..b8ea409a2386 100644 --- a/tools/forkchecker/forkchecker.go +++ b/tools/forkchecker/forkchecker.go @@ -37,8 +37,6 @@ func (e *endpoint) Set(value string) error { } func main() { - params.UseDemoBeaconConfig() - var endpts endpoint clients := make(map[string]pb.BeaconChainClient) diff --git a/tools/sendDepositTx/sendDeposits.go b/tools/sendDepositTx/sendDeposits.go index 806956716799..64fc9d894ec3 100644 --- a/tools/sendDepositTx/sendDeposits.go +++ b/tools/sendDepositTx/sendDeposits.go @@ -97,7 +97,7 @@ func main() { }, &cli.Int64Flag{ Name: "depositAmount", - Value: 3200, + Value: int64(params.BeaconConfig().MaxEffectiveBalance), Usage: "Maximum deposit value allowed in contract(in gwei)", Destination: &depositAmount, }, diff --git a/validator/flags/flags.go b/validator/flags/flags.go index c0716ccde2a4..b8cc39dc2e19 100644 --- a/validator/flags/flags.go +++ b/validator/flags/flags.go @@ -5,11 +5,6 @@ import ( ) var ( - // NoCustomConfigFlag determines whether to launch a beacon chain using real parameters or demo parameters. - NoCustomConfigFlag = &cli.BoolFlag{ - Name: "no-custom-config", - Usage: "Run the beacon chain with the real parameters from phase 0.", - } // BeaconRPCProviderFlag defines a beacon node RPC endpoint. BeaconRPCProviderFlag = &cli.StringFlag{ Name: "beacon-rpc-provider", diff --git a/validator/main.go b/validator/main.go index 99fe64f87b59..fef024dfb9bc 100644 --- a/validator/main.go +++ b/validator/main.go @@ -33,7 +33,6 @@ func startNode(ctx *cli.Context) error { } var appFlags = []cli.Flag{ - flags.NoCustomConfigFlag, flags.BeaconRPCProviderFlag, flags.CertFlag, flags.GraffitiFlag, diff --git a/validator/usage.go b/validator/usage.go index 54dd02ca5588..11f7b9678bbe 100644 --- a/validator/usage.go +++ b/validator/usage.go @@ -72,7 +72,6 @@ var appHelpFlagGroups = []flagGroup{ { Name: "validator", Flags: []cli.Flag{ - flags.NoCustomConfigFlag, flags.BeaconRPCProviderFlag, flags.CertFlag, flags.KeyManager,