2023-04-03 07:03:47 +00:00
|
|
|
version: '3.7'
|
|
|
|
|
|
|
|
services:
|
2023-04-04 09:23:28 +00:00
|
|
|
# Generates and funds the accounts required when setting up the L2 chain (outputs to volume l2_accounts)
|
|
|
|
# Creates / updates the configuration for L1 contracts deployment
|
|
|
|
# Deploys the L1 smart contracts (outputs to volume l1_deployment)
|
2023-04-03 07:03:47 +00:00
|
|
|
fixturenet-optimism-contracts:
|
|
|
|
hostname: fixturenet-optimism-contracts
|
|
|
|
image: cerc/optimism-contracts:local
|
2023-04-04 09:23:28 +00:00
|
|
|
env_file:
|
|
|
|
- ../config/fixturenet-optimism/l1-params.env
|
|
|
|
# Waits for L1 endpoint to be up before running the script
|
|
|
|
command: |
|
|
|
|
"./wait-for-it.sh -h $${L1_HOST} -p $${L1_PORT} -s -t 60 -- ./run.sh"
|
2023-04-03 07:03:47 +00:00
|
|
|
volumes:
|
2023-04-04 09:23:28 +00:00
|
|
|
- ../config/wait-for-it.sh:/app/packages/contracts-bedrock/wait-for-it.sh
|
|
|
|
- ../container-build/cerc-optimism-contracts/hardhat-tasks/rekey-json.ts:/app/packages/contracts-bedrock/tasks/rekey-json.ts
|
|
|
|
- ../container-build/cerc-optimism-contracts/hardhat-tasks/send-balance.ts:/app/packages/contracts-bedrock/tasks/send-balance.ts
|
2023-04-03 07:03:47 +00:00
|
|
|
- ../config/fixturenet-optimism/optimism-contracts/update-config.js:/app/packages/contracts-bedrock/update-config.js
|
|
|
|
- ../config/fixturenet-optimism/optimism-contracts/run.sh:/app/packages/contracts-bedrock/run.sh
|
2023-04-03 12:43:29 +00:00
|
|
|
- fixturenet_geth_accounts:/geth-accounts:ro
|
|
|
|
- l2_accounts:/l2-accounts
|
|
|
|
- l1_deployment:/app/packages/contracts-bedrock
|
2023-04-04 09:23:28 +00:00
|
|
|
extra_hosts:
|
|
|
|
- "host.docker.internal:host-gateway"
|
2023-04-03 07:03:47 +00:00
|
|
|
|
2023-04-04 09:23:28 +00:00
|
|
|
# Generates the config files required for L2 (outputs to volume op_node_data)
|
2023-04-03 07:03:47 +00:00
|
|
|
op-node-l2-config-gen:
|
|
|
|
image: cerc/optimism-op-node:local
|
|
|
|
depends_on:
|
|
|
|
fixturenet-optimism-contracts:
|
|
|
|
condition: service_completed_successfully
|
2023-04-04 09:23:28 +00:00
|
|
|
env_file:
|
|
|
|
- ../config/fixturenet-optimism/l1-params.env
|
2023-04-03 07:03:47 +00:00
|
|
|
volumes:
|
|
|
|
- ../config/fixturenet-optimism/generate-l2-config.sh:/app/generate-l2-config.sh
|
2023-04-03 12:43:29 +00:00
|
|
|
- l1_deployment:/contracts-bedrock:ro
|
2023-04-03 07:03:47 +00:00
|
|
|
- op_node_data:/app
|
|
|
|
command: ["sh", "/app/generate-l2-config.sh"]
|
2023-04-04 09:23:28 +00:00
|
|
|
extra_hosts:
|
|
|
|
- "host.docker.internal:host-gateway"
|
2023-04-03 07:03:47 +00:00
|
|
|
|
2023-04-04 09:23:28 +00:00
|
|
|
# Initializes and runs the L2 execution client
|
2023-04-03 07:03:47 +00:00
|
|
|
op-geth:
|
|
|
|
image: cerc/optimism-l2geth:local
|
|
|
|
depends_on:
|
|
|
|
op-node-l2-config-gen:
|
|
|
|
condition: service_started
|
|
|
|
volumes:
|
|
|
|
- ../config/fixturenet-optimism/run-op-geth.sh:/run-op-geth.sh
|
|
|
|
- op_node_data:/op-node:ro
|
2023-04-03 12:43:29 +00:00
|
|
|
- l2_accounts:/l2-accounts:ro
|
2023-04-03 07:03:47 +00:00
|
|
|
entrypoint: "sh"
|
|
|
|
command: "/run-op-geth.sh"
|
|
|
|
ports:
|
|
|
|
- "8545"
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "nc", "-vz", "localhost:8545"]
|
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 10
|
|
|
|
start_period: 10s
|
|
|
|
|
2023-04-04 09:23:28 +00:00
|
|
|
# Runs the L2 consensus client (Sequencer node)
|
2023-04-03 07:03:47 +00:00
|
|
|
op-node:
|
2023-04-04 09:23:28 +00:00
|
|
|
env_file:
|
|
|
|
- ../config/fixturenet-optimism/l1-params.env
|
2023-04-03 07:03:47 +00:00
|
|
|
depends_on:
|
|
|
|
op-geth:
|
|
|
|
condition: service_healthy
|
|
|
|
image: cerc/optimism-op-node:local
|
|
|
|
volumes:
|
|
|
|
- ../config/fixturenet-optimism/run-op-node.sh:/app/run-op-node.sh
|
2023-04-03 12:43:29 +00:00
|
|
|
- op_node_data:/op-node-data:ro
|
|
|
|
- l2_accounts:/l2-accounts:ro
|
2023-04-03 07:03:47 +00:00
|
|
|
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
|
2023-04-04 09:23:28 +00:00
|
|
|
extra_hosts:
|
|
|
|
- "host.docker.internal:host-gateway"
|
2023-04-03 07:03:47 +00:00
|
|
|
|
2023-04-04 09:23:28 +00:00
|
|
|
# Runs the batcher (takes transactions from the Sequencer and publishes them to L1)
|
2023-04-03 07:03:47 +00:00
|
|
|
op-batcher:
|
2023-04-04 09:23:28 +00:00
|
|
|
env_file:
|
|
|
|
- ../config/fixturenet-optimism/l1-params.env
|
2023-04-03 07:03:47 +00:00
|
|
|
depends_on:
|
|
|
|
op-node:
|
|
|
|
condition: service_healthy
|
|
|
|
op-geth:
|
|
|
|
condition: service_healthy
|
|
|
|
image: cerc/optimism-op-batcher:local
|
|
|
|
volumes:
|
2023-04-04 09:23:28 +00:00
|
|
|
- ../config/wait-for-it.sh:/wait-for-it.sh
|
2023-04-03 07:03:47 +00:00
|
|
|
- ../config/fixturenet-optimism/run-op-batcher.sh:/run-op-batcher.sh
|
2023-04-03 12:43:29 +00:00
|
|
|
- l2_accounts:/l2-accounts:ro
|
2023-04-04 09:23:28 +00:00
|
|
|
entrypoint: ["sh", "-c"]
|
|
|
|
# Waits for L1 endpoint to be up before running the batcher
|
|
|
|
command: |
|
|
|
|
"/wait-for-it.sh -h $${L1_HOST} -p $${L1_PORT} -s -t 60 -- /run-op-batcher.sh"
|
|
|
|
extra_hosts:
|
|
|
|
- "host.docker.internal:host-gateway"
|
2023-04-03 07:03:47 +00:00
|
|
|
|
|
|
|
volumes:
|
2023-04-04 09:23:28 +00:00
|
|
|
fixturenet_geth_accounts:
|
2023-04-03 12:43:29 +00:00
|
|
|
l1_deployment:
|
2023-04-04 09:23:28 +00:00
|
|
|
l2_accounts:
|
|
|
|
op_node_data:
|