Port over optimism stack and update to use latest releases #1

Merged
ashwin merged 13 commits from deep-stack/fixturenet-optimism-stack:pm-updated-stack into main 2024-05-07 04:18:03 +00:00
2 changed files with 18 additions and 18 deletions
Showing only changes of commit 71cb9cd459 - Show all commits

View File

@ -1,5 +1,5 @@
# fixturenet-optimism-stack # fixturenet-optimism-stack
L1+L2 fixturenet stack with [fixturenet-plugeth](https://git.vdb.to/cerc-io/stack-orchestrator/src/branch/main/stack_orchestrator/data/stacks/fixturenet-plugeth) (L1) and [Optimism](https://stack.optimism.io) (L2) L1+L2 fixturenet stack with [fixturenet-eth](https://git.vdb.to/cerc-io/fixturenet-eth-stacks/src/branch/main/stack-orchestrator/stacks/fixturenet-eth) (L1) and [Optimism](https://stack.optimism.io) (L2)
Stack documentation: [stack/fixturenet-optimism](./stack/fixturenet-optimism/README.md) Stack documentation: [stack/fixturenet-optimism](./stack/fixturenet-optimism/README.md)

View File

@ -1,6 +1,6 @@
# fixturenet-optimism # fixturenet-optimism
Instructions to setup and deploy an end-to-end L1+L2 stack with [fixturenet-plugeth](https://git.vdb.to/cerc-io/stack-orchestrator/src/branch/main/stack_orchestrator/data/stacks/fixturenet-plugeth) (L1) and [Optimism](https://stack.optimism.io) (L2) Instructions to setup and deploy an end-to-end L1+L2 stack with [fixturenet-eth](https://git.vdb.to/cerc-io/fixturenet-eth-stacks/src/branch/main/stack-orchestrator/stacks/fixturenet-eth) (L1) and [Optimism](https://stack.optimism.io) (L2)
We support running just the L2 part of stack, given an external L1 endpoint. Follow the [L2 only doc](./l2-only.md) for the same. We support running just the L2 part of stack, given an external L1 endpoint. Follow the [L2 only doc](./l2-only.md) for the same.
@ -9,14 +9,15 @@ We support running just the L2 part of stack, given an external L1 endpoint. Fol
Clone the stack repo: Clone the stack repo:
```bash ```bash
laconic-so fetch-stack git.vdb.to/cerc-io/fixturenet-eth-stacks
laconic-so fetch-stack git.vdb.to/cerc-io/fixturenet-optimism-stack laconic-so fetch-stack git.vdb.to/cerc-io/fixturenet-optimism-stack
``` ```
Clone required repositories: Clone required repositories:
```bash ```bash
# L1 (fixturenet-plugeth) # L1 (fixturenet-eth)
laconic-so --stack fixturenet-plugeth setup-repositories laconic-so --stack ~/cerc/fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-eth setup-repositories
# L2 (optimism) # L2 (optimism)
laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism setup-repositories laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism setup-repositories
@ -28,13 +29,14 @@ laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism se
Build the container images: Build the container images:
```bash ```bash
# L1 (fixturenet-plugeth) # L1 (fixturenet-eth)
laconic-so --stack fixturenet-plugeth build-containers laconic-so --stack ~/cerc/fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-eth build-containers
# L2 (optimism) # L2 (optimism)
laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism build-containers laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism build-containers
# If redeploying with changes in the stack containers # If redeploying with changes in the stack containers
laconic-so --stack ~/cerc/fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-eth build-containers --force-rebuild
laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism build-containers --force-rebuild laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism build-containers --force-rebuild
# If errors are thrown during build, old images used by this stack would have to be deleted # If errors are thrown during build, old images used by this stack would have to be deleted
@ -43,12 +45,10 @@ laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism bu
Note: this will take >10 mins depending on the specs of your machine, and **requires** 16GB of memory or greater. Note: this will take >10 mins depending on the specs of your machine, and **requires** 16GB of memory or greater.
This should create the required docker images in the local image registry: This should create the required docker images in the local image registry:
* cerc/plugeth-statediff
* cerc/plugeth
* cerc/fixturenet-eth-genesis
* cerc/fixturenet-plugeth-plugeth
* cerc/lighthouse * cerc/lighthouse
* cerc/lighthouse-cli * cerc/lighthouse-cli
* cerc/fixturenet-eth-genesis-premerge
* cerc/fixturenet-eth-geth
* cerc/fixturenet-eth-lighthouse * cerc/fixturenet-eth-lighthouse
* cerc/optimism-contracts * cerc/optimism-contracts
* cerc/optimism-op-node * cerc/optimism-op-node
@ -61,7 +61,7 @@ This should create the required docker images in the local image registry:
First, create a spec file for the deployment, which will map the stack's ports and volumes to the host: First, create a spec file for the deployment, which will map the stack's ports and volumes to the host:
```bash ```bash
laconic-so --stack fixturenet-plugeth deploy init --output fixturenet-plugeth.yml laconic-so --stack ~/cerc/fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-eth deploy init --output fixturenet-eth.yml
laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism deploy init --map-ports-to-host any-fixed-random --output fixturenet-optimism-spec.yml laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism deploy init --map-ports-to-host any-fixed-random --output fixturenet-optimism-spec.yml
``` ```
@ -95,17 +95,17 @@ The default setup (generated by `laconic-so deploy init`) places the volumes in
Once you've made any needed changes to the spec file, create a deployment from it: Once you've made any needed changes to the spec file, create a deployment from it:
```bash ```bash
laconic-so --stack fixturenet-plugeth deploy create --spec-file fixturenet-plugeth.yml --deployment-dir fixturenet-plugeth-deployment laconic-so --stack ~/cerc/fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-eth deploy create --spec-file fixturenet-eth.yml --deployment-dir fixturenet-eth-deployment
laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism deploy create --spec-file fixturenet-optimism-spec.yml --deployment-dir fixturenet-optimism-deployment laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism deploy create --spec-file fixturenet-optimism-spec.yml --deployment-dir fixturenet-optimism-deployment
# Place them both in the same namespace (cluster) # Place them both in the same namespace (cluster)
cp fixturenet-plugeth-deployment/deployment.yml fixturenet-optimism-deployment/deployment.yml cp fixturenet-eth-deployment/deployment.yml fixturenet-optimism-deployment/deployment.yml
``` ```
### Env configuration ### Env configuration
Inside the `fixturenet-plugeth-deployment` deployment directory, open `config.env` file and set following env variables: Inside the `fixturenet-eth-deployment` deployment directory, open `config.env` file and set following env variables:
```bash ```bash
# Allow unprotected txs for Optimism contracts deployment # Allow unprotected txs for Optimism contracts deployment
@ -117,7 +117,7 @@ CERC_ALLOW_UNPROTECTED_TXS=true
Start the deployment: Start the deployment:
```bash ```bash
laconic-so deployment --dir fixturenet-plugeth-deployment start laconic-so deployment --dir fixturenet-eth-deployment start
laconic-so deployment --dir fixturenet-optimism-deployment start laconic-so deployment --dir fixturenet-optimism-deployment start
``` ```
@ -131,7 +131,7 @@ laconic-so deployment --dir fixturenet-optimism-deployment start
To list and monitor the running containers: To list and monitor the running containers:
```bash ```bash
laconic-so --stack fixturenet-plugeth deploy ps laconic-so --stack ~/cerc/fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-eth deploy ps
laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism deploy ps laconic-so --stack ~/cerc/fixturenet-optimism-stack/stack/fixturenet-optimism deploy ps
# With status # With status
@ -209,14 +209,14 @@ To stop all services running in the background, while preserving chain data:
```bash ```bash
laconic-so deployment --dir fixturenet-optimism-deployment stop laconic-so deployment --dir fixturenet-optimism-deployment stop
laconic-so deployment --dir fixturenet-plugeth-deployment stop laconic-so deployment --dir fixturenet-eth-deployment stop
``` ```
To stop all services and also delete chain data: To stop all services and also delete chain data:
```bash ```bash
laconic-so deployment --dir fixturenet-optimism-deployment stop --delete-volumes laconic-so deployment --dir fixturenet-optimism-deployment stop --delete-volumes
laconic-so deployment --dir fixturenet-plugeth-deployment stop --delete-volumes laconic-so deployment --dir fixturenet-eth-deployment stop --delete-volumes
``` ```
## Troubleshooting ## Troubleshooting