Add Optimism Fixturenet stack #266

Merged
prathamesh0 merged 26 commits from pm-fixturenet-optimism into main 2023-04-03 07:03:47 +00:00
2 changed files with 33 additions and 25 deletions
Showing only changes of commit eeb9dab626 - Show all commits

View File

@ -3,12 +3,12 @@ version: '3.7'
services:
fixturenet-optimism-contracts:
hostname: fixturenet-optimism-contracts
image: cerc/optimism-contracts:local
depends_on:
fixturenet-eth-geth-1:
condition: service_healthy
fixturenet-eth-bootnode-lighthouse:
condition: service_healthy
image: cerc/optimism-contracts:local
environment:
CHAIN_ID: 1212
L1_RPC: "http://fixturenet-eth-geth-1:8545"
@ -20,18 +20,18 @@ services:
- ../config/fixturenet-optimism/optimism-contracts/run.sh:/app/packages/contracts-bedrock/run.sh
- fixturenet-geth-accounts:/geth-accounts
- l2-accounts:/l2-accounts
# TODO: Add healthcheck
# healthcheck:
- l1-deployment:/app/packages/contracts-bedrock
op-node-l2-config-gen:
environment:
# TODO: Integrate
L1_RPC: "http://fixturenet-eth-geth-1:8545"
image: cerc/optimism-op-node:local
depends_on:
fixturenet-optimism-contracts:
condition: service_completed_successfully
environment:
L1_RPC: "http://fixturenet-eth-geth-1:8545"
volumes:
- ../config/fixturenet-optimism/generate-l2-config.sh:/app/generate-l2-config.sh
# TODO: Integrate
- ../test/contracts-bedrock:/contracts-bedrock
- l1-deployment:/contracts-bedrock
- op_node_data:/app
command: ["sh", "/app/generate-l2-config.sh"]
@ -43,8 +43,7 @@ services:
volumes:
- ../config/fixturenet-optimism/run-op-geth.sh:/run-op-geth.sh
- op_node_data:/op-node
# TODO: Integrate
- ../test/l2-accounts:/l2-accounts
- l2-accounts:/l2-accounts
entrypoint: "sh"
command: "/run-op-geth.sh"
ports:
@ -67,8 +66,7 @@ services:
volumes:
- ../config/fixturenet-optimism/run-op-node.sh:/app/run-op-node.sh
- op_node_data:/app
# TODO: Integrate
- ../test/l2-accounts:/l2-accounts
- l2-accounts:/l2-accounts
command: ["sh", "/app/run-op-node.sh"]
ports:
- "8547"
@ -91,11 +89,11 @@ services:
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
- l2-accounts:/l2-accounts
entrypoint: "sh"
command: "/run-op-batcher.sh"
volumes:
op_node_data:
l2-accounts:
l1-deployment:

View File

@ -1,13 +1,13 @@
# fixturenet-optimism
Experimental Optimism Fixturenet
Instructions to setup and deploy an end-to-end L1+L2 stack with [fixturenet-eth](../fixturenet-eth/) (L1) and Optimism (L2)
## Setup
Clone required repositories:
```bash
$ laconic-so --stack fixturenet-optimism setup-repositories
laconic-so --stack fixturenet-optimism setup-repositories
```
Checkout to the required versions and branches in repos:
@ -21,23 +21,33 @@ git checkout @eth-optimism/sdk@0.0.0-20230329025055
Build the container images:
```bash
$ laconic-so --stack fixturenet-optimism build-containers
laconic-so --stack fixturenet-optimism build-containers
```
This should create the required docker images in the local image registry:
* cerc/go-ethereum
* cerc/lighthouse
* cerc/fixturenet-eth-geth
* cerc/fixturenet-eth-lighthouse
* cerc/optimism-l2geth
* cerc/optimism-op-batcher
* cerc/optimism-op-node
* cerc/optimism-contracts
* `cerc/go-ethereum`
* `cerc/lighthouse`
* `cerc/fixturenet-eth-geth`
* `cerc/fixturenet-eth-lighthouse`
* `cerc/foundry`
* `cerc/optimism-contracts`
* `cerc/optimism-l2geth`
* `cerc/optimism-op-batcher`
* `cerc/optimism-op-node`
# Deploy
Deploy the stack:
```bash
laconic-so --stack fixturenet-optimism deploy up
```
## Clean up
Stop all services running in the background:
```bash
laconic-so --stack fixturenet-optimism deploy down
$ laconic-so --stack fixturenet-optimism deploy up
```