services: # L1 anvil chain. 8545 is published so both host tooling (127.0.0.1:8545) and # Nitro containers (host.docker.internal:8545) reach it. State persists to the # bind-mounted config/anvil-state so snapshots work. # # The foundry image runs as the non-root `foundry` user (uid 1000). On Linux CI # runners the bind-mounted config/anvil-state directory is owned by the runner # user, so anvil (uid 1000) cannot write /state/state.json and the periodic / # on-exit state dump silently fails, leaving no snapshot. (Docker Desktop on # macOS hides this by mapping bind-mount writes to the host user regardless of # container uid, so it only breaks in CI.) Run as root so the dump always lands. l1: image: ghcr.io/foundry-rs/foundry:v1.3.5 user: "0:0" ports: - "8545:8545" entrypoint: ["anvil"] command: - --host=0.0.0.0 - --port=8545 - --block-time=1 # Same as the image's entrypoint: at 30M, anvil drops a sender's later tx after one that # does not fit the block. - --gas-limit=100000000 - --accounts=10 - --balance=1000000 - --mnemonic=indoor dish desk flag debris potato excuse depart ticket judge file exit - --chain-id=1337 - --state=/state/state.json - --state-interval=1 - --max-persisted-states=128 volumes: - ../config/anvil-state:/state sequencer: image: offchainlabs/nitro-node:v3.9.5-66e42c4 ports: - "8547:8547" - "8548:8548" volumes: - ../config:/config - sequencer-data:/home/user/.arbitrum - ./sequencer-entrypoint.sh:/usr/local/bin/testnode-sequencer-entrypoint:ro environment: - TESTNODE_TIMEBOOST_REDIS_URL=${TESTNODE_TIMEBOOST_REDIS_URL:-redis://timeboost-redis:6379} entrypoint: ["/bin/sh", "/usr/local/bin/testnode-sequencer-entrypoint"] command: - --conf.file=/config/l2-nodeConfig.json - --node.feed.output.enable - --node.feed.output.port=9642 - --node.dangerous.disable-blob-reader - --node.staker.enable=false - --http.addr=0.0.0.0 - --http.port=8547 - --http.corsdomain=* - --http.vhosts=* - --ws.addr=0.0.0.0 - --ws.port=8548 extra_hosts: - "host.docker.internal:host-gateway" depends_on: - l1 l3node: image: offchainlabs/nitro-node:v3.9.5-66e42c4 ports: - "8549:8547" - "8550:8548" volumes: - ../config:/config - l3node-data:/home/user/.arbitrum entrypoint: ["nitro"] command: - --conf.file=/config/l3-nodeConfig.json - --node.dangerous.disable-blob-reader # init turns the L3 staker on before capturing; like the validator above and the # image's entrypoint, it runs without a block validator. - --node.staker.dangerous.without-block-validator - --http.addr=0.0.0.0 - --http.port=8547 - --http.api=net,web3,eth,txpool,debug - --http.corsdomain=* - --http.vhosts=* - --ws.addr=0.0.0.0 - --ws.port=8548 extra_hosts: - "host.docker.internal:host-gateway" depends_on: - sequencer validator: image: offchainlabs/nitro-node:v3.9.5-66e42c4 volumes: - ../config:/config - validator-data:/home/user/.arbitrum entrypoint: ["nitro"] command: - --conf.file=/config/l2-nodeConfig.json - --node.sequencer=false - --node.delayed-sequencer.enable=false - --node.dangerous.disable-blob-reader - --execution.sequencer.enable=false - --execution.forwarding-target=null - --node.staker.enable=true - --node.staker.use-smart-contract-wallet=true - --node.staker.disable-challenge=true - --node.staker.dangerous.without-block-validator - --node.staker.staker-interval=100ms - --node.staker.make-assertion-interval=100ms - --node.staker.confirmation-blocks=1 - --node.bold.check-staker-switch-interval=876000h - --node.bold.rpc-block-number=latest - --node.bold.assertion-posting-interval=100ms - --node.bold.assertion-confirming-interval=100ms - --node.bold.assertion-scanning-interval=100ms - --node.bold.minimum-gap-to-parent-assertion=100ms - --node.bold.parent-chain-block-time=100ms - --http.addr=0.0.0.0 - --http.port=8647 - --http.api=net,web3,eth - --ws.addr=0.0.0.0 - --ws.port=8648 extra_hosts: - "host.docker.internal:host-gateway" depends_on: - sequencer - l1 scripts: image: nitro-testnode-scripts:latest volumes: - ../config:/config - tokenbridge-data:/tokenbridge-data timeboost-redis: image: redis:7-alpine tokenbridge: image: nitro-testnode-tokenbridge:latest build: context: . dockerfile: tokenbridge.Dockerfile additional_contexts: tokenbridge: ${TOKEN_BRIDGE_DOCKER_CONTEXT:-${TOKEN_BRIDGE_LOCAL_DIR:-../../token-bridge-contracts}} depends_on: - sequencer - l1 environment: - ARB_URL=http://sequencer:8547 - ETH_URL=http://host.docker.internal:8545 volumes: - ../config:/config - tokenbridge-data:/workspace - /var/run/docker.sock:/var/run/docker.sock extra_hosts: - "host.docker.internal:host-gateway" volumes: sequencer-data: l3node-data: validator-data: tokenbridge-data: