forked from cerc-io/stack-orchestrator
9ffa9bb5a9
* Check existing L1 contracts deployment * Rename volume used for generated L2 config * Check for existing L2 geth data directory * Cross check existing L2 config against L1 deployment config * Verify sequencer key in existing L2 geth data directory * Add instructions to troubleshoot corrupt L2 geth dir * Separate out instructions to run L2 with external L1 * Update docs
2.3 KiB
2.3 KiB
fixturenet-optimism
Instructions to setup and deploy L2 fixturenet using Optimism
Setup
Prerequisite: An L1 Ethereum RPC endpoint
Clone required repositories:
laconic-so --stack fixturenet-optimism setup-repositories --exclude cerc-io/go-ethereum
Checkout to the required versions and branches in repos:
# Optimism
cd ~/cerc/optimism
git checkout @eth-optimism/sdk@0.0.0-20230329025055
Build the container images:
laconic-so --stack fixturenet-optimism build-containers --include cerc/foundry,cerc/optimism-contracts,cerc/optimism-op-node,cerc/optimism-l2geth,cerc/optimism-op-batcher
This should create the required docker images in the local image registry:
cerc/foundry
cerc/optimism-contracts
cerc/optimism-l2geth
cerc/optimism-op-batcher
cerc/optimism-op-node
Deploy
Update the l1-params.env file with L1 endpoint (L1_RPC
, L1_HOST
and L1_PORT
) and other params
- NOTE:
- Stack Orchestrator needs to be run in
dev
mode to be able to edit the env file - If L1 is running on the host machine, use
host.docker.internal
as the hostname to access the host port
- Stack Orchestrator needs to be run in
Deploy the stack:
laconic-so --stack fixturenet-optimism deploy up --include fixturenet-optimism
The fixturenet-optimism-contracts
service may take a while (~15 mins
) to complete running as it:
- waits for the 'Merge' to happen on L1
- waits for a finalized block to exist on L1 (so that it can be taken as a starting block for roll ups)
- deploys the L1 contracts
To list down and monitor the running containers:
laconic-so --stack fixturenet-optimism deploy ps
# With status
docker ps
# Check logs for a container
docker logs -f <CONTAINER_ID>
Clean up
Stop all services running in the background:
laconic-so --stack fixturenet-optimism deploy down --include fixturenet-optimism
Clear volumes created by this stack:
# List all relevant volumes
docker volume ls -q --filter name=laconic*
# Remove all the listed volumes
docker volume rm $(docker volume ls -q --filter name=laconic*)
Troubleshooting
See Troubleshooting