diff --git a/beacon-chain/node/config.go b/beacon-chain/node/config.go index 5f9954f1dcd9..0bdb22184ead 100644 --- a/beacon-chain/node/config.go +++ b/beacon-chain/node/config.go @@ -129,12 +129,11 @@ func configureInteropConfig(cliCtx *cli.Context) error { if cliCtx.IsSet(cmd.ChainConfigFileFlag.Name) { return nil } - genStateIsSet := cliCtx.IsSet(flags.InteropGenesisStateFlag.Name) genTimeIsSet := cliCtx.IsSet(flags.InteropGenesisTimeFlag.Name) numValsIsSet := cliCtx.IsSet(flags.InteropNumValidatorsFlag.Name) votesIsSet := cliCtx.IsSet(flags.InteropMockEth1DataVotesFlag.Name) - if genStateIsSet || genTimeIsSet || numValsIsSet || votesIsSet { + if genTimeIsSet || numValsIsSet || votesIsSet { if err := params.SetActive(params.InteropConfig().Copy()); err != nil { return err } diff --git a/beacon-chain/node/config_test.go b/beacon-chain/node/config_test.go index abf874ae686c..13de18f73c79 100644 --- a/beacon-chain/node/config_test.go +++ b/beacon-chain/node/config_test.go @@ -219,17 +219,6 @@ func TestConfigureInterop(t *testing.T) { }, "interop", }, - { - "genesis state set", - func() *cli.Context { - app := cli.App{} - set := flag.NewFlagSet("test", 0) - set.String(flags.InteropGenesisStateFlag.Name, "", "") - assert.NoError(t, set.Set(flags.InteropGenesisStateFlag.Name, "/path/")) - return cli.NewContext(&app, set, nil) - }, - "interop", - }, } for _, tt := range tests { diff --git a/beacon-chain/node/node.go b/beacon-chain/node/node.go index d58c931c87b3..c423afcd4de0 100644 --- a/beacon-chain/node/node.go +++ b/beacon-chain/node/node.go @@ -762,10 +762,9 @@ func (b *BeaconNode) registerRPCService() error { } genesisValidators := b.cliCtx.Uint64(flags.InteropNumValidatorsFlag.Name) - genesisStatePath := b.cliCtx.String(flags.InteropGenesisStateFlag.Name) var depositFetcher depositcache.DepositFetcher var chainStartFetcher execution.ChainStartFetcher - if genesisValidators > 0 || genesisStatePath != "" { + if genesisValidators > 0 { var interopService *interopcoldstart.Service if err := b.services.FetchService(&interopService); err != nil { return err @@ -917,15 +916,13 @@ func (b *BeaconNode) registerGRPCGateway() error { func (b *BeaconNode) registerDeterminsticGenesisService() error { genesisTime := b.cliCtx.Uint64(flags.InteropGenesisTimeFlag.Name) genesisValidators := b.cliCtx.Uint64(flags.InteropNumValidatorsFlag.Name) - genesisStatePath := b.cliCtx.String(flags.InteropGenesisStateFlag.Name) - if genesisValidators > 0 || genesisStatePath != "" { + if genesisValidators > 0 { svc := interopcoldstart.NewService(b.ctx, &interopcoldstart.Config{ GenesisTime: genesisTime, NumValidators: genesisValidators, BeaconDB: b.db, DepositCache: b.depositCache, - GenesisPath: genesisStatePath, }) svc.Start() diff --git a/beacon-chain/node/node_test.go b/beacon-chain/node/node_test.go index c681027897aa..3ff64d84d195 100644 --- a/beacon-chain/node/node_test.go +++ b/beacon-chain/node/node_test.go @@ -114,7 +114,7 @@ func TestNodeStart_Ok_registerDeterministicGenesisService(t *testing.T) { genesisBytes, err := genesisState.MarshalSSZ() require.NoError(t, err) require.NoError(t, os.WriteFile("genesis_ssz.json", genesisBytes, 0666)) - set.String(flags.InteropGenesisStateFlag.Name, "genesis_ssz.json", "") + set.String("genesis-state", "genesis_ssz.json", "") ctx := cli.NewContext(&app, set, nil) node, err := New(ctx, WithBlockchainFlagOptions([]blockchain.Option{}), WithBuilderFlagOptions([]builder.Option{}), diff --git a/cmd/beacon-chain/flags/interop.go b/cmd/beacon-chain/flags/interop.go index 366f04df9631..6aac9e666480 100644 --- a/cmd/beacon-chain/flags/interop.go +++ b/cmd/beacon-chain/flags/interop.go @@ -5,13 +5,6 @@ import ( ) var ( - // InteropGenesisStateFlag defines a flag for the beacon node to load genesis state via file. - InteropGenesisStateFlag = &cli.StringFlag{ - Name: "interop-genesis-state", - Usage: "The genesis state file (.SSZ) to load from. Note: loading from an interop genesis " + - "state does not use a web3 connection to read any deposits. This interop " + - "functionality should not be used with public testnets.", - } // InteropMockEth1DataVotesFlag enables mocking the eth1 proof-of-work chain data put into blocks by proposers. InteropMockEth1DataVotesFlag = &cli.BoolFlag{ Name: "interop-eth1data-votes", diff --git a/cmd/beacon-chain/main.go b/cmd/beacon-chain/main.go index 976b5bc261de..ab737190abfc 100644 --- a/cmd/beacon-chain/main.go +++ b/cmd/beacon-chain/main.go @@ -56,7 +56,6 @@ var appFlags = []cli.Flag{ flags.BlockBatchLimit, flags.BlockBatchLimitBurstFactor, flags.InteropMockEth1DataVotesFlag, - flags.InteropGenesisStateFlag, flags.InteropNumValidatorsFlag, flags.InteropGenesisTimeFlag, flags.SlotsPerArchivedPoint, diff --git a/cmd/beacon-chain/usage.go b/cmd/beacon-chain/usage.go index d3ac45402a6d..53d2928c581b 100644 --- a/cmd/beacon-chain/usage.go +++ b/cmd/beacon-chain/usage.go @@ -94,7 +94,6 @@ var appHelpFlagGroups = []flagGroup{ Name: "beacon-chain", Flags: []cli.Flag{ flags.InteropMockEth1DataVotesFlag, - flags.InteropGenesisStateFlag, flags.DepositContractFlag, flags.ContractDeploymentBlock, flags.RPCHost, @@ -173,7 +172,7 @@ var appHelpFlagGroups = []flagGroup{ { Name: "interop", Flags: []cli.Flag{ - flags.InteropGenesisStateFlag, + genesis.StatePath, flags.InteropGenesisTimeFlag, flags.InteropNumValidatorsFlag, }, diff --git a/config/features/deprecated_flags.go b/config/features/deprecated_flags.go index 2c6fdf4c44a5..1832c0953b6d 100644 --- a/config/features/deprecated_flags.go +++ b/config/features/deprecated_flags.go @@ -92,6 +92,11 @@ var ( Usage: deprecatedUsage, Hidden: true, } + deprecatedInteropGenesisState = &cli.StringFlag{ + Name: "interop-genesis-state", + Usage: deprecatedUsage, + Hidden: true, + } ) // Deprecated flags for both the beacon node and validator client. @@ -111,6 +116,7 @@ var deprecatedFlags = []cli.Flag{ deprecatedEnableDefensivePull, deprecatedDisableNativeState, deprecatedRopstenTestnet, + deprecatedInteropGenesisState, } // deprecatedBeaconFlags contains flags that are still used by other components