Skip to content

Commit a14c0b1

Browse files
vdamleVinod Damlebarnabasbusa
authored
chore: Add example config for hard fork customizations (#91)
* Clarify how to customize hard forks in L2 chain with an example * Minor tweaks to help clarify a couple of other aspects such as usage of configuration parameters etc. Co-authored-by: Vinod Damle <vinod@oplabs.co> Co-authored-by: Barnabas Busa <barnabas.busa@ethereum.org>
1 parent f8d9089 commit a14c0b1

File tree

1 file changed

+42
-3
lines changed

1 file changed

+42
-3
lines changed

README.md

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Welcome to Optimism Package
2-
The default package for Optimism
2+
The default package for Optimism. The kurtosis package uses [op-deployer](https://github.com/ethereum-optimism/optimism/tree/develop/op-deployer) to manage
3+
the L2 chains and all associated artifacts such as contract deployments.
34

45
```yaml
56
optimism_package:
@@ -28,7 +29,7 @@ Kurtosis packages are parameterizable, meaning you can customize your network an
2829
kurtosis run github.com/ethpandaops/optimism-package --args-file https://raw.githubusercontent.com/ethpandaops/optimism-package/main/network_params.yaml
2930
```
3031

31-
For `--args-file` you can pass a local file path or a URL to a file.
32+
For `--args-file` parameters file, you can pass a local file path or a URL to a file.
3233

3334
To clean up running enclaves and data, you can run:
3435

@@ -38,6 +39,15 @@ kurtosis clean -a
3839

3940
This will stop and remove all running enclaves and **delete all data**.
4041

42+
#### Run with changes to the optimism package
43+
44+
If you are attempting to test any changes to the package code, you can point to the directory as the `run` argument
45+
46+
```bash
47+
cd ~/go/src/github.com/ethpandaops/optimism-package
48+
kurtosis run . --args-file ./network_params.yaml
49+
```
50+
4151
# L2 Contract deployer
4252
The enclave will automatically deploy an optimism L2 contract on the L1 network. The contract address will be printed in the logs. You can use this contract address to interact with the L2 network.
4353

@@ -46,7 +56,8 @@ Please refer to this Dockerfile if you want to see how the contract deployer ima
4656

4757
## Configuration
4858

49-
To configure the package behaviour, you can modify your `network_params.yaml` file. The full YAML schema that can be passed in is as follows with the defaults provided:
59+
To configure the package behaviour, you can modify your `network_params.yaml` file and use that as the input to `--args-file`.
60+
The full YAML schema that can be passed in is as follows with the defaults provided:
5061

5162
```yaml
5263
optimism_package:
@@ -292,6 +303,8 @@ optimism_package:
292303
293304
### Additional configuration recommendations
294305
306+
#### L1 customization
307+
295308
It is required you to launch an L1 Ethereum node to interact with the L2 network. You can use the `ethereum_package` to launch an Ethereum node. The `ethereum_package` configuration is as follows:
296309

297310
```yaml
@@ -313,6 +326,32 @@ ethereum_package:
313326
- blockscout
314327
```
315328

329+
#### L2 customization with Hard Fork transitions
330+
331+
To spin up an L2 chain with specific hard fork transition blocks and any local docker image to run the EL/CL components,
332+
use the `network_params` section of your arguments file to specify the hard fork transitions and custom images.
333+
334+
```yaml
335+
optimism_package:
336+
chains:
337+
- participants:
338+
- el_type: op-geth
339+
el_image: "us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:<tag>"
340+
cl_type: op-node
341+
cl_image: "us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:<tag>"
342+
- el_type: op-geth
343+
el_image: "us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:<tag>"
344+
cl_type: op-node
345+
cl_image: "us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:<tag>"
346+
network_params:
347+
fjord_time_offset: 0
348+
granite_time_offset: 0
349+
holocene_time_offset: 4
350+
isthmus_time_offset: 8
351+
```
352+
353+
#### Multiple L2 chains
354+
316355
Additionally, you can spin up multiple L2 networks by providing a list of L2 configuration parameters like so:
317356

318357
```yaml

0 commit comments

Comments
 (0)