Skip to content

Commit 11ce70e

Browse files
authored
Merge pull request #529 from EspressoSystems/li/keymanager-address
Add support for decentralized batch posting
2 parents 9b5cc28 + 3780dd2 commit 11ce70e

33 files changed

+132
-30
lines changed

docker-compose.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ services:
5454
- timeboost
5555
rollup-creator:
5656
pid: host
57-
image: ghcr.io/espressosystems/timeboost/rollup-creator:rollup-creator-round2
57+
image: ghcr.io/espressosystems/timeboost/rollup-creator:pr-529
5858
volumes:
5959
- "config:/config"
6060
environment:
@@ -90,8 +90,10 @@ services:
9090
/app/mkconfig -n 4 --committee-id 0 \
9191
--bind "node:8000" \
9292
--bind-mode "docker-dns" \
93+
--seed 42 \
9394
--nitro "nitro:55000" \
9495
--nitro-mode "docker-dns" \
96+
--batch-poster-api "http://host.docker.internal:8547" \
9597
--chain-namespace 412346 \
9698
--parent-rpc-url "http://demo-l1-network:8545" \
9799
--parent-ws-url "ws://demo-l1-network:8546" \
@@ -125,7 +127,7 @@ services:
125127
condition: service_completed_successfully
126128
nitro0:
127129
pid: host
128-
image: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node:feat-timeboost-integration-3-6-7
130+
image: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node:li-sequencer-catchup
129131
entrypoint: /usr/local/bin/nitro
130132
ports:
131133
- "127.0.0.1:8547:8547"
@@ -141,13 +143,14 @@ services:
141143
- --conf.file=/nitro-config/sequencer_config.json
142144
- --node.feed.output.enable
143145
- --node.feed.output.port=9642
144-
- --http.api=net,web3,eth,txpool,debug,timeboost,auctioneer
146+
- --http.api=net,web3,eth,txpool,debug,timeboost,auctioneer,batcher
145147
- --node.seq-coordinator.my-url=http://nitro0:8547
146148
- --graphql.enable
147149
- --graphql.vhosts=*
148150
- --graphql.corsdomain=*
149151
- --node.decentralized-timeboost-sequencer.block-retry-duration=0s
150152
- --node.decentralized-timeboost-sequencer.decentralized-timeboost-bridge-config.internal-timeboost-grpc-url=node0:8003
153+
- --node.batch-poster.parent-chain-wallet.private-key=2837b8532d9be65995b377eae666b386143f1f211999a05444d395203640ef0f
151154
networks:
152155
- timeboost
153156
depends_on:
@@ -172,11 +175,11 @@ services:
172175
retries: 12
173176
nitro1:
174177
pid: host
175-
image: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node:feat-timeboost-integration-3-6-7
178+
image: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node:li-sequencer-catchup
176179
entrypoint: /usr/local/bin/nitro
177180
ports:
178-
- "127.0.0.1:8647:8547"
179-
- "127.0.0.1:8648:8548"
181+
- "127.0.0.1:8557:8547"
182+
- "127.0.0.1:8558:8548"
180183
- "127.0.0.1:9742:9642"
181184
- "127.0.0.1:55010:55000"
182185
volumes:
@@ -187,9 +190,10 @@ services:
187190
command:
188191
- --conf.file=/nitro-config/sequencer_config.json
189192
- --node.seq-coordinator.my-url=http://nitro1:8547
190-
- --http.api=net,web3,eth,txpool,debug,timeboost,auctioneer
193+
- --http.api=net,web3,eth,txpool,debug,timeboost,auctioneer,batcher
191194
- --node.decentralized-timeboost-sequencer.block-retry-duration=0s
192195
- --node.decentralized-timeboost-sequencer.decentralized-timeboost-bridge-config.internal-timeboost-grpc-url=node1:8003
196+
- --node.batch-poster.parent-chain-wallet.private-key=d785ccfe237647fca51042e2083e085ec29201d5a39f5a61f0da5cab315799ac
193197
networks:
194198
- timeboost
195199
depends_on:
@@ -214,11 +218,11 @@ services:
214218
retries: 12
215219
nitro2:
216220
pid: host
217-
image: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node:feat-timeboost-integration-3-6-7
221+
image: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node:li-sequencer-catchup
218222
entrypoint: /usr/local/bin/nitro
219223
ports:
220-
- "127.0.0.1:8747:8547"
221-
- "127.0.0.1:8748:8548"
224+
- "127.0.0.1:8567:8547"
225+
- "127.0.0.1:8568:8548"
222226
- "127.0.0.1:9842:9642"
223227
- "127.0.0.1:55020:55000"
224228
volumes:
@@ -229,9 +233,10 @@ services:
229233
command:
230234
- --conf.file=/nitro-config/sequencer_config.json
231235
- --node.seq-coordinator.my-url=http://nitro2:8547
232-
- --http.api=net,web3,eth,txpool,debug,timeboost,auctioneer
236+
- --http.api=net,web3,eth,txpool,debug,timeboost,auctioneer,batcher
233237
- --node.decentralized-timeboost-sequencer.block-retry-duration=0s
234238
- --node.decentralized-timeboost-sequencer.decentralized-timeboost-bridge-config.internal-timeboost-grpc-url=node2:8003
239+
- --node.batch-poster.parent-chain-wallet.private-key=1d55854a220011ecdf322f44a14e9f9961fa2f8f4e37587ef7645ccda713507f
235240
networks:
236241
- timeboost
237242
depends_on:
@@ -256,11 +261,11 @@ services:
256261
retries: 12
257262
nitro3:
258263
pid: host
259-
image: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node:feat-timeboost-integration-3-6-7
264+
image: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node:li-sequencer-catchup
260265
entrypoint: /usr/local/bin/nitro
261266
ports:
262-
- "127.0.0.1:8847:8547"
263-
- "127.0.0.1:8848:8548"
267+
- "127.0.0.1:8577:8547"
268+
- "127.0.0.1:8578:8548"
264269
- "127.0.0.1:9942:9642"
265270
- "127.0.0.1:55030:55000"
266271
volumes:
@@ -271,9 +276,10 @@ services:
271276
command:
272277
- --conf.file=/nitro-config/sequencer_config.json
273278
- --node.seq-coordinator.my-url=http://nitro3:8547
274-
- --http.api=net,web3,eth,txpool,debug,timeboost,auctioneer
279+
- --http.api=net,web3,eth,txpool,debug,timeboost,auctioneer,batcher
275280
- --node.decentralized-timeboost-sequencer.block-retry-duration=0s
276281
- --node.decentralized-timeboost-sequencer.decentralized-timeboost-bridge-config.internal-timeboost-grpc-url=node3:8003
282+
- --node.batch-poster.parent-chain-wallet.private-key=aa913b27299e7ae7c3fe9ff721faa9d2ba436257a253e1f823940d5effd25ea1
277283
networks:
278284
- timeboost
279285
depends_on:
@@ -506,6 +512,8 @@ services:
506512
- http://nitro0:8547
507513
- --max-nodes
508514
- "4"
515+
- --tps
516+
- '1'
509517
volumes:
510518
- "config:/config"
511519
environment:

docker/rollupcreator.Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
FROM node:20-bookworm-slim
22
RUN apt-get update && \
33
apt-get install -y git docker.io python3 make gcc g++ curl jq
4-
ARG NITRO_CONTRACTS_BRANCH=main
54
WORKDIR /workspace
6-
RUN git clone --no-checkout https://github.com/OffchainLabs/nitro-contracts.git ./
7-
RUN git checkout ${NITRO_CONTRACTS_BRANCH}
5+
RUN git clone --no-checkout https://github.com/EspressoSystems/nitro-contracts.git ./
6+
RUN git checkout li/timeboost-legacy
87
RUN git submodule update --init --recursive
98
RUN yarn install && yarn cache clean
109
RUN curl -L https://foundry.paradigm.xyz | bash

justfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ mkconfig NUM_NODES DATETIME *ARGS:
102102
--chain-namespace 10101 \
103103
--parent-rpc-url "http://127.0.0.1:8545" \
104104
--parent-ws-url "ws://127.0.0.1:8545" \
105+
--batch-poster-api "127.0.0.1:8547" \
105106
--parent-chain-id 31337 \
106107
--parent-ibox-contract "0xa0f3a1a4e2b2bcb7b48c8527c28098f207572ec1" \
107108
--key-manager-contract "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35" \
@@ -136,6 +137,7 @@ mkconfig-linux NUM_NODES DATETIME *ARGS:
136137
-n {{NUM_NODES}} \
137138
--committee-id 0 \
138139
--bind "11.0.0.1:8000" \
140+
--batch-poster-api "127.0.0.1:8547" \
139141
--bind-mode "increment-address" \
140142
--nitro "11.0.1.0:55000" \
141143
--nitro-mode "unchanged" \
@@ -205,6 +207,7 @@ test-dyn-comm: build-release-until build-test-utils
205207
--run "5:target/release/mkconfig -n 4 \
206208
--committee-id 1 \
207209
--bind 127.0.0.1:9000 \
210+
--batch-poster-api "127.0.0.1:8547" \
208211
--chain-namespace 10101 \
209212
--parent-rpc-url http://127.0.0.1:8545 \
210213
--parent-ws-url ws://127.0.0.1:8545 \

nitro-config/sequencer_config.json

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@
4141
"enable": false
4242
},
4343
"decentralized-timeboost-sequencer": {
44-
"enable": true
44+
"enable": true,
45+
"hotshot-urls": [
46+
"http://espresso-dev-node:41000",
47+
"http://espresso-dev-node:41000"
48+
]
4549
},
4650
"decentralized-timeboost-delayed-sequencer": {
4751
"enable": true
@@ -57,20 +61,24 @@
5761
"update-interval": "3s"
5862
},
5963
"batch-poster": {
60-
"enable": false,
61-
"redis-url": "redis://redis:6379",
62-
"max-delay": "30s",
64+
"enable": true,
65+
"max-delay": "1m",
6366
"l1-block-bound": "ignore",
64-
"parent-chain-wallet": {
65-
"account": "0xe2148eE53c0755215Df69b2616E552154EdC584f",
66-
"password": "passphrase",
67-
"pathname": "/home/user/l1keystore"
68-
},
6967
"data-poster": {
7068
"redis-signer": {
7169
"signing-key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
7270
},
7371
"wait-for-l1-finality": false
72+
},
73+
"hotshot-urls": [
74+
"http://espresso-dev-node:41000",
75+
"http://espresso-dev-node:41000"
76+
],
77+
"poll-interval": "60s",
78+
"is-decentralized-timeboost": true,
79+
"decentralized-timeboost-key-management-address": "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35",
80+
"decentralized-timeboost-batch-verifier": {
81+
"wait-for-leader-delay": "5m"
7482
}
7583
},
7684
"block-validator": {

test-configs/c0/committee.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ dkg_enc_key = "7PdmfTS45d2hTXB8NcrTmvDwUVBimpYBbrBaGnu3i5Ne65krVfUpbe7bYRHS3AEg7
99
address = "127.0.0.1:8000"
1010
http_api = "127.0.0.1:8004"
1111
grpc_api = "127.0.0.1:8003"
12+
batch_poster_api = "127.0.0.1:8547"
13+
sig_key_address = "0x647ff873518108c6ae1e3b310bb6d68c72d369ab"
1214

1315
[[members]]
1416
node = "node_1"
@@ -18,6 +20,8 @@ dkg_enc_key = "7p1BtEz7WnFMt6Hr28X3Rngqza6i8hRoswhzZRFd6GzgkspLKHBfDocHP8DwzXiNi
1820
address = "127.0.0.1:8010"
1921
http_api = "127.0.0.1:8014"
2022
grpc_api = "127.0.0.1:8013"
23+
batch_poster_api = "127.0.0.1:8557"
24+
sig_key_address = "0xd3ab3e193f9c438100f6aefa164a214b5be55379"
2125

2226
[[members]]
2327
node = "node_2"
@@ -27,6 +31,8 @@ dkg_enc_key = "62bnAAbU58zZUcGqy9JKGZRZHkm3g7JZB2DtJGQyChXQBPGvXSS6fF21yoxiVuD1e
2731
address = "127.0.0.1:8020"
2832
http_api = "127.0.0.1:8024"
2933
grpc_api = "127.0.0.1:8023"
34+
batch_poster_api = "127.0.0.1:8567"
35+
sig_key_address = "0x92be0a723a8cf1c2e74c5c5ebd57625fd7b26bc5"
3036

3137
[[members]]
3238
node = "node_3"
@@ -36,6 +42,8 @@ dkg_enc_key = "7aZBFZUEbXxFH9SiGJeUyjzas4mYJ1R13mTPsPeawVU7JFuocfvX9XsRT8qgr17RC
3642
address = "127.0.0.1:8030"
3743
http_api = "127.0.0.1:8034"
3844
grpc_api = "127.0.0.1:8033"
45+
batch_poster_api = "127.0.0.1:8577"
46+
sig_key_address = "0xa064549353fafd38f1000627acc581c9354b1cbe"
3947

4048
[[members]]
4149
node = "node_4"
@@ -45,3 +53,5 @@ dkg_enc_key = "6R69TzDg3jo1MTex9Uter9XQud458YPpSvXirkYdS295PV81CRvgz5jVWQbkCpZnY
4553
address = "127.0.0.1:8040"
4654
http_api = "127.0.0.1:8044"
4755
grpc_api = "127.0.0.1:8043"
56+
batch_poster_api = "127.0.0.1:8587"
57+
sig_key_address = "0x9bfc8551ffd3a21f856490870f111051b1ef39ab"

test-configs/c0/node_0.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ stamp = "/tmp/timeboost.0.stamp"
33

44
[net]
55
bind = "127.0.0.1:8000"
6+
batch_poster_api = "127.0.0.1:8547"
67
nitro = "127.0.0.1:55000"
78

89
[keys.signing]

test-configs/c0/node_1.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ stamp = "/tmp/timeboost.1.stamp"
33

44
[net]
55
bind = "127.0.0.1:8010"
6+
batch_poster_api = "127.0.0.1:8557"
67
nitro = "127.0.0.1:55000"
78

89
[keys.signing]

test-configs/c0/node_2.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ stamp = "/tmp/timeboost.2.stamp"
33

44
[net]
55
bind = "127.0.0.1:8020"
6+
batch_poster_api = "127.0.0.1:8567"
67
nitro = "127.0.0.1:55000"
78

89
[keys.signing]

test-configs/c0/node_3.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ stamp = "/tmp/timeboost.3.stamp"
33

44
[net]
55
bind = "127.0.0.1:8030"
6+
batch_poster_api = "127.0.0.1:8577"
67
nitro = "127.0.0.1:55000"
78

89
[keys.signing]

0 commit comments

Comments
 (0)