Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 51 additions & 30 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
services:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need the nitro dev node in this docker compose file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is not currently in use. Thanks for spotting this. I'll update the PR later so it is either using the updated nitro-node or the block-maker.

demo-l1-network:
image: ghcr.io/espressosystems/geth-l1:main
command: --dev --dev.period=1
ports:
- 8545:8545
- 8546:8546
volumes:
- "./geth-config/genesis-default.json:/genesis.json"
- "./geth-config/test-jwt-secret.txt:/config/test-jwt-secret.txt"
networks:
timeboost:
ipv4_address: 172.20.0.11
healthcheck:
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"]
interval: 5s
timeout: 3s
retries: 10
deploy-test-contract:
image: timeboost:latest
environment:
- RUST_LOG=debug
entrypoint: ["/app/deploy-contract-docker"]
depends_on:
demo-l1-network:
condition: service_healthy
networks:
- timeboost
node0:
image: timeboost:latest
command:
Expand All @@ -12,18 +39,17 @@ services:
ipv4_address: 172.20.0.2
environment:
- RUST_LOG=timeboost=info,sailfish=info,cliquenet=info
- TIMEBOOST_SAILFISH_PORT=8000
- TIMEBOOST_DECRYPT_PORT=8001
- TIMEBOOST_CERTIFIER_PORT=8002
- TIMEBOOST_RPC_PORT=8800
- TIMEBOOST_METRICS_PORT=9000
ports:
- "8000:8000"
- "8030:8001"
- "8060:8002"
- "8080:8003"
- "8100:8004"
- "8800:8800"
- "9000:9000"
depends_on:
deploy-test-contract:
condition: service_completed_successfully
nitro-dev:
condition: service_healthy
node1:
Expand All @@ -39,18 +65,17 @@ services:
ipv4_address: 172.20.0.3
environment:
- RUST_LOG=timeboost=info,sailfish=info,cliquenet=info
- TIMEBOOST_SAILFISH_PORT=8000
- TIMEBOOST_DECRYPT_PORT=8001
- TIMEBOOST_CERTIFIER_PORT=8002
- TIMEBOOST_RPC_PORT=8800
- TIMEBOOST_METRICS_PORT=9000
ports:
- "8001:8000"
- "8031:8001"
- "8061:8002"
- "8081:8003"
- "8101:8004"
- "8801:8800"
- "9001:9000"
depends_on:
deploy-test-contract:
condition: service_completed_successfully
nitro-dev:
condition: service_healthy
node2:
Expand All @@ -66,18 +91,17 @@ services:
ipv4_address: 172.20.0.4
environment:
- RUST_LOG=timeboost=info,sailfish=info,cliquenet=info
- TIMEBOOST_SAILFISH_PORT=8000
- TIMEBOOST_DECRYPT_PORT=8001
- TIMEBOOST_CERTIFIER_PORT=8002
- TIMEBOOST_RPC_PORT=8800
- TIMEBOOST_METRICS_PORT=9000
ports:
- "8002:8000"
- "8032:8001"
- "8062:8002"
- "8082:8003"
- "8102:8004"
- "8802:8800"
- "9002:9000"
depends_on:
deploy-test-contract:
condition: service_completed_successfully
nitro-dev:
condition: service_healthy
node3:
Expand All @@ -93,18 +117,17 @@ services:
ipv4_address: 172.20.0.5
environment:
- RUST_LOG=timeboost=info,sailfish=info,cliquenet=info
- TIMEBOOST_SAILFISH_PORT=8000
- TIMEBOOST_DECRYPT_PORT=8001
- TIMEBOOST_CERTIFIER_PORT=8002
- TIMEBOOST_RPC_PORT=8800
- TIMEBOOST_METRICS_PORT=9000
ports:
- "8003:8000"
- "8033:8001"
- "8063:8002"
- "8083:8003"
- "8103:8004"
- "8803:8800"
- "9003:9000"
depends_on:
deploy-test-contract:
condition: service_completed_successfully
nitro-dev:
condition: service_healthy
node4:
Expand All @@ -120,18 +143,17 @@ services:
ipv4_address: 172.20.0.6
environment:
- RUST_LOG=timeboost=info,sailfish=info,cliquenet=info
- TIMEBOOST_SAILFISH_PORT=8000
- TIMEBOOST_DECRYPT_PORT=8001
- TIMEBOOST_CERTIFIER_PORT=8002
- TIMEBOOST_RPC_PORT=8800
- TIMEBOOST_METRICS_PORT=9000
ports:
- "8004:8000"
- "8034:8001"
- "8064:8002"
- "8084:8003"
- "8104:8004"
- "8804:8800"
- "9004:9000"
depends_on:
deploy-test-contract:
condition: service_completed_successfully
nitro-dev:
condition: service_healthy
nitro-dev:
Expand All @@ -148,15 +170,14 @@ services:
timeout: 3s
retries: 10
yapper:
image: yapper:latest
image: timeboost:latest
command:
[
"/app/yapper",
"--tps",
"1",
"--keyset-file",
"committee.json",
"--keyset-file", "committee.toml",
]
environment:
- RUST_LOG=info
networks:
timeboost:
ipv4_address: 172.20.0.13
Expand Down
14 changes: 12 additions & 2 deletions docker/timeboost.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENV PATH="/root/.foundry/bin:${PATH}"
RUN forge --version
RUN rustup component add rustfmt --toolchain nightly

RUN cargo build --release --bin timeboost
RUN cargo build --release --bins

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

# Copy binary
COPY --from=builder /app/target/release/timeboost .
COPY --from=builder /app/target/release/yapper .
COPY --from=builder /app/target/release/register .
COPY --from=builder /app/target/release/deploy .
COPY --from=builder /app/scripts/deploy-contract-docker .

COPY --from=builder /app/test-configs/docker .

# Copy Foundry binaries from builder
COPY --from=builder /root/.foundry/bin/forge /usr/local/bin/forge
COPY --from=builder /root/.foundry/bin/cast /usr/local/bin/cast
RUN chmod +x /usr/local/bin/forge /usr/local/bin/cast

# Set ownership of application files and make binary executable
RUN chown -R timeboostuser:appgroup /app && chmod +x /app/timeboost
RUN chown -R timeboostuser:appgroup /app && chmod +x /app/timeboost /app/yapper /app/register /app/deploy /app/deploy-contract-docker

# Switch to non-root user
USER timeboostuser
Expand Down
41 changes: 0 additions & 41 deletions docker/yapper.Dockerfile

This file was deleted.

54 changes: 54 additions & 0 deletions geth-config/genesis-default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"config": {
"chainId": 31337,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"muirGlacierBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"arrowGlacierBlock": 0,
"grayGlacierBlock": 0,
"shanghaiTime": 0,
"cancunTime": 0,
"pragueTime": 0,
"terminalTotalDifficulty": 0,
"terminalTotalDifficultyPassed": true,
"isDev": true,
"blobSchedule": {
"cancun": {
"target": 3,
"max": 6,
"baseFeeUpdateFraction": 3338477
},
"prague": {
"target": 6,
"max": 9,
"baseFeeUpdateFraction": 5007716
}
}
},
"nonce": "0x0",
"timestamp": "0x6511b40b",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x1c9c380",
"difficulty": "0",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"f39fd6e51aad88f6f4ce6ab8827279cfffb92266": {
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"baseFeePerGas": "0x3b9aca00",
"excessBlobGas": null,
"blobGasUsed": null
}
1 change: 1 addition & 0 deletions geth-config/test-jwt-secret.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a
Loading