Add comments.

Former-commit-id: a3a60b76959056ba9cc40f0de3a8bd9a2ee2e17e
This commit is contained in:
Thomas E Lackey 2023-01-30 11:23:45 -06:00
parent c0455e3e0b
commit 2e5eee0223

View File

@ -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