Skip to content

Commit

Permalink
Add mainnet merge epoch and ttd (#11207)
Browse files Browse the repository at this point in the history
* Add tentative mainnet merge epoch and ttd

* Update minimal

* Update commit

* Update WORKSPACE

* Update spec tests

* Add eip4844 place holders

* Skip lightclient types

* Skip lightclient types

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
  • Loading branch information
terencechain and prylabs-bulldozer[bot] authored Aug 17, 2022
1 parent b04c28b commit dfa400d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
16 changes: 8 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ filegroup(
url = "https://github.com/eth-clients/slashing-protection-interchange-tests/archive/b8413ca42dc92308019d0d4db52c87e9e125c4e9.tar.gz",
)

consensus_spec_version = "v1.2.0-rc.1"
consensus_spec_version = "v1.2.0-rc.2"

bls_test_version = "v0.1.1"

Expand All @@ -231,7 +231,7 @@ filegroup(
visibility = ["//visibility:public"],
)
""",
sha256 = "9c93f87378aaa6d6fe1c67b396eac2aacc9594af2a83f028cb99c95dea5b81df",
sha256 = "eff52923eebbed6e37a5282db5290abe67c68d6aa54302e3db2b0718c3edf867",
url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/general.tar.gz" % consensus_spec_version,
)

Expand All @@ -247,7 +247,7 @@ filegroup(
visibility = ["//visibility:public"],
)
""",
sha256 = "52f2c52415228cee8a4de5a09abff785f439a77dfef8f03e834e4e16857673c1",
sha256 = "6183d39d40ae659347e8bcfa435cbbe6de8c19ab327b61d47f906bb087bc7a67",
url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/minimal.tar.gz" % consensus_spec_version,
)

Expand All @@ -263,7 +263,7 @@ filegroup(
visibility = ["//visibility:public"],
)
""",
sha256 = "022dcc0d6de7dd27b337a0d1b945077eaf5ee47000700395a693fc25e12f96df",
sha256 = "894d16608d7d37a8f6206165e6c2b6ffcc45b13152b5f411e9283b005ca9793f",
url = "https://github.com/ethereum/consensus-spec-tests/releases/download/%s/mainnet.tar.gz" % consensus_spec_version,
)

Expand All @@ -278,7 +278,7 @@ filegroup(
visibility = ["//visibility:public"],
)
""",
sha256 = "0a9c110305cbd6ebbe0d942f0f33e6ce22dd484ce4ceed277bf185a091941cde",
sha256 = "006674e5d7eee613f1155e154ab97f6b57589ec92e6e3e5f7affd2b53581e907",
strip_prefix = "consensus-specs-" + consensus_spec_version[1:],
url = "https://github.com/ethereum/consensus-specs/archive/refs/tags/%s.tar.gz" % consensus_spec_version,
)
Expand Down Expand Up @@ -309,9 +309,9 @@ filegroup(
visibility = ["//visibility:public"],
)
""",
sha256 = "126b615e3853e29b61f082f6c89c8bc1c38cd92fb84b0004396fc49e7acc8d9f",
strip_prefix = "eth2-networks-f3ccbe0cf5798d5cd23e4e6e7119aefa043c0935",
url = "https://github.com/eth-clients/eth2-networks/archive/f3ccbe0cf5798d5cd23e4e6e7119aefa043c0935.tar.gz",
sha256 = "82b01a48b143fe0f2fb7fb5f5dd385c1f934335a12d7954f08b1d45d77427b5e",
strip_prefix = "eth2-networks-674f7a1d01d9c18345456eab76e3871b3df2126b",
url = "https://github.com/eth-clients/eth2-networks/archive/674f7a1d01d9c18345456eab76e3871b3df2126b.tar.gz",
)

http_archive(
Expand Down
2 changes: 1 addition & 1 deletion config/params/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"gopkg.in/yaml.v2"
)

var placeholderFields = []string{"UPDATE_TIMEOUT", "INTERVALS_PER_SLOT"}
var placeholderFields = []string{"UPDATE_TIMEOUT", "INTERVALS_PER_SLOT", "EIP4844_FORK_EPOCH", "EIP4844_FORK_VERSION"}

func TestLoadConfigFile(t *testing.T) {
// See https://media.githubusercontent.com/media/ethereum/consensus-spec-tests/master/tests/minimal/config/phase0.yaml
Expand Down
6 changes: 3 additions & 3 deletions config/params/mainnet_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const (
genesisForkEpoch = 0
// Altair Fork Epoch for mainnet config.
mainnetAltairForkEpoch = 74240 // Oct 27, 2021, 10:56:23am UTC
// Placeholder for the merge epoch until it is decided
mainnetBellatrixForkEpoch = math.MaxUint64
// Bellatrix Fork Epoch for mainnet config.
mainnetBellatrixForkEpoch = 144896 // Sept 6, 2022, 11:34:47am UTC
)

var mainnetNetworkConfig = &NetworkConfig{
Expand Down Expand Up @@ -248,7 +248,7 @@ var mainnetBeaconConfig = &BeaconChainConfig{
// Bellatrix
TerminalBlockHashActivationEpoch: 18446744073709551615,
TerminalBlockHash: [32]byte{},
TerminalTotalDifficulty: "115792089237316195423570985008687907853269984665640564039457584007913129638912",
TerminalTotalDifficulty: "58750000000000000000000", // Estimated: Sept 15, 2022
EthBurnAddressHex: "0x0000000000000000000000000000000000000000",
DefaultBuilderGasLimit: uint64(30000000),

Expand Down
2 changes: 2 additions & 0 deletions config/params/minimal_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ func MinimalSpecConfig() *BeaconChainConfig {
minimalConfig.DepositChainID = 5 // Chain ID of eth1 goerli.
minimalConfig.DepositNetworkID = 5 // Network ID of eth1 goerli.
minimalConfig.DepositContractAddress = "0x1234567890123456789012345678901234567890"
// 2**256-2**10 for fake minimal network
minimalConfig.TerminalTotalDifficulty = "115792089237316195423570985008687907853269984665640564039457584007913129638912"

minimalConfig.ConfigName = MinimalName
minimalConfig.PresetBase = "minimal"
Expand Down
9 changes: 9 additions & 0 deletions testing/spectest/shared/altair/ssz_static/ssz_static.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
obj = &ethpb.SyncAggregatorSelectionData{}
case "SyncCommittee":
obj = &ethpb.SyncCommittee{}
case "LightClientOptimisticUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
case "LightClientFinalityUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
case "LightClientBootstrap":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
case "LightClientSnapshot":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
Expand Down
9 changes: 9 additions & 0 deletions testing/spectest/shared/bellatrix/ssz_static/ssz_static.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ func unmarshalledSSZ(t *testing.T, serializedBytes []byte, folderName string) (i
obj = &ethpb.SyncAggregatorSelectionData{}
case "SyncCommittee":
obj = &ethpb.SyncCommittee{}
case "LightClientOptimisticUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
case "LightClientFinalityUpdate":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
case "LightClientBootstrap":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
case "LightClientSnapshot":
t.Skip("not a beacon node type, this is a light node type")
return nil, nil
Expand Down

0 comments on commit dfa400d

Please sign in to comment.