Skip to content

Commit

Permalink
Enable post-merge dev mode
Browse files Browse the repository at this point in the history
- Enables querying "finalized" blocks.
- Update geth.

The post merge dev mode doesn't seem very well documented.

It was added in this PR:

ethereum/go-ethereum#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
  • Loading branch information
sveitser committed Mar 1, 2024
1 parent 5e61d9c commit c201ba1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.l1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM ethereum/client-go:v1.13.0
FROM ethereum/client-go:v1.13.14

RUN apk add --no-cache jq curl

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"]
9 changes: 5 additions & 4 deletions config/genesis-staging.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions entrypoint-l1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit c201ba1

Please sign in to comment.