Skip to content

Commit 638c989

Browse files
committed
Fix docker compose and run_integration.
1 parent 8c138b7 commit 638c989

File tree

17 files changed

+522
-635
lines changed

17 files changed

+522
-635
lines changed

docker-compose.yml

Lines changed: 51 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
11
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+
ipv4_address: 172.20.0.11
14+
healthcheck:
15+
test: ["CMD", "curl", "-s", "-X", "POST", "--data", '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}', "-H", "Content-Type: application/json", "http://172.20.0.11:8545"]
16+
interval: 5s
17+
timeout: 3s
18+
retries: 10
19+
deploy-test-contract:
20+
image: timeboost:latest
21+
environment:
22+
- RUST_LOG=debug
23+
entrypoint: ["/app/deploy-contract-docker"]
24+
depends_on:
25+
demo-l1-network:
26+
condition: service_healthy
27+
networks:
28+
- timeboost
229
node0:
330
image: timeboost:latest
431
command:
@@ -12,18 +39,17 @@ services:
1239
ipv4_address: 172.20.0.2
1340
environment:
1441
- RUST_LOG=timeboost=info,sailfish=info,cliquenet=info
15-
- TIMEBOOST_SAILFISH_PORT=8000
16-
- TIMEBOOST_DECRYPT_PORT=8001
17-
- TIMEBOOST_CERTIFIER_PORT=8002
18-
- TIMEBOOST_RPC_PORT=8800
19-
- TIMEBOOST_METRICS_PORT=9000
2042
ports:
2143
- "8000:8000"
2244
- "8030:8001"
2345
- "8060:8002"
46+
- "8080:8003"
47+
- "8100:8004"
2448
- "8800:8800"
2549
- "9000:9000"
2650
depends_on:
51+
deploy-test-contract:
52+
condition: service_completed_successfully
2753
nitro-dev:
2854
condition: service_healthy
2955
node1:
@@ -39,18 +65,17 @@ services:
3965
ipv4_address: 172.20.0.3
4066
environment:
4167
- RUST_LOG=timeboost=info,sailfish=info,cliquenet=info
42-
- TIMEBOOST_SAILFISH_PORT=8000
43-
- TIMEBOOST_DECRYPT_PORT=8001
44-
- TIMEBOOST_CERTIFIER_PORT=8002
45-
- TIMEBOOST_RPC_PORT=8800
46-
- TIMEBOOST_METRICS_PORT=9000
4768
ports:
4869
- "8001:8000"
4970
- "8031:8001"
5071
- "8061:8002"
72+
- "8081:8003"
73+
- "8101:8004"
5174
- "8801:8800"
5275
- "9001:9000"
5376
depends_on:
77+
deploy-test-contract:
78+
condition: service_completed_successfully
5479
nitro-dev:
5580
condition: service_healthy
5681
node2:
@@ -66,18 +91,17 @@ services:
6691
ipv4_address: 172.20.0.4
6792
environment:
6893
- RUST_LOG=timeboost=info,sailfish=info,cliquenet=info
69-
- TIMEBOOST_SAILFISH_PORT=8000
70-
- TIMEBOOST_DECRYPT_PORT=8001
71-
- TIMEBOOST_CERTIFIER_PORT=8002
72-
- TIMEBOOST_RPC_PORT=8800
73-
- TIMEBOOST_METRICS_PORT=9000
7494
ports:
7595
- "8002:8000"
7696
- "8032:8001"
7797
- "8062:8002"
98+
- "8082:8003"
99+
- "8102:8004"
78100
- "8802:8800"
79101
- "9002:9000"
80102
depends_on:
103+
deploy-test-contract:
104+
condition: service_completed_successfully
81105
nitro-dev:
82106
condition: service_healthy
83107
node3:
@@ -93,18 +117,17 @@ services:
93117
ipv4_address: 172.20.0.5
94118
environment:
95119
- RUST_LOG=timeboost=info,sailfish=info,cliquenet=info
96-
- TIMEBOOST_SAILFISH_PORT=8000
97-
- TIMEBOOST_DECRYPT_PORT=8001
98-
- TIMEBOOST_CERTIFIER_PORT=8002
99-
- TIMEBOOST_RPC_PORT=8800
100-
- TIMEBOOST_METRICS_PORT=9000
101120
ports:
102121
- "8003:8000"
103122
- "8033:8001"
104123
- "8063:8002"
124+
- "8083:8003"
125+
- "8103:8004"
105126
- "8803:8800"
106127
- "9003:9000"
107128
depends_on:
129+
deploy-test-contract:
130+
condition: service_completed_successfully
108131
nitro-dev:
109132
condition: service_healthy
110133
node4:
@@ -120,18 +143,17 @@ services:
120143
ipv4_address: 172.20.0.6
121144
environment:
122145
- RUST_LOG=timeboost=info,sailfish=info,cliquenet=info
123-
- TIMEBOOST_SAILFISH_PORT=8000
124-
- TIMEBOOST_DECRYPT_PORT=8001
125-
- TIMEBOOST_CERTIFIER_PORT=8002
126-
- TIMEBOOST_RPC_PORT=8800
127-
- TIMEBOOST_METRICS_PORT=9000
128146
ports:
129147
- "8004:8000"
130148
- "8034:8001"
131149
- "8064:8002"
150+
- "8084:8003"
151+
- "8104:8004"
132152
- "8804:8800"
133153
- "9004:9000"
134154
depends_on:
155+
deploy-test-contract:
156+
condition: service_completed_successfully
135157
nitro-dev:
136158
condition: service_healthy
137159
nitro-dev:
@@ -148,15 +170,14 @@ services:
148170
timeout: 3s
149171
retries: 10
150172
yapper:
151-
image: yapper:latest
173+
image: timeboost:latest
152174
command:
153175
[
154176
"/app/yapper",
155-
"--tps",
156-
"1",
157-
"--keyset-file",
158-
"committee.json",
177+
"--keyset-file", "committee.toml",
159178
]
179+
environment:
180+
- RUST_LOG=info
160181
networks:
161182
timeboost:
162183
ipv4_address: 172.20.0.13

docker/timeboost.Dockerfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ENV PATH="/root/.foundry/bin:${PATH}"
1111
RUN forge --version
1212
RUN rustup component add rustfmt --toolchain nightly
1313

14-
RUN cargo build --release --bin timeboost
14+
RUN cargo build --release --bins
1515

1616
# Non-root app container stage
1717
FROM debian:bookworm-slim
@@ -25,10 +25,20 @@ RUN groupadd -r appgroup && useradd -r -g appgroup timeboostuser
2525

2626
# Copy binary
2727
COPY --from=builder /app/target/release/timeboost .
28+
COPY --from=builder /app/target/release/yapper .
29+
COPY --from=builder /app/target/release/register .
30+
COPY --from=builder /app/target/release/deploy .
31+
COPY --from=builder /app/scripts/deploy-contract-docker .
32+
2833
COPY --from=builder /app/test-configs/docker .
2934

35+
# Copy Foundry binaries from builder
36+
COPY --from=builder /root/.foundry/bin/forge /usr/local/bin/forge
37+
COPY --from=builder /root/.foundry/bin/cast /usr/local/bin/cast
38+
RUN chmod +x /usr/local/bin/forge /usr/local/bin/cast
39+
3040
# Set ownership of application files and make binary executable
31-
RUN chown -R timeboostuser:appgroup /app && chmod +x /app/timeboost
41+
RUN chown -R timeboostuser:appgroup /app && chmod +x /app/timeboost /app/yapper /app/register /app/deploy /app/deploy-contract-docker
3242

3343
# Switch to non-root user
3444
USER timeboostuser

docker/yapper.Dockerfile

Lines changed: 0 additions & 41 deletions
This file was deleted.

geth-config/genesis-default.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"config": {
3+
"chainId": 31337,
4+
"homesteadBlock": 0,
5+
"eip150Block": 0,
6+
"eip155Block": 0,
7+
"eip158Block": 0,
8+
"byzantiumBlock": 0,
9+
"constantinopleBlock": 0,
10+
"petersburgBlock": 0,
11+
"istanbulBlock": 0,
12+
"muirGlacierBlock": 0,
13+
"berlinBlock": 0,
14+
"londonBlock": 0,
15+
"arrowGlacierBlock": 0,
16+
"grayGlacierBlock": 0,
17+
"shanghaiTime": 0,
18+
"cancunTime": 0,
19+
"pragueTime": 0,
20+
"terminalTotalDifficulty": 0,
21+
"terminalTotalDifficultyPassed": true,
22+
"isDev": true,
23+
"blobSchedule": {
24+
"cancun": {
25+
"target": 3,
26+
"max": 6,
27+
"baseFeeUpdateFraction": 3338477
28+
},
29+
"prague": {
30+
"target": 6,
31+
"max": 9,
32+
"baseFeeUpdateFraction": 5007716
33+
}
34+
}
35+
},
36+
"nonce": "0x0",
37+
"timestamp": "0x6511b40b",
38+
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
39+
"gasLimit": "0x1c9c380",
40+
"difficulty": "0",
41+
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
42+
"coinbase": "0x0000000000000000000000000000000000000000",
43+
"alloc": {
44+
"f39fd6e51aad88f6f4ce6ab8827279cfffb92266": {
45+
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
46+
}
47+
},
48+
"number": "0x0",
49+
"gasUsed": "0x0",
50+
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
51+
"baseFeePerGas": "0x3b9aca00",
52+
"excessBlobGas": null,
53+
"blobGasUsed": null
54+
}

geth-config/test-jwt-secret.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a

0 commit comments

Comments
 (0)