From c201ba1437f2925438db7b045211d8ff07dfaa79 Mon Sep 17 00:00:00 2001 From: sveitser Date: Fri, 1 Mar 2024 15:46:15 +0100 Subject: [PATCH] Enable post-merge dev mode - Enables querying "finalized" blocks. - Update geth. The post merge dev mode doesn't seem very well documented. It was added in this PR: https://github.com/ethereum/go-ethereum/pull/28463 To get a working genesis block, this workaround is needed - geth --datadir /path/to/data --dev - shut down geth - geth --datadir /path/to/data dumpgenesis Close #12 --- Dockerfile.l1 | 4 ++-- config/genesis-staging.json | 9 +++++---- entrypoint-l1.sh | 2 ++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile.l1 b/Dockerfile.l1 index cc1018b..9b36068 100644 --- a/Dockerfile.l1 +++ b/Dockerfile.l1 @@ -1,4 +1,4 @@ -FROM ethereum/client-go:v1.13.0 +FROM ethereum/client-go:v1.13.14 RUN apk add --no-cache jq curl @@ -6,6 +6,6 @@ COPY entrypoint-l1.sh /entrypoint.sh VOLUME ["/db"] -HEALTHCHECK --start-period=300s --start-interval=1s CMD curl --fail http://localhost:8545 -X POST -H "Content-Type: application/json" --data '{"method":"eth_chainId","params":[],"id":1,"jsonrpc":"2.0"}' +# HEALTHCHECK --start-period=300s --start-interval=1s CMD curl --fail http://localhost:8545 -X POST -H "Content-Type: application/json" --data '{"method":"eth_chainId","params":[],"id":1,"jsonrpc":"2.0"}' ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] diff --git a/config/genesis-staging.json b/config/genesis-staging.json index 8888d21..13138a9 100755 --- a/config/genesis-staging.json +++ b/config/genesis-staging.json @@ -14,10 +14,11 @@ "londonBlock": 0, "arrowGlacierBlock": 0, "grayGlacierBlock": 0, - "clique": { - "period": 12, - "epoch": 30000 - } + "shanghaiBlock": 0, + "shanghaiTime": 0, + "terminalTotalDifficulty": 0, + "terminalTotalDifficultyPassed": true, + "isDev": true }, "nonce": "0x0", "timestamp": "0x6511b40b", diff --git a/entrypoint-l1.sh b/entrypoint-l1.sh index 4057600..9d9918a 100644 --- a/entrypoint-l1.sh +++ b/entrypoint-l1.sh @@ -38,6 +38,8 @@ fi # pruned within minutes of starting the devnet. exec geth \ + --dev \ + --dev.period=12 \ --datadir="$GETH_DATA_DIR" \ --verbosity="$VERBOSITY" \ --http \