Skip to content

Commit f435699

Browse files
authored
Document configuration of all services (#291)
* Add readme for config * Insert image, add more description
1 parent b73ee83 commit f435699

File tree

4 files changed

+367
-0
lines changed

4 files changed

+367
-0
lines changed

README_ESPRESSO.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Optimism Espresso Integration
22

3+
Note: For deployment configuration, read `README_ESPRESSO_DEPLOY_CONFIG.md`.
4+
35
## Development environment
46

57
### Clone the repository and initialize the submodules

README_ESPRESSO_DEPLOY_CONFIG.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# Espresso Deployment Configuration
2+
3+
## Intentions
4+
5+
This document is intended to:
6+
7+
- Describe how the devnet is configured in [v0.4.0](https://github.com/EspressoSystems/optimism-espresso-integration/releases/tag/v0.4.0).
8+
- Identify which files and services depend on which parameters.
9+
- Show which components are likely to require updates during future migrations.
10+
- Serve as a stable map when upgrading OP Stack or Celo versions, Espresso releases, chain parameters, contract addresses, or TEE settings.
11+
12+
## Scope
13+
14+
This document describes the configuration of:
15+
16+
- The Docker services defined in `/docker-compose.yml` and `/docker-compose-op-geth.yml`.
17+
- L1 config in `/deployment/l1-config/*`.
18+
- L2 config in `/deployment/l2-config/*`.
19+
- Deployer artifacts in `/deployment/deployer/*`.
20+
21+
The layout in the `espresso` directory is:
22+
```
23+
deployment/
24+
deployer/ # Deployer outputs with contract addresses, registry bootstrap files, and intent specs
25+
l1-config/ # L1 chain config for the genesis, beacon, engine secret, and validator keys
26+
l2-config/ # L2 chain config for the genesis and engine secret
27+
docker/ # Dockerfile and initiation scripts
28+
docker-compose.yml # Docker Compose for all services
29+
docker-compose-op-geth.yml # Docker Compose for the OP Geth services
30+
```
31+
32+
## Configuration Pipeline
33+
34+
![Espresso Deployment Configuration Pipeline](./espresso-deploy-config-pipeline.drawio.png)
35+
36+
The general flow to start up a deployment is to:
37+
1. Build the deployer and contracts.
38+
2. Run `prepare_allocs.sh` to prepare contract allocations.
39+
3. Build `docker-compose.yml` to mount deployment files.
40+
4. Spin up services.
41+
42+
See [README_ESPRESSO.md#run-docker-compose](https://github.com/EspressoSystems/optimism-espresso-integration/blob/celo-integration-rebase-14.1/README_ESPRESSO.md#run-docker-compose) for details about manual steps, which are also included in the `startup.sh` script.
43+
44+
## L1 Configuration
45+
46+
### L1 Config Files
47+
48+
In `espresso/deployment/l1-config/`:
49+
50+
| | Description | Service Dependents | Migration Impact |
51+
| --- | --- | --- | --- |
52+
| `genesis.json` | L1 execution genesis | `l1-geth` | Critical config: `chainId`, prefunded accounts in `alloc` |
53+
| `genesis.ssz` | L1 consensus genesis | `l1-beacon`, `l1-validator` | Stable unless the L1 forks change |
54+
| `config.yaml` | Beacon chain config | `l1-beacon`, `l1-validator` | Critical config: `*_FORK_VERSION`, `SECONDS_PER_SLOT`, `DEPOSIT_CONTRACT_ADDRESS`, `DEPOSIT_CHAIN_ID`, `DEPOSIT_NETWORK_ID` |
55+
| `jwt.txt` | Engine API secret | `l1-beacon`, `l1-geth` | Stable, unless there’s a mismatch |
56+
| `deposit_contract.txt`, `deposit_contract_block.txt` | Deposit contract metadata | `l1-genesis`, `l1-beacon`, `l1-validator` | Stable, unless the deposit contract changes |
57+
| `keystore/` | Validator keys | `l1-validator` | Stable, unless inconsistent |
58+
59+
### L1 Services
60+
61+
In [espresso/docker-compose.yml](https://github.com/EspressoSystems/optimism-espresso-integration/blob/v0.4.0/espresso/docker-compose.yml):
62+
63+
| | Relevant Inputs | Migration Sensitivity |
64+
| --- | --- | --- |
65+
| `l1-genesis` | `genesis.json`, `config.yaml`, `deposit_contract*.txt` | High, affected by genesis fields |
66+
| `l1-geth` | `genesis.json`, `jwt.txt` | High, affected by genesis field changes |
67+
| `l1-beacon` | `genesis.json`, `config.yaml`, `jwt.txt`, `deposit_contract*.txt` | High, affected by fork version changes |
68+
| `l1-validator` | `genesis.json`, `config.yaml`, `jwt.txt`, `deposit_contract*.txt`, `keystore/` | Stable |
69+
70+
## L2 Configuration
71+
72+
### L2 Config Files
73+
74+
In `espresso/deployment/l2-config/`:
75+
76+
| | Description | Service Dependents | Migration Impact |
77+
| --- | --- | --- | --- |
78+
| `genesis.json` | L2 execution genesis | `op-geth-*`, `l2-rollup`, `op-challenger` | Critical config: `chainId`, `timestamp`, prefunded accounts in `alloc`, parameters in`optimism` and `celo` |
79+
| `rollup.json` | Rollup config | `op-node-*`, `caff-node`, `op-challenger` | Critical config: L1 RPC, L1 hash, L1 number, L2 hash, L2 number, L2 time, L2 chain ID |
80+
| `jwt.txt` | Engine API secret | `op-node-*`, `caff-node` | Stable, unless inconsistent |
81+
82+
### L2 Deployer Files
83+
84+
In `espresso/deployment/deployer/`:
85+
86+
| | Description | Service Dependents | Migration Impact |
87+
| --- | --- | --- | --- |
88+
| `bootstrap_*.json` | Bootstrap configuration for contract deployment | `l2-genesis` | Critical config: system contracts, registry fields |
89+
| `intent.toml` | Deployment plan for contracts | `state.json` | Critical config: versions |
90+
| `state.json` | Source of truth for all contract addresses | `op-batcher(-tee)` , `op-proposer(-tee)` , `op-challenger` | Critical config: `DisputeGameFactoryProxy` (note: not `disputeGameFactoryProxyAddress`), `OptimismPortalProxy`, `SystemConfigProxy`, `L2OutputOracleProxy`, `Challenger` |
91+
92+
### L2 Services
93+
94+
- In [docker-compose-op-geth.yml](https://github.com/EspressoSystems/optimism-espresso-integration/blob/v0.4.0/espresso/docker-compose-op-geth.yml):
95+
- `op-geth` : Extending to three `op-geth-*` services in `docker-compose.yml`.
96+
- In [docker-compose.yml](https://github.com/EspressoSystems/optimism-espresso-integration/blob/v0.4.0/espresso/docker-compose.yml):
97+
98+
| | Relevant Inputs | Migration Sensitivity |
99+
| --- | --- | --- |
100+
| `l2-genesis` | `bootstrap_*.json`, `genesis.json`, `state.json`, L1 RPC, | High, affected by L1 contracts and OP/Celo upgrades |
101+
| `op-geth-sequencer`, `op-geth-verifier`, `op-geth-caff-node` | `genesis.json`, `jwt.txt` | High, affected by forks and config changes |
102+
| `l2-rollup` | `genesis.json`, `rollup.json`, `jwt.txt`, L1 RPC, L2 RPC | High, affected by OP/Celo upgrades |
103+
| `op-node-sequencer`, `op-node-verifier` | `genesis.json`, `rollup.json`, `jwt.txt` | High, especially affected by rollup config |
104+
| `caff-node` | `genesis.json`, `rollup.json`, `jwt.txt`, Espresso API URLs, Espresso light client contract | Very high, affected by OP/Celo/Espresso API changes |
105+
| `op-batcher`, `op-proposer` | `genesis.json`, `rollup.json`, `jwt.txt`, `state.json` | Very high, affected by OP/Celo/Espresso API changes |
106+
| `op-batcher-tee`, `op-proposer-tee` | `genesis.json`, `rollup.json`, `jwt.txt`, `state.json` | Very high, affected by OP/Celo/Espresso API changes, and AWS Nitro Enclave changes |
107+
| `op-challenger` | `genesis.json`, `rollup.json`, `jwt.txt`, `state.json`, beacon RPC, L2 RPC, execution config | Very high, affected by consensus and execution changes |
108+
109+
## Espresso Dev Node Configuration
110+
111+
### Espresso Dev Node Service
112+
113+
- In `docker-compose-op-geth.yml`:
114+
115+
| | Relevant Inputs | Migration Sensitivity |
116+
| --- | --- | --- |
117+
| `espresso-dev-node` | L1 RPC, Espresso storage and ports | Moderate, affected by Espresso API |
118+
119+
## Migration Checklist
120+
121+
- Must check/update:
122+
- `state.json`
123+
- `rollup.json`
124+
- L2 `genesis.json`
125+
- L1 fork versions
126+
- Possible to update:
127+
- Deployer bootstrap files
128+
- Intent definitions
129+
- OP/Celo/Espresso flags
130+
- Espresso API URLs
131+
- Espresso light client address
132+
- Rarely updated:
133+
- JWT secret
134+
- Validator keys

0 commit comments

Comments
 (0)