Add Goerli Deneb Fork Epoch (#13390)

* Add deneb fork epoch

* Fix test
This commit is contained in:
terence 2024-01-02 07:31:57 -08:00 committed by GitHub
parent 88685bb3bd
commit 1b6547de6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 12 deletions

View File

@ -322,6 +322,22 @@ filegroup(
url = "https://github.com/eth-clients/eth2-networks/archive/7b4897888cebef23801540236f73123e21774954.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 = """

View File

@ -58,12 +58,14 @@ 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",

View File

@ -1,7 +1,6 @@
package params_test
import (
"path"
"path/filepath"
"testing"
@ -12,13 +11,6 @@ import (
"github.com/prysmaticlabs/prysm/v4/testing/require"
)
func testnetConfigFilePath(t *testing.T, network string) string {
fPath, err := bazel.Runfile("external/eth2_networks")
require.NoError(t, err)
configFilePath := path.Join(fPath, "shared", network, "config.yaml")
return configFilePath
}
func TestE2EConfigParity(t *testing.T) {
params.SetupTestConfigCleanup(t)
testDir := bazel.TestTmpDir()

View File

@ -1,8 +1,6 @@
package params
import (
"math"
eth1Params "github.com/ethereum/go-ethereum/params"
)
@ -42,7 +40,7 @@ func PraterConfig() *BeaconChainConfig {
cfg.BellatrixForkVersion = []byte{0x2, 0x0, 0x10, 0x20}
cfg.CapellaForkEpoch = 162304
cfg.CapellaForkVersion = []byte{0x3, 0x0, 0x10, 0x20}
cfg.DenebForkEpoch = math.MaxUint64
cfg.DenebForkEpoch = 231680 // 2024-01-17 06:32:00 (UTC)
cfg.DenebForkVersion = []byte{0x4, 0x0, 0x10, 0x20}
cfg.TerminalTotalDifficulty = "10790000"
cfg.DepositContractAddress = "0xff50ed3d0ec03aC01D4C79aAd74928BFF48a7b2b"

View File

@ -1,8 +1,10 @@
package params_test
import (
"path"
"testing"
"github.com/prysmaticlabs/prysm/v4/build/bazel"
"github.com/prysmaticlabs/prysm/v4/config/params"
"github.com/prysmaticlabs/prysm/v4/testing/require"
)
@ -16,7 +18,9 @@ func TestPraterConfigMatchesUpstreamYaml(t *testing.T) {
cfg, err = params.UnmarshalConfigFile(fp, cfg)
require.NoError(t, err)
}
configFP := testnetConfigFilePath(t, "prater")
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))