start op-bnb fullnode

This commit is contained in:
Sebastian
2024-03-29 05:01:34 +01:00
parent 8b7808d61d
commit f1759a000d
3 changed files with 73 additions and 3 deletions

66
op-bnb-fullnode.yml Normal file
View File

@@ -0,0 +1,66 @@
version: '3.1'
services:
op-bnb-fullnode:
image: ghcr.io/bnb-chain/op-geth:${OPBNB_GETH_IMAGE_TAG:-v0.3.0}
restart: unless-stopped
stop_grace_period: 5m
entrypoint: /scripts/op-geth-start.sh
environment:
BEDROCK_DATADIR: /geth
CHAIN_ID: 204
L2_RPC: https://opbnb-mainnet-rpc.bnbchain.org # sequencer
NETWORK_NAME: mainnet
OP_GETH_SYNCMODE: full
OP_GETH_GCMODE: full
OP_GETH_DB_ENGINE: pebble
OP_GETH_STATE_SCHEME: path
expose:
- 8545
- 8551
volumes:
- ./op-bnb/scripts/:/scripts
- .jwtsecret:/jwtsecret
- op-bnb-fullnode-geth:/geth
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.op-bnb-stripprefix.stripprefix.prefixes=/opbnb"
- "traefik.http.services.op-bnb.loadbalancer.server.port=8545"
- "traefik.http.routers.op-bnb.entrypoints=websecure"
- "traefik.http.routers.op-bnb.tls.certresolver=myresolver"
- "traefik.http.routers.op-bnb.rule=Host(`$DOMAIN`) && PathPrefix(`/opbnb`)"
- "traefik.http.routers.op-bnb.middlewares=op-bnb-stripprefix, ipwhitelist"
networks:
- chains
op-bnb-fullnode-node:
image: ghcr.io/bnb-chain/op-node:${OPBNB_NODE_IMAGE_TAG:-v0.3.0}
depends_on:
- op-bnb-fullnode
restart: unless-stopped
stop_grace_period: 5m
entrypoint: /scripts/op-node-start.sh
environment:
OP_NODE__RPC_ENDPOINT: ${OPBNB_BSC_ENDPOINT}
P2P_PRIV_KEY: ${OPBNB_NODE_PRIV_KEY}
NETWORK_NAME: mainnet
P2P_PORT: 1194
OP_L2_HOST: op-bnb-fullnode
expose:
- 1194
ports:
- ${PORT__OP_NODE_P2P:-1194}:1194
# - ${PORT__OP_NODE:-8546}:8546
volumes:
- ./op-bnb/scripts/:/scripts
- .jwtsecret:/jwtsecret
- op-bnb-fullnode-node:/op_node
networks:
- chains
volumes:
op-bnb-fullnode-geth:
op-bnb-fullnode-node:

View File

@@ -41,6 +41,10 @@ exec geth \
--ws.origins="*" \
--ws.api=eth,engine \
--maxpeers=10 \
--syncmode=${OP_GETH_SYNCMODE:-full} \
--gcmode=${OP_GETH_GCMODE:-archive} \
--db.engine=${OP_GETH_DB_ENGINE:-leveldb} \
--state.scheme=${OP_GETH_STATE_SCHEME:-hash} \
--networkid=$CHAIN_ID \
--miner.gaslimit=150000000 \
--txpool.globalslots=10000 \

View File

@@ -25,8 +25,8 @@ exec op-node \
--rpc.port=8546 \
--p2p.sync.req-resp \
--p2p.listen.ip=0.0.0.0 \
--p2p.listen.tcp=9003 \
--p2p.listen.udp=9003 \
--p2p.listen.tcp=${P2P_PORT:-9003} \
--p2p.listen.udp=${P2P_PORT:-9003} \
--snapshotlog.file=./snapshot.log \
--p2p.priv.raw=$P2P_PRIV_KEY \
--p2p.bootnodes=$P2P_BOOTNODES \
@@ -36,7 +36,7 @@ exec op-node \
--pprof.enabled \
--rpc.enable-admin \
--l1=$OP_NODE__RPC_ENDPOINT \
--l2=http://op-bnb:8551 \
--l2=http://${OP_L2_HOST:-op-bnb}:8551 \
--l2.jwt-secret=/jwtsecret \
--l2.engine-sync=true \
--l2.skip-sync-start-check=true \