2023-03-30 05:18:07 +00:00
# fixturenet-optimism
2023-03-23 19:40:42 +00:00
2023-03-31 11:30:35 +00:00
Instructions to setup and deploy an end-to-end L1+L2 stack with [fixturenet-eth ](../fixturenet-eth/ ) (L1) and [Optimism ](https://stack.optimism.io ) (L2)
2023-03-23 19:40:42 +00:00
2023-03-30 05:18:07 +00:00
## Setup
Clone required repositories:
```bash
2023-03-31 10:56:09 +00:00
laconic-so --stack fixturenet-optimism setup-repositories
2023-03-30 05:18:07 +00:00
```
Checkout to the required versions and branches in repos:
```bash
# optimism
cd ~/cerc/optimism
git checkout @eth -optimism/sdk@0.0.0-20230329025055
```
Build the container images:
```bash
2023-03-31 10:56:09 +00:00
laconic-so --stack fixturenet-optimism build-containers
2023-03-30 05:18:07 +00:00
```
This should create the required docker images in the local image registry:
2023-03-31 10:56:09 +00:00
* `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`
2023-03-31 05:10:36 +00:00
2023-04-03 06:18:34 +00:00
## Deploy
2023-03-31 05:10:36 +00:00
Deploy the stack:
```bash
2023-03-31 10:56:09 +00:00
laconic-so --stack fixturenet-optimism deploy up
```
2023-03-31 12:16:54 +00:00
To list down the running containers:
```bash
laconic-so --stack fixturenet-optimism deploy ps
# With status
docker ps
```
2023-04-03 06:18:34 +00:00
## Clean up
2023-03-31 10:56:09 +00:00
Stop all services running in the background:
```bash
laconic-so --stack fixturenet-optimism deploy down
2023-03-31 11:30:35 +00:00
```
Remove volumes created by this stack:
```bash
docker volume ls
docker volume rm laconic-d527651bba3cb61886b36a7400bd2a38_fixturenet-geth-accounts
docker volume rm laconic-d527651bba3cb61886b36a7400bd2a38_l1-deployment
docker volume rm laconic-d527651bba3cb61886b36a7400bd2a38_l2-accounts
docker volume rm laconic-d527651bba3cb61886b36a7400bd2a38_op_node_data
2023-03-31 05:10:36 +00:00
```
2023-04-03 06:12:12 +00:00
2023-04-03 06:18:34 +00:00
## Known Issues
2023-04-03 06:12:12 +00:00
* Currently not supported:
* Stopping and restarting the stack from where it left off; currently starts fresh on a restart
* Pointing Optimism (L2) to external L1 endpoint to allow running only L2 services
2023-04-03 06:37:46 +00:00
* Resource requirements (memory + time) for building `cerc/foundry` image are on the higher side
* `cerc/optimism-contracts` image is currently based on `cerc/foundry` (Optimism requires foundry installation)