From 2e5eee022393fcfa0d54f079ef5eebb821191371 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 30 Jan 2023 11:23:45 -0600 Subject: [PATCH] Add comments. Former-commit-id: a3a60b76959056ba9cc40f0de3a8bd9a2ee2e17e --- app/data/container-build/cerc-datanet-eth-geth/build.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/data/container-build/cerc-datanet-eth-geth/build.sh b/app/data/container-build/cerc-datanet-eth-geth/build.sh index 02c7031f..19820938 100755 --- a/app/data/container-build/cerc-datanet-eth-geth/build.sh +++ b/app/data/container-build/cerc-datanet-eth-geth/build.sh @@ -6,10 +6,17 @@ set -e SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +# Make sure the "build" directory is empty. rm -rf $SCRIPT_DIR/build + +# Copy the fixture-net scripts and config. cp -rp $SCRIPT_DIR/../cerc-fixturenet-eth-geth $SCRIPT_DIR/build -sed -i '' 's/^terminal_total_difficulty.*$/capped_maximum_difficulty: 1/' $SCRIPT_DIR/build/genesis/el/el-config.yaml +# Then remove terminal_total_difficulty and replace it with capped_maximum_difficulty. +# This has two effects: +# (1) Disables the Merge (so all we need is geth, not lighthouse). +# (2) Maintains a fast block rate, since the difficulty will never exceed the capped value. +sed -i '' 's/^terminal_total_difficulty:.*$/capped_maximum_difficulty: 1/' $SCRIPT_DIR/build/genesis/el/el-config.yaml docker build -t cerc/datanet-eth-geth:local ${SCRIPT_DIR}/build