Add instructions to setup and run L2 deployment from scratch
This commit is contained in:
parent
8c672c0966
commit
a6cfdf5325
@ -10,6 +10,96 @@
|
||||
cd /srv
|
||||
```
|
||||
|
||||
<details open>
|
||||
<summary>L2 Optimism</summary>
|
||||
|
||||
## L2 Optimism
|
||||
|
||||
* Stack: <https://git.vdb.to/cerc-io/fixturenet-optimism-stack>
|
||||
|
||||
* Source repos:
|
||||
* <github.com/ethereum-optimism/optimism@v1.7.7>
|
||||
* <github.com/ethereum-optimism/op-geth@v1.101315.2>
|
||||
|
||||
* Target dir: `/srv/l2/optimism-deployment`
|
||||
|
||||
* Cleanup an existing deployment if required:
|
||||
|
||||
```bash
|
||||
cd /srv/l2
|
||||
|
||||
# Stop the deployment
|
||||
laconic-so deployment --dir optimism-deployment stop --delete-volumes
|
||||
|
||||
# Remove the deployment dir
|
||||
sudo rm -rf optimism-deployment
|
||||
```
|
||||
|
||||
### Prerequisites
|
||||
|
||||
* Ansible: see [installation](https://git.vdb.to/cerc-io/ops#installation)
|
||||
|
||||
### Setup
|
||||
|
||||
* Clone the `cerc-io/testnet-ops` repository:
|
||||
|
||||
```bash
|
||||
git clone git@git.vdb.to:cerc-io/testnet-ops.git
|
||||
|
||||
cd testnet-ops/l2-setup
|
||||
```
|
||||
|
||||
* Edit `l2-config.env.j2` and fill in the following values:
|
||||
|
||||
```bash
|
||||
# Chain ID of the L1 chain (Sepolia: 11155111)
|
||||
CERC_L1_CHAIN_ID=11155111
|
||||
|
||||
# L1 RPC endpoint
|
||||
CERC_L1_RPC=
|
||||
|
||||
# L1 RPC endpoint host or IP address
|
||||
CERC_L1_HOST=
|
||||
|
||||
# L1 RPC endpoint port number
|
||||
CERC_L1_PORT=
|
||||
|
||||
# Account credentials for the Admin account
|
||||
# Used for Optimism contracts deployment and funding other generated accounts
|
||||
CERC_L1_ADDRESS=
|
||||
CERC_L1_PRIV_KEY=
|
||||
|
||||
# Funding amount for Optimism Proposer account on L1 (default: 0.2 ether)
|
||||
CERC_L2_PROPOSER_AMOUNT=
|
||||
|
||||
# Funding amount for Optimism Batcher account on L1 (default: 0.1 ether)
|
||||
CERC_L2_BATCHER_AMOUNT=
|
||||
```
|
||||
|
||||
* Update the target dir in `vars.yml`:
|
||||
|
||||
```bash
|
||||
sed -i 's|^l2_directory:.*|l2_directory: /srv/l2|' vars.yml
|
||||
|
||||
# Will create deployment at /srv/l2/optimism-deployment
|
||||
```
|
||||
|
||||
### Run
|
||||
|
||||
* Setup and run L2 by executing the `run-optimism.yml` Ansible playbook:
|
||||
|
||||
```bash
|
||||
LANG=en_IN.utf8 ansible-playbook -i localhost, --connection=local run-optimism.yml --extra-vars='{ "target_host": "localhost"}' --user $USER
|
||||
```
|
||||
|
||||
* For skipping container build, run with `"skip_container_build" : true`:
|
||||
|
||||
```bash
|
||||
LANG=en_IN.utf8 ansible-playbook -i localhost, --connection=local run-optimism.yml --extra-vars='{"target_host" : "localhost", "skip_container_build": true}' -kK --user $USER
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>stage0 laconicd</summary>
|
||||
|
||||
|
@ -22,7 +22,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"map-subscribers-to-participants": "node dist/map-subscribers-to-participants.js"
|
||||
"map-subscribers-to-participants": "node dist/map-subscribers-to-participants.js",
|
||||
"participants-with-filtered-validators": "node dist/participants-with-filtered-validators.js"
|
||||
},
|
||||
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user