Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooling to deploy nitro espresso integration using cappuccino #54

Draft
wants to merge 3 commits into
base: integration
Choose a base branch
from
Draft
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
8 changes: 8 additions & 0 deletions .env.espresso.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
L1_URL_HTTP=""
L1_URL_WS=""
L1_MNEMONIC=""
L2_OWNER_PRIVATE_KEY=""
L2_CHAIN_ID=412346
LIGHT_CLIENT_ADDR=0xFdBF8b5Ed2c16650aa835315a67d83Eda5c98872
L1_CHAIN_ID=11155111
COMPOSE_FILE=espresso-demo-docker-compose.yaml
256 changes: 256 additions & 0 deletions espresso-demo-docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
services:
blockscout:
depends_on:
- postgres
- sequencer
image: blockscout-testnode
restart: always
container_name: "blockscout"
links:
- postgres:database
command:
- /bin/sh
- -c
- |
bin/blockscout eval "Elixir.Explorer.ReleaseTasks.create_and_migrate()"
node init/install.js postgres 5432
bin/blockscout start
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- ./blockscout/nitro.env
environment:
ETHEREUM_JSONRPC_VARIANT: "geth"
ETHEREUM_JSONRPC_HTTP_URL: http://sequencer:8547/
INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: "true"
DATABASE_URL: postgresql://postgres:@postgres:5432/blockscout
ECTO_USE_SSL: "false"
ports:
- "127.0.0.1:4000:4000"

postgres:
image: postgres:13.6
restart: always
container_name: "postgres"
environment:
POSTGRES_PASSWORD: ""
POSTGRES_USER: "postgres"
POSTGRES_HOST_AUTH_METHOD: "trust"
volumes:
- "postgres-data:/var/lib/postgresql/data"
ports:
- "127.0.0.1:7432:5432"

redis:
image: redis:6.2.6
ports:
- "127.0.0.1:6379:6379"

sequencer:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8547:8547"
- "127.0.0.1:8548:8548"
- "127.0.0.1:9642:9642"
volumes:
- "seqdata:/home/user/.arbitrum/local/nitro"
- "l1keystore:/home/user/l1keystore"
- "config:/config"
- "tokenbridge-data:/tokenbridge-data"
command: --conf.file /config/sequencer_config.json --node.feed.output.enable --node.feed.output.port 9642 --http.api net,web3,eth,txpool,debug --node.seq-coordinator.my-url ws://sequencer:8548 --graphql.enable --graphql.vhosts * --graphql.corsdomain *
depends_on:
- redis

sequencer_b:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8647:8547"
- "127.0.0.1:8648:8548"
volumes:
- "seqdata_b:/home/user/.arbitrum/local/nitro"
- "config:/config"
command: --conf.file /config/sequencer_config.json --node.seq-coordinator.my-url ws://sequencer_b:8548
depends_on:
- redis

sequencer_c:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8747:8547"
- "127.0.0.1:8748:8548"
volumes:
- "seqdata_c:/home/user/.arbitrum/local/nitro"
- "config:/config"
command: --conf.file /config/sequencer_config.json --node.seq-coordinator.my-url ws://sequencer_c:8548
depends_on:
- redis

sequencer_d:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8847:8547"
- "127.0.0.1:8848:8548"
volumes:
- "seqdata_d:/home/user/.arbitrum/local/nitro"
- "config:/config"
command: --conf.file /config/sequencer_config.json --node.seq-coordinator.my-url ws://sequencer_d:8548
depends_on:
- redis

staker-unsafe:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8047:8547"
- "127.0.0.1:8048:8548"
volumes:
- "unsafestaker-data:/home/user/.arbitrum/local/nitro"
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/unsafe_staker_config.json
depends_on:
- sequencer
- redis
- validation_node

poster:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8147:8547"
- "127.0.0.1:8148:8548"
volumes:
- "poster-data:/home/user/.arbitrum/local/nitro"
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/poster_config.json
depends_on:
- redis

poster_b:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:9147:8547"
- "127.0.0.1:9148:8548"
volumes:
- "poster-data-b:/home/user/.arbitrum/local/nitro"
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/poster_config.json
depends_on:
- redis

poster_c:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:9247:8547"
- "127.0.0.1:9248:8548"
volumes:
- "poster-data-c:/home/user/.arbitrum/local/nitro"
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/poster_config.json
depends_on:
- redis

validator:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8247:8547"
- "127.0.0.1:8248:8548"
volumes:
- "validator-data:/home/user/.arbitrum/local/nitro"
- "l1keystore:/home/user/l1keystore"
- "config:/config"
command: --conf.file /config/validator_config.json --http.port 8547 --http.api net,web3,arb,debug,net,eth --ws.port 8548
depends_on:
- sequencer
- validation_node

validation_node:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro-val
ports:
- "127.0.0.1:8949:8549"
volumes:
- "config:/config"
command: --conf.file /config/validation_node_config.json

scripts:
build: scripts/
volumes:
- "l1keystore:/home/user/l1keystore"
- "config:/config"
- "tokenbridge-data:/tokenbridge-data"
environment:
- L1_MNEMONIC

relay:
pid: host
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/relay
ports:
- "127.0.0.1:9652:9652"
command: --chain.id 412346 --node.feed.input.url ws://sequencer:9642 --node.feed.output.port 9652

tokenbridge:
depends_on:
- sequencer
pid: host
build:
context: tokenbridge/
args:
TOKEN_BRIDGE_BRANCH: ${TOKEN_BRIDGE_BRANCH:-}
environment:
- ARB_URL=http://sequencer:8547
- ETH_URL=$L1_URL_HTTP
volumes:
- "tokenbridge-data:/workspace"
- /var/run/docker.sock:/var/run/docker.sock

rollupcreator:
depends_on:
- sequencer
pid: host
build:
context: rollupcreator/
args:
NITRO_CONTRACTS_REPO: ${NITRO_CONTRACTS_REPO:-}
NITRO_CONTRACTS_BRANCH: ${NITRO_CONTRACTS_BRANCH:-}
volumes:
- "config:/config"
- /var/run/docker.sock:/var/run/docker.sock

volumes:
l1data:
consensus:
l1keystore:
seqdata:
seqdata_b:
seqdata_c:
seqdata_d:
unsafestaker-data:
validator-data:
poster-data:
poster-data-b:
poster-data-c:
config:
postgres-data:
tokenbridge-data:
Loading