Remove interop genesis service from beacon node (#14417)

* Remove interop dependencies from production binary for beacon-chain. Specifically, remove the interop genesis service.

Finding links to pebble: 
bazel query 'somepath(//cmd/beacon-chain, @com_github_cockroachdb_pebble//...)' --notool_deps

* Update INTEROP.md

* Remove interop config

* Remove ancient interop script

* Add electra support for premine genesis

* Add example of --chain-config-file, test interop instructions

* Fixes

* Add binary size reduction

* Update binary size reduction

* Fix duplicate switch case

* Move CHANGELOG entries to unreleased section

* gofmt

* fix
This commit is contained in:
Preston Van Loon
2024-12-03 13:08:49 -06:00
committed by GitHub
parent d09885b7ce
commit ac72fe2e0e
18 changed files with 86 additions and 621 deletions

View File

@@ -10,16 +10,4 @@ var (
Name: "interop-eth1data-votes",
Usage: "Enable mocking of eth1 data votes for proposers to package into blocks",
}
// InteropGenesisTimeFlag specifies genesis time for state generation.
InteropGenesisTimeFlag = &cli.Uint64Flag{
Name: "interop-genesis-time",
Usage: "Specify the genesis time for interop genesis state generation. Must be used with " +
"--interop-num-validators",
}
// InteropNumValidatorsFlag specifies number of genesis validators for state generation.
InteropNumValidatorsFlag = &cli.Uint64Flag{
Name: "interop-num-validators",
Usage: "Specify number of genesis validators to generate for interop. Must be used with --interop-genesis-time",
}
)

View File

@@ -60,8 +60,6 @@ var appFlags = []cli.Flag{
flags.BlobBatchLimit,
flags.BlobBatchLimitBurstFactor,
flags.InteropMockEth1DataVotesFlag,
flags.InteropNumValidatorsFlag,
flags.InteropGenesisTimeFlag,
flags.SlotsPerArchivedPoint,
flags.DisableDebugRPCEndpoints,
flags.SubscribeToAllSubnets,

View File

@@ -184,14 +184,6 @@ var appHelpFlagGroups = []flagGroup{
Name: "features",
Flags: features.ActiveFlags(features.BeaconChainFlags),
},
{
Name: "interop",
Flags: []cli.Flag{
genesis.StatePath,
flags.InteropGenesisTimeFlag,
flags.InteropNumValidatorsFlag,
},
},
{
Name: "deprecated",
Flags: []cli.Flag{

View File

@@ -22,7 +22,6 @@ go_library(
go_binary(
name = "prysmctl",
embed = [":go_default_library"],
gotags = ["noMainnetGenesis"],
visibility = ["//visibility:public"],
)

View File

@@ -31,7 +31,6 @@ var (
generateGenesisStateFlags = struct {
DepositJsonFile string
ChainConfigFile string
ConfigName string
NumValidators uint64
GenesisTime uint64
GenesisTimeDelay uint64
@@ -83,12 +82,6 @@ var (
Destination: &generateGenesisStateFlags.DepositJsonFile,
Usage: "Path to deposit_data.json file generated by the staking-deposit-cli tool for optionally specifying validators in genesis state",
},
&cli.StringFlag{
Name: "config-name",
Usage: "Config kind to be used for generating the genesis state. Default: mainnet. Options include mainnet, interop, minimal, sepolia, holesky. --chain-config-file will override this flag.",
Destination: &generateGenesisStateFlags.ConfigName,
Value: params.MainnetName,
},
&cli.Uint64Flag{
Name: "num-validators",
Usage: "Number of validators to deterministically generate in the genesis state",
@@ -216,11 +209,7 @@ func setGlobalParams() error {
log.Infof("Specified a chain config file: %s", chainConfigFile)
return params.LoadChainConfigFile(chainConfigFile, nil)
}
cfg, err := params.ByName(generateGenesisStateFlags.ConfigName)
if err != nil {
return fmt.Errorf("unable to find config using name %s: %w", generateGenesisStateFlags.ConfigName, err)
}
return params.SetActive(cfg.Copy())
return errors.New("No chain config file was provided. Use `--chain-config-file` to provide a chain config.")
}
func generateGenesis(ctx context.Context) (state.BeaconState, error) {