From aa04d45335c649c346eb84a269531b560bc4a550 Mon Sep 17 00:00:00 2001 From: tersec Date: Wed, 29 Mar 2023 08:37:14 +0000 Subject: [PATCH] use canonical, standalone sepolia network definition repository (#4762) --- .gitmodules | 7 +++---- beacon_chain/networking/network_metadata.nim | 11 ++++------- vendor/merge-testnets | 1 - vendor/sepolia | 1 + 4 files changed, 8 insertions(+), 12 deletions(-) delete mode 160000 vendor/merge-testnets create mode 160000 vendor/sepolia diff --git a/.gitmodules b/.gitmodules index 9145748b5..12ccc7ee3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -193,16 +193,15 @@ url = https://github.com/status-im/nim-toml-serialization.git ignore = untracked branch = master -[submodule "vendor/merge-testnets"] - path = vendor/merge-testnets - url = https://github.com/eth-clients/merge-testnets.git - branch = main [submodule "vendor/gnosis-chain-configs"] path = vendor/gnosis-chain-configs url = https://github.com/gnosischain/configs.git [submodule "vendor/withdrawals-testnets"] path = vendor/withdrawals-testnets url = https://github.com/ethpandaops/withdrawals-testnet.git +[submodule "vendor/sepolia"] + path = vendor/sepolia + url = https://github.com/eth-clients/sepolia.git [submodule "vendor/nim-kzg4844"] path = vendor/nim-kzg4844 url = https://github.com/status-im/nim-kzg4844/ diff --git a/beacon_chain/networking/network_metadata.nim b/beacon_chain/networking/network_metadata.nim index c18e80187..6efcaf870 100644 --- a/beacon_chain/networking/network_metadata.nim +++ b/beacon_chain/networking/network_metadata.nim @@ -77,7 +77,7 @@ type const eth2NetworksDir = currentSourcePath.parentDir.replace('\\', '/') & "/../../vendor/eth2-networks" - mergeTestnetsDir = currentSourcePath.parentDir.replace('\\', '/') & "/../../vendor/merge-testnets" + sepoliaDir = currentSourcePath.parentDir.replace('\\', '/') & "/../../vendor/sepolia" proc readBootstrapNodes*(path: string): seq[string] {.raises: [IOError, Defect].} = # Read a list of ENR values from a YAML file containing a flat list of entries @@ -205,10 +205,6 @@ template eth2Network(path: string, eth1Network: Eth1Network): Eth2NetworkMetadat loadCompileTimeNetworkMetadata(eth2NetworksDir & "/" & path, some eth1Network) -template mergeTestnet(path: string, eth1Network: Eth1Network): Eth2NetworkMetadata = - loadCompileTimeNetworkMetadata(mergeTestnetsDir & "/" & path, - some eth1Network) - when const_preset == "gnosis": const gnosisMetadata* = loadCompileTimeNetworkMetadata( @@ -223,12 +219,13 @@ elif const_preset == "mainnet": const mainnetMetadata* = eth2Network("shared/mainnet", mainnet) praterMetadata* = eth2Network("shared/prater", goerli) - sepoliaMetadata* = mergeTestnet("sepolia", sepolia) + sepoliaMetadata* = + loadCompileTimeNetworkMetadata(sepoliaDir & "/bepolia", some sepolia) static: for network in [mainnetMetadata, praterMetadata, sepoliaMetadata]: checkForkConsistency(network.cfg) - for network in [mainnetMetadata, praterMetadata]: + for network in [mainnetMetadata, praterMetadata, sepoliaMetaData]: doAssert network.cfg.DENEB_FORK_EPOCH == FAR_FUTURE_EPOCH proc getMetadataForNetwork*( diff --git a/vendor/merge-testnets b/vendor/merge-testnets deleted file mode 160000 index baebfaba3..000000000 --- a/vendor/merge-testnets +++ /dev/null @@ -1 +0,0 @@ -Subproject commit baebfaba3c0dcb8b6e4d5113e52fd6981253a152 diff --git a/vendor/sepolia b/vendor/sepolia new file mode 160000 index 000000000..23dbdd707 --- /dev/null +++ b/vendor/sepolia @@ -0,0 +1 @@ +Subproject commit 23dbdd7077fa0abdd7c8f29862a2f8883151d144