Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ $ builder-playground cook opstack [flags]
Flags:

- `--external-builder`: URL of an external builder to use (enables rollup-boost)
- `--enable-latest-fork` (int): Enables the latest fork (isthmus) at startup (0) or n blocks after genesis.
- `--enable-latest-fork` (int): Enables the latest fork (jovian) at startup (0) or n blocks after genesis.

### Example Commands

Expand Down
2 changes: 2 additions & 0 deletions playground/artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ func (b *ArtifactsBuilder) Build() (*Artifacts, error) {
input["config"] = map[string]interface{}{
"pragueTime": *forkTime,
"isthmusTime": *forkTime,
"jovianTime": *forkTime,
}
}

Expand Down Expand Up @@ -330,6 +331,7 @@ func (b *ArtifactsBuilder) Build() (*Artifacts, error) {
}
if forkTime != nil {
rollupInput["isthmus_time"] = *forkTime
rollupInput["jovian_time"] = *forkTime
}

newOpRollup, err := overrideJSON(opRollupConfig, rollupInput)
Expand Down
20 changes: 11 additions & 9 deletions playground/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type RollupBoost struct {
func (r *RollupBoost) Run(service *Service, ctx *ExContext) {
service.
WithImage("docker.io/flashbots/rollup-boost").
WithTag("v0.7.5").
WithTag("v0.7.12-rc1").
WithArgs(
"--rpc-host", "0.0.0.0",
"--rpc-port", `{{Port "authrpc" 8551}}`,
Expand Down Expand Up @@ -61,7 +61,7 @@ type OpRbuilder struct {

func (o *OpRbuilder) Run(service *Service, ctx *ExContext) {
service.WithImage("ghcr.io/flashbots/op-rbuilder").
WithTag("v0.2.8").
WithTag("v0.2.13").
WithArgs(
"node",
"--authrpc.port", `{{Port "authrpc" 8551}}`,
Expand Down Expand Up @@ -238,7 +238,7 @@ func (o *OpBatcher) Run(service *Service, ctx *ExContext) {
}
service.
WithImage("us-docker.pkg.dev/oplabs-tools-artifacts/images/op-batcher").
WithTag("v1.12.0-rc.1").
WithTag("v1.16.2").
WithEntrypoint("op-batcher").
WithArgs(
"--l1-eth-rpc", Connect(o.L1Node, "http"),
Expand All @@ -265,7 +265,7 @@ type OpNode struct {
func (o *OpNode) Run(service *Service, ctx *ExContext) {
service.
WithImage("us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node").
WithTag("v1.13.0-rc.1").
WithTag("v1.16.3").
WithEntrypoint("op-node").
WithEnv("A", "B"). // this is just a placeholder to make sure env works since we e2e test with the recipes
WithArgs(
Expand All @@ -275,6 +275,7 @@ func (o *OpNode) Run(service *Service, ctx *ExContext) {
"--l1.http-poll-interval", "6s",
"--l2", Connect(o.L2Node, "authrpc"),
"--l2.jwt-secret", "/data/jwtsecret",
"--rollup.l1-chain-config", "/data/genesis.json",
"--sequencer.enabled",
"--sequencer.l1-confs", "0",
"--verifier.l1-confs", "0",
Expand All @@ -294,6 +295,7 @@ func (o *OpNode) Run(service *Service, ctx *ExContext) {
"--rpc.enable-admin",
"--safedb.path", "/data_db",
).
WithArtifact("/data/genesis.json", "genesis.json").
WithArtifact("/data/jwtsecret", "jwtsecret").
WithArtifact("/data/rollup.json", "rollup.json").
WithVolume("data", "/data_db")
Expand Down Expand Up @@ -335,7 +337,7 @@ func (o *OpGeth) Run(service *Service, ctx *ExContext) {

service.
WithImage("us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth").
WithTag("v1.101503.2-rc.5").
WithTag("v1.101603.5").
WithEntrypoint("/bin/sh").
WithLabel("metrics_path", "/debug/metrics/prometheus").
WithArgs(
Expand Down Expand Up @@ -404,7 +406,7 @@ func (r *RethEL) ReleaseArtifact() *release {
return &release{
Name: "reth",
Org: "paradigmxyz",
Version: "v1.4.8",
Version: "v1.9.3",
Arch: func(goos, goarch string) string {
if goos == "linux" {
return "x86_64-unknown-linux-gnu"
Expand Down Expand Up @@ -439,7 +441,7 @@ func (r *RethEL) Run(svc *Service, ctx *ExContext) {
// start the reth el client
svc.
WithImage("ghcr.io/paradigmxyz/reth").
WithTag("v1.8.2").
WithTag("v1.9.3").
WithEntrypoint("/usr/local/bin/reth").
WithArgs(
"node",
Expand Down Expand Up @@ -716,7 +718,7 @@ type OpReth struct {

func (o *OpReth) Run(service *Service, ctx *ExContext) {
service.WithImage("ghcr.io/paradigmxyz/op-reth").
WithTag("nightly").
WithTag("v1.9.3").
WithEntrypoint("op-reth").
WithArgs(
"node",
Expand Down Expand Up @@ -746,7 +748,7 @@ func (o *OpReth) ReleaseArtifact() *release {
Name: "op-reth",
Repo: "reth",
Org: "paradigmxyz",
Version: "v1.3.12",
Version: "v1.9.3",
Arch: func(goos, goarch string) string {
if goos == "linux" {
return "x86_64-unknown-linux-gnu"
Expand Down
4 changes: 2 additions & 2 deletions playground/genesis_op_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/ethereum/go-ethereum/common"
)

func TestOpGenesisIshtmus(t *testing.T) {
data, err := os.ReadFile("./testcases/l2_genesis_ishtmus.json")
func TestOpGenesisJovian(t *testing.T) {
data, err := os.ReadFile("./testcases/l2_genesis_jovian.json")
if err != nil {
t.Fatalf("failed to read file: %v", err)
}
Expand Down
4 changes: 2 additions & 2 deletions playground/recipe_opstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type OpRecipe struct {
// rollup-boost on the sequencer and uses this URL as the external builder.
externalBuilder string

// whether to enable the latest fork isthmus and when
// whether to enable the latest fork jovian and when
enableLatestFork *uint64

// blockTime is the block time to use for the rollup
Expand Down Expand Up @@ -49,7 +49,7 @@ func (o *OpRecipe) Description() string {
func (o *OpRecipe) Flags() *flag.FlagSet {
flags := flag.NewFlagSet("opstack", flag.ContinueOnError)
flags.StringVar(&o.externalBuilder, "external-builder", "", "External builder URL")
flags.Var(&nullableUint64Value{&o.enableLatestFork}, "enable-latest-fork", "Enable latest fork isthmus (nil or empty = disabled, otherwise enabled at specified block)")
flags.Var(&nullableUint64Value{&o.enableLatestFork}, "enable-latest-fork", "Enable latest fork jovian (nil or empty = disabled, otherwise enabled at specified block)")
flags.Uint64Var(&o.blockTime, "block-time", defaultOpBlockTimeSeconds, "Block time to use for the rollup")
flags.Uint64Var(&o.batcherMaxChannelDuration, "batcher-max-channel-duration", 2, "Maximum channel duration to use for the batcher")
flags.BoolVar(&o.flashblocks, "flashblocks", false, "Whether to enable flashblocks")
Expand Down

Large diffs are not rendered by default.

28 changes: 4 additions & 24 deletions playground/utils/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,19 @@
## Regenerating the Rollup Config

```
# Reset the state
rm state.json
echo '{"version": 1}' > state.json

# NOTE: op-deployer version must match the contract artifacts version in intent.toml
op-deployer apply --workdir . --deployment-target genesis

op-deployer inspect genesis --workdir . --outfile ./genesis.json 13

op-deployer inspect rollup --workdir . --outfile ./rollup.json 13
```

## Updating for New op-deployer Releases
## Updating for New op-deployer Releases / Regenerating Rollup Config

When a new op-deployer version is released, follow these steps:

1. **Download the latest op-deployer:**
```bash
# Check releases at: https://github.com/ethereum-optimism/optimism/releases
# Check releases at: https://github.com/ethereum-optimism/optimism/releases?q=op-deployer
# Download for your platform, e.g.:
curl -L https://github.com/ethereum-optimism/optimism/releases/download/op-deployer/vX.Y.Z/op-deployer-X.Y.Z-darwin-arm64.tar.gz -o op-deployer.tar.gz
tar -xzf op-deployer.tar.gz
chmod +x op-deployer
```

2. **Find the latest stable contract artifacts hash:**
```bash
# Browse the standard.go file from the release tag:
curl -s https://raw.githubusercontent.com/ethereum-optimism/optimism/op-deployer/vX.Y.Z/op-deployer/pkg/deployer/standard/standard.go | grep -A 20 "taggedReleases"
# Look for the latest stable version (avoid beta/rc tags) and get its ContentHash
```
In https://github.com/ethereum-optimism/optimism/op-deployer/vX.Y.Z/op-deployer/pkg/deployer/upgrade
Look for the latest version and get its ContentHash from the ArtifactsURL in the upgrade.go file

3. **Update intent.toml with the new artifacts:**
- Set `l1ContractsLocator` and `l2ContractsLocator` to:
Expand All @@ -46,5 +28,3 @@ When a new op-deployer version is released, follow these steps:
./op-deployer inspect genesis --workdir . --outfile ./genesis.json 13
./op-deployer inspect rollup --workdir . --outfile ./rollup.json 13
```

**Note:** The ContentHash (not ArtifactsHash) is used in the HTTP URL.
Loading
Loading