Implement op-node container
This commit is contained in:
parent
caa0a36e48
commit
0fa42a92e9
@ -70,6 +70,31 @@ services:
|
||||
# TODO: Integrate
|
||||
- ../test/l2-accounts:/l2-accounts
|
||||
command: ["sh", "/app/run-op-node.sh"]
|
||||
ports:
|
||||
- "8547"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost:8547"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
|
||||
op-batcher:
|
||||
environment:
|
||||
# TODO: Integrate
|
||||
L1_RPC: "http://fixturenet-eth-geth-1:8545"
|
||||
depends_on:
|
||||
op-node:
|
||||
condition: service_healthy
|
||||
op-geth:
|
||||
condition: service_healthy
|
||||
image: cerc/optimism-op-batcher:local
|
||||
volumes:
|
||||
- ../config/fixturenet-optimism/run-op-batcher.sh:/run-op-batcher.sh
|
||||
# TODO: Integrate
|
||||
- ../test/l2-accounts:/l2-accounts
|
||||
entrypoint: "sh"
|
||||
command: "/run-op-batcher.sh"
|
||||
|
||||
volumes:
|
||||
op_node_data:
|
||||
|
21
app/data/config/fixturenet-optimism/run-op-batcher.sh
Executable file
21
app/data/config/fixturenet-optimism/run-op-batcher.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Get BACTHER_KEY from keys.json
|
||||
BATCHER_KEY=$(jq -r '.Batcher.privateKey' /l2-accounts/keys.json | tr -d '"')
|
||||
|
||||
op-batcher \
|
||||
--l2-eth-rpc=http://op-geth:8545 \
|
||||
--rollup-rpc=http://op-node:8547 \
|
||||
--poll-interval=1s \
|
||||
--sub-safety-margin=6 \
|
||||
--num-confirmations=1 \
|
||||
--safe-abort-nonce-too-low-count=3 \
|
||||
--resubmission-timeout=30s \
|
||||
--rpc.addr=0.0.0.0 \
|
||||
--rpc.port=8548 \
|
||||
--rpc.enable-admin \
|
||||
--max-channel-duration=1 \
|
||||
--target-l1-tx-size-bytes=2048 \
|
||||
--l1-eth-rpc=$L1_RPC \
|
||||
--private-key=$BATCHER_KEY
|
@ -2,15 +2,15 @@
|
||||
set -e
|
||||
|
||||
# Get SEQUENCER KEY from keys.json
|
||||
SEQUENCER_KEY=`jq '.Sequencer.privateKey' /l2-accounts/keys.json`
|
||||
SEQUENCER_KEY=$(jq -r '.Sequencer.privateKey' /l2-accounts/keys.json | tr -d '"')
|
||||
|
||||
op-node \
|
||||
--l2=http://op-geth:8551 \
|
||||
--l2.jwt-secret=./jwt.txt \
|
||||
--l2.jwt-secret=/app/jwt.txt \
|
||||
--sequencer.enabled \
|
||||
--sequencer.l1-confs=3 \
|
||||
--verifier.l1-confs=3 \
|
||||
--rollup.config=./rollup.json \
|
||||
--rollup.config=/app/rollup.json \
|
||||
--rpc.addr=0.0.0.0 \
|
||||
--rpc.port=8547 \
|
||||
--p2p.disable \
|
||||
|
@ -23,7 +23,7 @@ RUN make op-node VERSION="$VERSION" GOOS=$TARGETOS GOARCH=$TARGETARCH
|
||||
|
||||
FROM alpine:3.15
|
||||
|
||||
RUN apk add --no-cache openssl
|
||||
RUN apk add --no-cache openssl jq
|
||||
|
||||
COPY --from=builder /app/op-node/bin/op-node /usr/local/bin
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user