mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Remove the Goerli/Prater support. (#13846)
This commit is contained in:
16
WORKSPACE
16
WORKSPACE
@@ -342,22 +342,6 @@ filegroup(
|
||||
url = "https://github.com/eth-clients/eth2-networks/archive/934c948e69205dcf2deb87e4ae6cc140c335f94d.tar.gz",
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "goerli_testnet",
|
||||
build_file_content = """
|
||||
filegroup(
|
||||
name = "configs",
|
||||
srcs = [
|
||||
"prater/config.yaml",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
""",
|
||||
sha256 = "43fc0f55ddff7b511713e2de07aa22846a67432df997296fb4fc09cd8ed1dcdb",
|
||||
strip_prefix = "goerli-6522ac6684693740cd4ddcc2a0662e03702aa4a1",
|
||||
url = "https://github.com/eth-clients/goerli/archive/6522ac6684693740cd4ddcc2a0662e03702aa4a1.tar.gz",
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "holesky_testnet",
|
||||
build_file_content = """
|
||||
|
||||
@@ -217,9 +217,9 @@ func Test_hasNetworkFlag(t *testing.T) {
|
||||
want bool
|
||||
}{
|
||||
{
|
||||
name: "Prater testnet",
|
||||
networkName: features.PraterTestnet.Name,
|
||||
networkValue: "prater",
|
||||
name: "Holesky testnet",
|
||||
networkName: features.HoleskyTestnet.Name,
|
||||
networkValue: "holesky",
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -85,7 +85,7 @@ var (
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "config-name",
|
||||
Usage: "Config kind to be used for generating the genesis state. Default: mainnet. Options include mainnet, interop, minimal, prater, sepolia. --chain-config-file will override this flag.",
|
||||
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,
|
||||
},
|
||||
|
||||
@@ -167,7 +167,6 @@ var Commands = []*cli.Command{
|
||||
flags.ForceExitFlag,
|
||||
flags.VoluntaryExitJSONOutputPath,
|
||||
features.Mainnet,
|
||||
features.PraterTestnet,
|
||||
features.SepoliaTestnet,
|
||||
features.HoleskyTestnet,
|
||||
cmd.AcceptTosFlag,
|
||||
|
||||
@@ -27,7 +27,6 @@ var Commands = &cli.Command{
|
||||
flags.WalletPasswordFileFlag,
|
||||
flags.DeletePublicKeysFlag,
|
||||
features.Mainnet,
|
||||
features.PraterTestnet,
|
||||
features.SepoliaTestnet,
|
||||
features.HoleskyTestnet,
|
||||
cmd.AcceptTosFlag,
|
||||
@@ -63,7 +62,6 @@ var Commands = &cli.Command{
|
||||
flags.GrpcRetriesFlag,
|
||||
flags.GrpcRetryDelayFlag,
|
||||
features.Mainnet,
|
||||
features.PraterTestnet,
|
||||
features.SepoliaTestnet,
|
||||
features.HoleskyTestnet,
|
||||
cmd.AcceptTosFlag,
|
||||
@@ -97,7 +95,6 @@ var Commands = &cli.Command{
|
||||
flags.BackupPublicKeysFlag,
|
||||
flags.BackupPasswordFile,
|
||||
features.Mainnet,
|
||||
features.PraterTestnet,
|
||||
features.SepoliaTestnet,
|
||||
features.HoleskyTestnet,
|
||||
cmd.AcceptTosFlag,
|
||||
@@ -128,7 +125,6 @@ var Commands = &cli.Command{
|
||||
flags.AccountPasswordFileFlag,
|
||||
flags.ImportPrivateKeyFileFlag,
|
||||
features.Mainnet,
|
||||
features.PraterTestnet,
|
||||
features.SepoliaTestnet,
|
||||
features.HoleskyTestnet,
|
||||
cmd.AcceptTosFlag,
|
||||
@@ -171,7 +167,6 @@ var Commands = &cli.Command{
|
||||
flags.ForceExitFlag,
|
||||
flags.VoluntaryExitJSONOutputPath,
|
||||
features.Mainnet,
|
||||
features.PraterTestnet,
|
||||
features.SepoliaTestnet,
|
||||
features.HoleskyTestnet,
|
||||
cmd.AcceptTosFlag,
|
||||
|
||||
@@ -22,7 +22,6 @@ var Commands = &cli.Command{
|
||||
cmd.DataDirFlag,
|
||||
flags.SlashingProtectionExportDirFlag,
|
||||
features.Mainnet,
|
||||
features.PraterTestnet,
|
||||
features.SepoliaTestnet,
|
||||
features.HoleskyTestnet,
|
||||
features.EnableMinimalSlashingProtection,
|
||||
@@ -51,7 +50,6 @@ var Commands = &cli.Command{
|
||||
cmd.DataDirFlag,
|
||||
flags.SlashingProtectionJSONFileFlag,
|
||||
features.Mainnet,
|
||||
features.PraterTestnet,
|
||||
features.SepoliaTestnet,
|
||||
features.HoleskyTestnet,
|
||||
features.EnableMinimalSlashingProtection,
|
||||
|
||||
@@ -31,7 +31,6 @@ var Commands = &cli.Command{
|
||||
flags.Mnemonic25thWordFileFlag,
|
||||
flags.SkipMnemonic25thWordCheckFlag,
|
||||
features.Mainnet,
|
||||
features.PraterTestnet,
|
||||
features.SepoliaTestnet,
|
||||
features.HoleskyTestnet,
|
||||
cmd.AcceptTosFlag,
|
||||
@@ -63,7 +62,6 @@ var Commands = &cli.Command{
|
||||
flags.Mnemonic25thWordFileFlag,
|
||||
flags.SkipMnemonic25thWordCheckFlag,
|
||||
features.Mainnet,
|
||||
features.PraterTestnet,
|
||||
features.SepoliaTestnet,
|
||||
features.HoleskyTestnet,
|
||||
cmd.AcceptTosFlag,
|
||||
|
||||
@@ -123,14 +123,7 @@ func InitWithReset(c *Flags) func() {
|
||||
|
||||
// configureTestnet sets the config according to specified testnet flag
|
||||
func configureTestnet(ctx *cli.Context) error {
|
||||
if ctx.Bool(PraterTestnet.Name) {
|
||||
log.Info("Running on the Prater Testnet")
|
||||
if err := params.SetActive(params.PraterConfig().Copy()); err != nil {
|
||||
return err
|
||||
}
|
||||
applyPraterFeatureFlags(ctx)
|
||||
params.UsePraterNetworkConfig()
|
||||
} else if ctx.Bool(SepoliaTestnet.Name) {
|
||||
if ctx.Bool(SepoliaTestnet.Name) {
|
||||
log.Info("Running on the Sepolia Beacon Chain Testnet")
|
||||
if err := params.SetActive(params.SepoliaConfig().Copy()); err != nil {
|
||||
return err
|
||||
@@ -157,10 +150,6 @@ func configureTestnet(ctx *cli.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Insert feature flags within the function to be enabled for Prater testnet.
|
||||
func applyPraterFeatureFlags(ctx *cli.Context) {
|
||||
}
|
||||
|
||||
// Insert feature flags within the function to be enabled for Sepolia testnet.
|
||||
func applySepoliaFeatureFlags(ctx *cli.Context) {
|
||||
}
|
||||
|
||||
@@ -8,12 +8,6 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
// PraterTestnet flag for the multiclient Ethereum consensus testnet.
|
||||
PraterTestnet = &cli.BoolFlag{
|
||||
Name: "prater",
|
||||
Usage: "Runs Prysm configured for the Prater / Goerli test network.",
|
||||
Aliases: []string{"goerli"},
|
||||
}
|
||||
// SepoliaTestnet flag for the multiclient Ethereum consensus testnet.
|
||||
SepoliaTestnet = &cli.BoolFlag{
|
||||
Name: "sepolia",
|
||||
@@ -183,7 +177,6 @@ var devModeFlags = []cli.Flag{
|
||||
var ValidatorFlags = append(deprecatedFlags, []cli.Flag{
|
||||
writeWalletPasswordOnWebOnboarding,
|
||||
HoleskyTestnet,
|
||||
PraterTestnet,
|
||||
SepoliaTestnet,
|
||||
Mainnet,
|
||||
dynamicKeyReloadDebounceInterval,
|
||||
@@ -208,7 +201,6 @@ var BeaconChainFlags = append(deprecatedBeaconFlags, append(deprecatedFlags, []c
|
||||
saveInvalidBlobTempFlag,
|
||||
disableGRPCConnectionLogging,
|
||||
HoleskyTestnet,
|
||||
PraterTestnet,
|
||||
SepoliaTestnet,
|
||||
Mainnet,
|
||||
disablePeerScorer,
|
||||
@@ -239,7 +231,6 @@ var E2EBeaconChainFlags = []string{
|
||||
// NetworkFlags contains a list of network flags.
|
||||
var NetworkFlags = []cli.Flag{
|
||||
Mainnet,
|
||||
PraterTestnet,
|
||||
SepoliaTestnet,
|
||||
HoleskyTestnet,
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ go_library(
|
||||
"network_config.go",
|
||||
"testnet_e2e_config.go",
|
||||
"testnet_holesky_config.go",
|
||||
"testnet_prater_config.go",
|
||||
"testnet_sepolia_config.go",
|
||||
"testutils.go",
|
||||
"testutils_develop.go", # keep
|
||||
@@ -50,7 +49,6 @@ go_test(
|
||||
"mainnet_config_test.go",
|
||||
"testnet_config_test.go",
|
||||
"testnet_holesky_config_test.go",
|
||||
"testnet_prater_config_test.go",
|
||||
],
|
||||
data = glob(["*.yaml"]) + [
|
||||
"testdata/e2e_config.yaml",
|
||||
@@ -58,14 +56,12 @@ go_test(
|
||||
"@consensus_spec_tests_mainnet//:test_data",
|
||||
"@consensus_spec_tests_minimal//:test_data",
|
||||
"@eth2_networks//:configs",
|
||||
"@goerli_testnet//:configs",
|
||||
"@holesky_testnet//:configs",
|
||||
],
|
||||
embed = [":go_default_library"],
|
||||
gotags = ["develop"],
|
||||
tags = ["CI_race_detection"],
|
||||
deps = [
|
||||
"//build/bazel:go_default_library",
|
||||
"//consensus-types/primitives:go_default_library",
|
||||
"//encoding/bytesutil:go_default_library",
|
||||
"//io/file:go_default_library",
|
||||
|
||||
@@ -3,7 +3,6 @@ package params
|
||||
func init() {
|
||||
defaults := []*BeaconChainConfig{
|
||||
MainnetConfig(),
|
||||
PraterConfig(),
|
||||
MinimalSpecConfig(),
|
||||
E2ETestConfig(),
|
||||
E2EMainnetTestConfig(),
|
||||
|
||||
2
config/params/testdata/e2e_config.yaml
vendored
2
config/params/testdata/e2e_config.yaml
vendored
@@ -82,7 +82,7 @@ PROPOSER_SCORE_BOOST: 40
|
||||
|
||||
# Deposit contract
|
||||
# ---------------------------------------------------------------
|
||||
# Ethereum Goerli testnet
|
||||
# Testnet
|
||||
DEPOSIT_CHAIN_ID: 1337 # Override for e2e tests
|
||||
DEPOSIT_NETWORK_ID: 1337 # Override for e2e tests
|
||||
# Configured on a per testnet basis
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
package params
|
||||
|
||||
import (
|
||||
eth1Params "github.com/ethereum/go-ethereum/params"
|
||||
)
|
||||
|
||||
// UsePraterNetworkConfig uses the Prater specific
|
||||
// network config.
|
||||
func UsePraterNetworkConfig() {
|
||||
cfg := BeaconNetworkConfig().Copy()
|
||||
cfg.ContractDeploymentBlock = 4367322
|
||||
cfg.BootstrapNodes = []string{
|
||||
// Prysm's bootnode
|
||||
"enr:-Ku4QFmUkNp0g9bsLX2PfVeIyT-9WO-PZlrqZBNtEyofOOfLMScDjaTzGxIb1Ns9Wo5Pm_8nlq-SZwcQfTH2cgO-s88Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDkvpOTAAAQIP__________gmlkgnY0gmlwhBLf22SJc2VjcDI1NmsxoQLV_jMOIxKbjHFKgrkFvwDvpexo6Nd58TK5k7ss4Vt0IoN1ZHCCG1g",
|
||||
// Lighthouse's bootnode by Afri
|
||||
"enr:-LK4QH1xnjotgXwg25IDPjrqRGFnH1ScgNHA3dv1Z8xHCp4uP3N3Jjl_aYv_WIxQRdwZvSukzbwspXZ7JjpldyeVDzMCh2F0dG5ldHOIAAAAAAAAAACEZXRoMpB53wQoAAAQIP__________gmlkgnY0gmlwhIe1te-Jc2VjcDI1NmsxoQOkcGXqbCJYbcClZ3z5f6NWhX_1YPFRYRRWQpJjwSHpVIN0Y3CCIyiDdWRwgiMo",
|
||||
// Lighthouse's bootnode by Sigp
|
||||
"enr:-Ly4QFPk-cTMxZ3jWTafiNblEZkQIXGF2aVzCIGW0uHp6KaEAvBMoctE8S7YU0qZtuS7By0AA4YMfKoN9ls_GJRccVpFh2F0dG5ldHOI__________-EZXRoMpCC9KcrAgAQIIS2AQAAAAAAgmlkgnY0gmlwhKh3joWJc2VjcDI1NmsxoQKrxz8M1IHwJqRIpDqdVW_U1PeixMW5SfnBD-8idYIQrIhzeW5jbmV0cw-DdGNwgiMog3VkcIIjKA",
|
||||
"enr:-L64QJmwSDtaHVgGiqIxJWUtxWg6uLCipsms6j-8BdsOJfTWAs7CLF9HJnVqFE728O-JYUDCxzKvRdeMqBSauHVCMdaCAVWHYXR0bmV0c4j__________4RldGgykIL0pysCABAghLYBAAAAAACCaWSCdjSCaXCEQWxOdolzZWNwMjU2azGhA7Qmod9fK86WidPOzLsn5_8QyzL7ZcJ1Reca7RnD54vuiHN5bmNuZXRzD4N0Y3CCIyiDdWRwgiMo",
|
||||
// Teku's bootnode By Afri
|
||||
"enr:-KG4QCIzJZTY_fs_2vqWEatJL9RrtnPwDCv-jRBuO5FQ2qBrfJubWOWazri6s9HsyZdu-fRUfEzkebhf1nvO42_FVzwDhGV0aDKQed8EKAAAECD__________4JpZIJ2NIJpcISHtbYziXNlY3AyNTZrMaED4m9AqVs6F32rSCGsjtYcsyfQE2K8nDiGmocUY_iq-TSDdGNwgiMog3VkcIIjKA",
|
||||
}
|
||||
OverrideBeaconNetworkConfig(cfg)
|
||||
}
|
||||
|
||||
// PraterConfig defines the config for the
|
||||
// Prater testnet.
|
||||
func PraterConfig() *BeaconChainConfig {
|
||||
cfg := MainnetConfig().Copy()
|
||||
cfg.MinGenesisTime = 1614588812
|
||||
cfg.GenesisDelay = 1919188
|
||||
cfg.ConfigName = PraterName
|
||||
cfg.GenesisForkVersion = []byte{0x00, 0x00, 0x10, 0x20}
|
||||
cfg.SecondsPerETH1Block = 14
|
||||
cfg.DepositChainID = eth1Params.GoerliChainConfig.ChainID.Uint64()
|
||||
cfg.DepositNetworkID = eth1Params.GoerliChainConfig.ChainID.Uint64()
|
||||
cfg.AltairForkEpoch = 36660
|
||||
cfg.AltairForkVersion = []byte{0x1, 0x0, 0x10, 0x20}
|
||||
cfg.BellatrixForkEpoch = 112260
|
||||
cfg.BellatrixForkVersion = []byte{0x2, 0x0, 0x10, 0x20}
|
||||
cfg.CapellaForkEpoch = 162304
|
||||
cfg.CapellaForkVersion = []byte{0x3, 0x0, 0x10, 0x20}
|
||||
cfg.DenebForkEpoch = 231680 // 2024-01-17 06:32:00 (UTC)
|
||||
cfg.DenebForkVersion = []byte{0x4, 0x0, 0x10, 0x20}
|
||||
cfg.TerminalTotalDifficulty = "10790000"
|
||||
cfg.DepositContractAddress = "0xff50ed3d0ec03aC01D4C79aAd74928BFF48a7b2b"
|
||||
cfg.InitializeForkSchedule()
|
||||
return cfg
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package params_test
|
||||
|
||||
import (
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/v5/build/bazel"
|
||||
"github.com/prysmaticlabs/prysm/v5/config/params"
|
||||
"github.com/prysmaticlabs/prysm/v5/testing/require"
|
||||
)
|
||||
|
||||
func TestPraterConfigMatchesUpstreamYaml(t *testing.T) {
|
||||
presetFPs := presetsFilePath(t, "mainnet")
|
||||
mn, err := params.ByName(params.MainnetName)
|
||||
require.NoError(t, err)
|
||||
cfg := mn.Copy()
|
||||
for _, fp := range presetFPs {
|
||||
cfg, err = params.UnmarshalConfigFile(fp, cfg)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
fPath, err := bazel.Runfile("external/goerli_testnet")
|
||||
require.NoError(t, err)
|
||||
configFP := path.Join(fPath, "prater", "config.yaml")
|
||||
pcfg, err := params.UnmarshalConfigFile(configFP, nil)
|
||||
require.NoError(t, err)
|
||||
fields := fieldsFromYamls(t, append(presetFPs, configFP))
|
||||
assertYamlFieldsMatch(t, "prater", fields, pcfg, params.PraterConfig())
|
||||
}
|
||||
@@ -8,8 +8,6 @@ const (
|
||||
MainnetName = "mainnet"
|
||||
MainnetTestName = "mainnet-test"
|
||||
MinimalName = "minimal"
|
||||
PraterName = "prater"
|
||||
GoerliName = "goerli"
|
||||
SepoliaName = "sepolia"
|
||||
HoleskyName = "holesky"
|
||||
)
|
||||
|
||||
@@ -13,8 +13,8 @@ var urltests = []struct {
|
||||
maskedUrl string
|
||||
}{
|
||||
{"https://a:b@xyz.net", "https://***@xyz.net"},
|
||||
{"https://eth-goerli.alchemyapi.io/v2/tOZG5mjl3.zl_nZdZTNIBUzsDq62R_dkOtY",
|
||||
"https://eth-goerli.alchemyapi.io/***"},
|
||||
{"https://eth-holesky.alchemyapi.io/v2/tOZG5mjl3.zl_nZdZTNIBUzsDq62R_dkOtY",
|
||||
"https://eth-holesky.alchemyapi.io/***"},
|
||||
{"https://google.com/search?q=golang", "https://google.com/***"},
|
||||
{"https://user@example.com/foo%2fbar", "https://***@example.com/***"},
|
||||
{"http://john@example.com/#x/y%2Fz", "http://***@example.com/#***"},
|
||||
|
||||
@@ -30,7 +30,7 @@ var (
|
||||
|
||||
var (
|
||||
port = flag.Int("port", 9090, "Port to serve /metrics")
|
||||
web3URL = flag.String("web3-provider", "https://goerli.prylabs.net", "Web3 URL to access information about ETH1")
|
||||
web3URL = flag.String("web3-provider", "https://holesky.prylabs.net", "Web3 URL to access information about ETH1")
|
||||
prefix = flag.String("prefix", "", "Metrics prefix.")
|
||||
addressFilePath = flag.String("addresses", "", "File path to addresses text file.")
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ Flags:
|
||||
-beacon string
|
||||
gRPC address of the Prysm beacon node (default "127.0.0.1:4000")
|
||||
-genesis uint
|
||||
Genesis time. mainnet=1606824023, prater=1616508000 (default 1606824023)
|
||||
Genesis time. mainnet=1606824023, holesky=1695902400 (default 1606824023)
|
||||
```
|
||||
|
||||
Usage:
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
|
||||
var (
|
||||
beacon = flag.String("beacon", "127.0.0.1:4000", "gRPC address of the Prysm beacon node")
|
||||
genesis = flag.Uint64("genesis", 1606824023, "Genesis time. mainnet=1606824023, prater=1616508000")
|
||||
genesis = flag.Uint64("genesis", 1606824023, "Genesis time. mainnet=1606824023, holesky=1695902400")
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -209,14 +209,6 @@ var stateTransitionCommand = &cli.Command{
|
||||
Action: func(c *cli.Context) error {
|
||||
if network != "" {
|
||||
switch network {
|
||||
case params.PraterName:
|
||||
if err := params.SetActive(params.PraterConfig()); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
case params.GoerliName:
|
||||
if err := params.SetActive(params.PraterConfig()); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
case params.SepoliaName:
|
||||
if err := params.SetActive(params.SepoliaConfig()); err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
@@ -175,8 +175,6 @@ func formatBeaconChaURL(key []byte) string {
|
||||
keyWithout0x := hexutil.Encode(key)[2:]
|
||||
|
||||
switch env := params.BeaconConfig().ConfigName; env {
|
||||
case params.PraterName, params.GoerliName:
|
||||
return fmt.Sprintf(baseURL, "prater.", keyWithout0x)
|
||||
case params.HoleskyName:
|
||||
return fmt.Sprintf(baseURL, "holesky.", keyWithout0x)
|
||||
case params.SepoliaName:
|
||||
|
||||
@@ -24,14 +24,6 @@ func TestDisplayExitInfo(t *testing.T) {
|
||||
displayExitInfo([][]byte{key}, []string{string(key)})
|
||||
assert.LogsContain(t, logHook, "https://beaconcha.in/validator/3078313233343536")
|
||||
|
||||
params.BeaconConfig().ConfigName = params.GoerliName
|
||||
displayExitInfo([][]byte{key}, []string{string(key)})
|
||||
assert.LogsContain(t, logHook, "https://prater.beaconcha.in/validator/3078313233343536")
|
||||
|
||||
params.BeaconConfig().ConfigName = params.PraterName
|
||||
displayExitInfo([][]byte{key}, []string{string(key)})
|
||||
assert.LogsContain(t, logHook, "https://prater.beaconcha.in/validator/3078313233343536")
|
||||
|
||||
params.BeaconConfig().ConfigName = params.HoleskyName
|
||||
displayExitInfo([][]byte{key}, []string{string(key)})
|
||||
assert.LogsContain(t, logHook, "https://holesky.beaconcha.in/validator/3078313233343536")
|
||||
|
||||
Reference in New Issue
Block a user