From f3fc551ea7ff31ff743a18c3c33fd035559c9caa Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Mon, 15 Mar 2021 21:49:53 +0200 Subject: [PATCH] Support for the prater testnet --- Makefile | 33 +++++++++++++++++++- beacon_chain/networking/network_metadata.nim | 3 ++ run-prater-beacon-node.sh | 13 ++++++++ vendor/eth2-testnets | 2 +- 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100755 run-prater-beacon-node.sh diff --git a/Makefile b/Makefile index 4c0d55722..aad09665a 100644 --- a/Makefile +++ b/Makefile @@ -426,7 +426,7 @@ define CLEAN_NETWORK endef ### -### pyrmont +### Pyrmont ### pyrmont-build: | nimbus_beacon_node nimbus_signing_process @@ -451,6 +451,37 @@ pyrmont-dev-deposit: | pyrmont-build deposit_contract clean-pyrmont: $(call CLEAN_NETWORK,pyrmont) + +### +### Prater +### +prater-build: | nimbus_beacon_node nimbus_signing_process + +# https://www.gnu.org/software/make/manual/html_node/Call-Function.html#Call-Function +prater: | prater-build + $(call CONNECT_TO_NETWORK,prater,nimbus_beacon_node) + +prater-vc: | prater-build nimbus_validator_client + $(call CONNECT_TO_NETWORK_WITH_VALIDATOR_CLIENT,prater,nimbus_beacon_node) + +ifneq ($(LOG_LEVEL), TRACE) +prater-dev: + + "$(MAKE)" LOG_LEVEL=TRACE $@ +else +prater-dev: | prater-build + $(call CONNECT_TO_NETWORK_IN_DEV_MODE,prater,nimbus_beacon_node) +endif + +prater-dev-deposit: | prater-build deposit_contract + $(call MAKE_DEPOSIT,prater) + +clean-prater: + $(call CLEAN_NETWORK,prater) + +### +### Other +### + ctail: | build deps mkdir -p vendor/.nimble/bin/ + $(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ctail c vendor/nim-chronicles-tail/ctail.nim diff --git a/beacon_chain/networking/network_metadata.nim b/beacon_chain/networking/network_metadata.nim index 7f88ce0d3..6b0058931 100644 --- a/beacon_chain/networking/network_metadata.nim +++ b/beacon_chain/networking/network_metadata.nim @@ -194,6 +194,7 @@ template eth2testnet(path: string): Eth2NetworkMetadata = const pyrmontMetadata* = eth2testnet "shared/pyrmont" + praterMetadata* = eth2testnet "shared/prater" {.pop.} # the following pocedures raise more than just `Defect` @@ -204,6 +205,8 @@ proc getMetadataForNetwork*(networkName: string): Eth2NetworkMetadata = mainnetMetadata of "pyrmont": pyrmontMetadata + of "prater": + praterMetadata else: if fileExists(networkName): try: diff --git a/run-prater-beacon-node.sh b/run-prater-beacon-node.sh new file mode 100755 index 000000000..bf89f8d9a --- /dev/null +++ b/run-prater-beacon-node.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Copyright (c) 2020-2021 Status Research & Development GmbH. Licensed under +# either of: +# - Apache License, version 2.0 +# - MIT license +# at your option. This file may not be copied, modified, or distributed except +# according to those terms. + +cd "$(dirname $0)" +# Allow the binary to receive signals directly. +exec scripts/run-beacon-node.sh nimbus_beacon_node prater $@ + diff --git a/vendor/eth2-testnets b/vendor/eth2-testnets index 3b441ff70..192c1b48e 160000 --- a/vendor/eth2-testnets +++ b/vendor/eth2-testnets @@ -1 +1 @@ -Subproject commit 3b441ff70700a85840ce082a3a5af373946348ab +Subproject commit 192c1b48ea5ff4adb4e6ef7d2a9e5f82fb5ffd72