Skip to content

Commit d561a3a

Browse files
authored
chore: add reth persistence and conditional rollkit init (#2330)
This PR adds two modifications on docker compose stacks : 1. **Reth block persistence**: Added flags to persist latest blocks on disk for better data durability 2. **Conditional rollkit initialization**: Added configuration condition to control rollkit initialization flow, to prevent issues on container restarts <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added new configuration options to Ethereum client services for enhanced customization. - **Chores** - Improved initialization logic to prevent redundant configuration setup when starting services. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 2a732cf commit d561a3a

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

apps/evm/single/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ services:
2626
--authrpc.jwtsecret /root/jwt/jwt.hex \
2727
--http --http.addr 0.0.0.0 --http.port 8545 \
2828
--http.api "eth,net,web3,txpool" \
29+
--engine.persistence-threshold 0 \
30+
--engine.memory-block-buffer-target 0 \
2931
--disable-discovery
3032
networks:
3133
- rollkit-network

apps/evm/single/entrypoint.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ cd /usr/bin
55

66
sleep 5
77

8-
./evm-single init --rollkit.node.aggregator=true --rollkit.signer.passphrase $EVM_SIGNER_PASSPHRASE
8+
# Create default rollkit config if missing
9+
if [ ! -f "$HOME/.evm-single/config/signer.json" ]; then
10+
./evm-single init --rollkit.node.aggregator=true --rollkit.signer.passphrase $EVM_SIGNER_PASSPHRASE
11+
fi
912

1013
# Conditionally add --rollkit.da.address if ROLLKIT_DA_ADDRESS is set
1114
da_flag=""
@@ -35,4 +38,4 @@ exec ./evm-single start \
3538
--rollkit.signer.passphrase $EVM_SIGNER_PASSPHRASE \
3639
$da_flag \
3740
$da_auth_token_flag \
38-
$da_namespace_flag
41+
$da_namespace_flag

execution/evm/docker/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ services:
4646
--authrpc.jwtsecret /root/jwt/jwt.hex \
4747
--http --http.addr 0.0.0.0 --http.port 8545 \
4848
--http.api "eth,net,web3,txpool" \
49+
--engine.persistence-threshold 0 \
50+
--engine.memory-block-buffer-target 0 \
4951
--disable-discovery \
5052
--txpool.pending-max-count 200000 \
5153
--txpool.pending-max-size 200 \

0 commit comments

Comments
 (0)