Skip to content

Commit 8eb4e5e

Browse files
authored
Merge pull request #591 from EspressoSystems/li/remove-test-node
Remove `test-node`
2 parents e0118f2 + ecaa9cc commit 8eb4e5e

File tree

15 files changed

+226
-39
lines changed

15 files changed

+226
-39
lines changed

.github/workflows/build-and-test.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,20 +217,15 @@ jobs:
217217
uses: foundry-rs/foundry-toolchain@v1
218218
- name: Run Test Node with Timeboost
219219
run: |
220-
./test-node/test-node.bash \
221-
--build-dev-nitro \
222-
--batchposters 0 \
223-
--redundantsequencers 1 \
224-
--decentralized-timeboost \
225-
--init &
220+
just run-integration-nitro-ci
226221
- name: Run test timeboost with nitro sequencer
227-
run: just run-demo --ignore-stamp -c test-configs/nitro-ci --rounds 10000 --yapper --nitro http://localhost:8547
222+
run: just run-demo --ignore-stamp -c test-configs/nitro-ci --rounds 10000 --nitro-senders 2 --yapper --nitro http://localhost:8547
228223
- name: Verify sequencer blocks
229224
run: |
230225
RUST_LOG=info just verify-blocks
231226
- name: Docker Logs Sequencer 1
232227
if: failure()
233-
run: docker logs test-node-sequencer-1
228+
run: docker logs timeboost-nitro0-1
234229
- name: Docker Logs Sequencer 2
235230
if: failure()
236-
run: docker logs test-node-sequencer_b-1
231+
run: docker logs timeboost-nitro0-1

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@
44
[submodule "contracts"]
55
path = contracts
66
url = https://github.com/EspressoSystems/timeboost-contracts.git
7-
[submodule "test-node"]
8-
path = test-node
9-
url = https://github.com/EspressoSystems/decentralized-timeboost-nitro-testnode

docker-compose.nitro-ci.yml

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
services:
2+
demo-l1-network:
3+
image: ghcr.io/espressosystems/geth-l1:main
4+
command: --dev --dev.period=1
5+
ports:
6+
- 8545:8545
7+
- 8546:8546
8+
volumes:
9+
- "./geth-config/genesis-default.json:/genesis.json"
10+
- "./geth-config/test-jwt-secret.txt:/config/test-jwt-secret.txt"
11+
networks:
12+
- timeboost
13+
healthcheck:
14+
test: ["CMD", "curl", "-s", "-X", "POST", "--data", '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}', "-H", "Content-Type: application/json", "http://localhost:8545"]
15+
interval: 5s
16+
timeout: 3s
17+
retries: 10
18+
espresso-dev-node:
19+
pid: host
20+
image: ghcr.io/espressosystems/espresso-sequencer/espresso-dev-node:main
21+
ports:
22+
- "41000:41000"
23+
- "41003:41003"
24+
- "20000:20000"
25+
environment:
26+
- ESPRESSO_BUILDER_PORT=41003
27+
- ESPRESSO_DEPLOYER_ACCOUNT_INDEX=5
28+
- ESPRESSO_DEV_NODE_PORT=20000
29+
- ESPRESSO_SEQUENCER_API_PORT=41000
30+
- ESPRESSO_SEQUENCER_ETH_MNEMONIC=indoor dish desk flag debris potato excuse depart ticket judge file exit
31+
- ESPRESSO_SEQUENCER_L1_PROVIDER=http://demo-l1-network:8545
32+
- ESPRESSO_SEQUENCER_DATABASE_MAX_CONNECTIONS=25
33+
- ESPRESSO_DEV_NODE_EPOCH_HEIGHT=1000000
34+
- ESPRESSO_DEV_NODE_MAX_BLOCK_SIZE=10485760
35+
- ESPRESSO_SEQUENCER_STORAGE_PATH=/data/espresso
36+
- RUST_LOG=WARN
37+
- RUST_LOG_FORMAT
38+
- ESPRESSO_DEV_NODE_VERSION=0.4
39+
volumes:
40+
- espresso_storage:/data/espresso
41+
depends_on:
42+
demo-l1-network:
43+
condition: service_healthy
44+
networks:
45+
- timeboost
46+
rollup-creator:
47+
#pid: host
48+
#build:
49+
# context: rollupcreator/
50+
# args:
51+
# NITRO_CONTRACTS_BRANCH: v3.1.0
52+
image: ghcr.io/espressosystems/timeboost/rollup-creator:main
53+
volumes:
54+
- "config:/config"
55+
- "./nitro-config:/nitro-config"
56+
environment:
57+
PARENT_CHAIN_RPC: "http://demo-l1-network:8545"
58+
DEPLOYER_PRIVKEY: 0x4f3edf983ac636a65a842ce7c78d9aa706d3b113b37f60c1b6d9d1f0a5b2b5ff
59+
PARENT_CHAIN_ID: 1337
60+
CHILD_CHAIN_NAME: "arb-dev-test"
61+
MAX_DATA_SIZE: 117964
62+
OWNER_ADDRESS: 0x3f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E
63+
WASM_MODULE_ROOT: 0xdb698a2576298f25448bc092e52cf13b1e24141c997135d70f217d674bbeb69a
64+
SEQUENCER_ADDRESS: 0x2F1eAe7Dd46D88f08fC2f8ED27Fcb2Ab183eb2d0
65+
AUTHORIZE_VALIDATORS: 10
66+
CHILD_CHAIN_CONFIG_PATH: "/nitro-config/l2_chain_config.json"
67+
CHAIN_DEPLOYMENT_INFO: "/config/deployment.json"
68+
CHILD_CHAIN_INFO: "/config/deployed_chain_info.json"
69+
command: ["create-rollup-testnode"]
70+
networks:
71+
- timeboost
72+
depends_on:
73+
demo-l1-network:
74+
condition: service_healthy
75+
nitro0:
76+
pid: host # allow debugging
77+
image: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node:feat-timeboost-integration-3-6-7
78+
entrypoint: /usr/local/bin/nitro
79+
ports:
80+
- "127.0.0.1:8547:8547"
81+
- "127.0.0.1:8548:8548"
82+
- "127.0.0.1:9642:9642"
83+
- "127.0.0.1:55000:55000"
84+
volumes:
85+
- "nitro0:/home/user/.arbitrum/local/nitro"
86+
- "l1keystore:/home/user/l1keystore"
87+
- "config:/config"
88+
- "./nitro-config:/nitro-config"
89+
- "tokenbridge-data:/tokenbridge-data"
90+
command:
91+
- --conf.file=/nitro-config/sequencer_config.json
92+
- --node.feed.output.enable
93+
- --node.feed.output.port=9642
94+
- --http.api=net,web3,eth,txpool,debug,timeboost,auctioneer
95+
- --graphql.enable
96+
- --graphql.vhosts=*
97+
- --graphql.corsdomain=*
98+
- --node.decentralized-timeboost-sequencer.block-retry-duration=0s
99+
- --node.decentralized-timeboost-sequencer.decentralized-timeboost-bridge-config.internal-timeboost-grpc-url=host.docker.internal:8003
100+
networks:
101+
- timeboost
102+
depends_on:
103+
rollup-creator:
104+
condition: service_completed_successfully
105+
healthcheck:
106+
test: ["CMD", "curl", "-s", "-X", "POST", "--data", '{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}', "-H", "Content-Type: application/json", "http://localhost:8547"]
107+
interval: 5s
108+
timeout: 3s
109+
retries: 12
110+
nitro1:
111+
pid: host # allow debugging
112+
image: ghcr.io/espressosystems/nitro-espresso-integration/nitro-node:feat-timeboost-integration-3-6-7
113+
entrypoint: /usr/local/bin/nitro
114+
ports:
115+
- "127.0.0.1:8647:8547"
116+
- "127.0.0.1:8648:8548"
117+
- "127.0.0.1:9742:9642"
118+
- "127.0.0.1:55010:55000"
119+
volumes:
120+
- "nitro1:/home/user/.arbitrum/local/nitro"
121+
- "l1keystore:/home/user/l1keystore"
122+
- "config:/config"
123+
- "./nitro-config:/nitro-config"
124+
- "tokenbridge-data:/tokenbridge-data"
125+
command:
126+
- --conf.file=/nitro-config/sequencer_config.json
127+
- --http.api=net,web3,eth,txpool,debug,timeboost,auctioneer
128+
- --node.decentralized-timeboost-sequencer.block-retry-duration=0s
129+
- --node.decentralized-timeboost-sequencer.decentralized-timeboost-bridge-config.internal-timeboost-grpc-url=host.docker.internal:8013
130+
networks:
131+
- timeboost
132+
depends_on:
133+
rollup-creator:
134+
condition: service_completed_successfully
135+
healthcheck:
136+
test: ["CMD", "curl", "-s", "-X", "POST", "--data", '{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}', "-H", "Content-Type: application/json", "http://localhost:8547"]
137+
interval: 5s
138+
timeout: 3s
139+
retries: 12
140+
141+
networks:
142+
timeboost:
143+
driver: bridge
144+
145+
volumes:
146+
config:
147+
l1keystore:
148+
espresso_storage:
149+
nitro0:
150+
nitro1:
151+
tokenbridge-data:

justfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ run-integration-nitro: build-docker-amd
8787
-docker network create timeboost
8888
docker compose -f docker-compose.nitro.yml -f docker-compose.metrics.yml up -d
8989

90+
run-integration-nitro-ci:
91+
-docker network create timeboost
92+
docker compose -f docker-compose.nitro-ci.yml up -d
93+
9094
run-demo *ARGS:
9195
scripts/run-timeboost-demo {{ARGS}}
9296

@@ -156,7 +160,9 @@ mkconfig-nitro-ci DATETIME *ARGS:
156160
--parent-rpc-url "http://127.0.0.1:8545" \
157161
--parent-ws-url "ws://127.0.0.1:8546" \
158162
--parent-chain-id 1337 \
159-
--parent-ibox-contract "0xa0f3a1a4e2b2bcb7b48c8527c28098f207572ec1" \
163+
--espresso-base-url "http://127.0.0.1:41000/v1/" \
164+
--espresso-websocket-url "ws://127.0.0.1:41000/v1/" \
165+
--parent-ibox-contract "0xCbfD7eeB1Cbd827a8B4dE3752D3994E9A8641FA2" \
160166
--key-manager-contract "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35" \
161167
--timestamp {{DATETIME}} \
162168
--stamp-dir "/tmp" \

robusta/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub struct Config {
1515
pub(crate) base_url: Url,
1616

1717
/// Espresso network builder base URL.
18-
pub(crate) builder_base_url: Url,
18+
pub(crate) builder_base_url: Option<Url>,
1919

2020
/// Espresso network websocket base URL.
2121
pub(crate) wss_base_url: Url,

robusta/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ impl Client {
6969
N: Into<NamespaceId>,
7070
{
7171
let trx = Transaction::new(nsid.into(), minicbor::to_vec(SendBody { blocks })?);
72-
let url = self.config.builder_base_url.join("txn_submit/submit")?;
72+
let url = if let Some(u) = &self.config.builder_base_url {
73+
u.join("txn_submit/submit")?
74+
} else {
75+
self.config.base_url.join("submit/submit")?
76+
};
7377
self.post_with_retry::<_, TaggedBase64<TX>>(url, &trx)
7478
.await?;
7579
Ok(())

scripts/run-timeboost-demo

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ignore_stamp=false
2525
nitro_url=
2626
yapper=false
2727
max_nodes=5
28+
senders=1
2829

2930
while [[ $# -gt 0 ]]; do
3031
case "$1" in
@@ -52,6 +53,10 @@ while [[ $# -gt 0 ]]; do
5253
nitro_url="$2"
5354
shift 2
5455
;;
56+
-s|--nitro-senders)
57+
senders="$2"
58+
shift 2
59+
;;
5560
--ignore-stamp)
5661
ignore_stamp=true
5762
shift
@@ -84,6 +89,9 @@ Options:
8489
-n | --nitro <URL>
8590
Address the local Nitro node is running.
8691
92+
-s | --nitro-senders <NUMBER>
93+
How many sending accounts to generate for yapper.
94+
8795
--yapper
8896
Run external transaction generator.
8997
@@ -140,6 +148,10 @@ for f in "$config_dir"/node_*.toml; do
140148
cmd+=(--required-decrypt-rounds 3)
141149
fi
142150

151+
if [ $nitro_url ]; then
152+
cmd+=(--https-only false)
153+
fi
154+
143155
echo "${cmd[@]}"
144156
RUST_LOG=$RUST_LOG "${cmd[@]}" &
145157

@@ -152,7 +164,10 @@ if $yapper; then
152164
if [ $nitro_url ]; then
153165
cmd+=(--nitro-url "$nitro_url")
154166
fi
155-
"${cmd[@]}" &
167+
if [ $senders ]; then
168+
cmd+=(--nitro-senders "$senders")
169+
fi
170+
RUST_LOG="yapper=info" "${cmd[@]}" &
156171
fi
157172

158173
wait "${pids[@]}"

test-configs/nitro-ci/node_0.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ namespace = 412346
2828
id = 1337
2929
rpc-url = "http://127.0.0.1:8545/"
3030
ws-url = "ws://127.0.0.1:8546/"
31-
ibox-contract = "0xa0f3a1a4e2b2bcb7b48c8527c28098f207572ec1"
31+
ibox-contract = "0xcbfd7eeb1cbd827a8b4de3752d3994e9a8641fa2"
3232
block-tag = "finalized"
3333
key-manager-contract = "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35"
3434

3535
[espresso]
36-
base-url = "https://query.decaf.testnet.espresso.network/v1/"
37-
builder-base-url = "https://builder.decaf.testnet.espresso.network/v0/"
38-
websockets-base-url = "wss://query.decaf.testnet.espresso.network/v1/"
36+
base-url = "http://127.0.0.1:41000/v1/"
37+
websockets-base-url = "ws://127.0.0.1:41000/v1/"
3938
max-transaction-size = 1048576

test-configs/nitro-ci/node_1.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ namespace = 412346
2828
id = 1337
2929
rpc-url = "http://127.0.0.1:8545/"
3030
ws-url = "ws://127.0.0.1:8546/"
31-
ibox-contract = "0xa0f3a1a4e2b2bcb7b48c8527c28098f207572ec1"
31+
ibox-contract = "0xcbfd7eeb1cbd827a8b4de3752d3994e9a8641fa2"
3232
block-tag = "finalized"
3333
key-manager-contract = "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35"
3434

3535
[espresso]
36-
base-url = "https://query.decaf.testnet.espresso.network/v1/"
37-
builder-base-url = "https://builder.decaf.testnet.espresso.network/v0/"
38-
websockets-base-url = "wss://query.decaf.testnet.espresso.network/v1/"
36+
base-url = "http://127.0.0.1:41000/v1/"
37+
websockets-base-url = "ws://127.0.0.1:41000/v1/"
3938
max-transaction-size = 1048576

test-node

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)