From 9b20d69c1d601421ba119ddec1c0995bd9e1306d Mon Sep 17 00:00:00 2001 From: protolambda Date: Mon, 2 Oct 2023 13:11:30 +0200 Subject: [PATCH 1/3] params: add chaosnet, update superchain-registry Signed-off-by: protolambda --- go.mod | 2 +- go.sum | 4 ++-- params/config.go | 3 +++ params/superchain.go | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 47d49e9b39..ca028242b5 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/deckarep/golang-set/v2 v2.1.0 github.com/docker/docker v24.0.5+incompatible github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 - github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20230921190252-f29074de9e36 + github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20231001123245-7b48d3818686 github.com/ethereum/c-kzg-4844 v0.3.1 github.com/fatih/color v1.7.0 github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e diff --git a/go.sum b/go.sum index 0c42674b05..01fb8e8816 100644 --- a/go.sum +++ b/go.sum @@ -173,8 +173,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20230921190252-f29074de9e36 h1:HGDz8DcAkHvZy+iPnBa8yr4MdLqKpb7oAks01P08JOg= -github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20230921190252-f29074de9e36/go.mod h1:q0u2UbyOr1q/y94AgMOj/V8b1KO05ZwILTR/qKt7Auo= +github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20231001123245-7b48d3818686 h1:f57hd8G96c8ORWd4ameFpveSnHcb0hA2D1VatviwoDc= +github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20231001123245-7b48d3818686/go.mod h1:q0u2UbyOr1q/y94AgMOj/V8b1KO05ZwILTR/qKt7Auo= github.com/ethereum/c-kzg-4844 v0.3.1 h1:sR65+68+WdnMKxseNWxSJuAv2tsUrihTpVBTfM/U5Zg= github.com/ethereum/c-kzg-4844 v0.3.1/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= diff --git a/params/config.go b/params/config.go index 5682864225..e03cb28f80 100644 --- a/params/config.go +++ b/params/config.go @@ -36,6 +36,7 @@ const ( OPGoerliChainID = 420 BaseGoerliChainID = 84531 devnetChainID = 997 + chaosnetChainID = 888 ) // OP Stack chain config @@ -46,6 +47,8 @@ var ( BaseGoerliRegolithTime = uint64(1683219600) // March 5, 2023 @ 2:48:00 am UTC devnetRegolithTime = uint64(1677984480) + // August 16, 2023 @ 3:34:22 am UTC + chaosnetRegolithTime = uint64(1692156862) ) func newUint64(val uint64) *uint64 { return &val } diff --git a/params/superchain.go b/params/superchain.go index 1904cf8e8c..94b73d0076 100644 --- a/params/superchain.go +++ b/params/superchain.go @@ -96,6 +96,8 @@ func LoadOPStackChainConfig(chainID uint64) (*ChainConfig, error) { out.RegolithTime = &BaseGoerliRegolithTime case devnetChainID: out.RegolithTime = &devnetRegolithTime + case chaosnetChainID: + out.RegolithTime = &chaosnetRegolithTime } return out, nil From 6b32eec17853b7e8568ef0128f3be38cb82e6311 Mon Sep 17 00:00:00 2001 From: protolambda Date: Mon, 2 Oct 2023 14:02:12 +0200 Subject: [PATCH 2/3] params: fix chaosnet EIP1559Elasticity --- params/superchain.go | 1 + 1 file changed, 1 insertion(+) diff --git a/params/superchain.go b/params/superchain.go index 94b73d0076..3e7a5f4714 100644 --- a/params/superchain.go +++ b/params/superchain.go @@ -98,6 +98,7 @@ func LoadOPStackChainConfig(chainID uint64) (*ChainConfig, error) { out.RegolithTime = &devnetRegolithTime case chaosnetChainID: out.RegolithTime = &chaosnetRegolithTime + out.Optimism.EIP1559Elasticity = 10 } return out, nil From 115a527caa2a29ee77685d59919e6d6c87b6fb1a Mon Sep 17 00:00:00 2001 From: protolambda Date: Mon, 2 Oct 2023 14:02:49 +0200 Subject: [PATCH 3/3] cmd: fix dumpgenesis command --- cmd/utils/flags.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index acfcad8e89..b4f6703a59 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -2199,8 +2199,7 @@ func tryMakeReadOnlyDatabase(ctx *cli.Context, stack *node.Node) ethdb.Database func IsNetworkPreset(ctx *cli.Context) bool { for _, flag := range NetworkFlags { - bFlag, _ := flag.(*cli.BoolFlag) - if ctx.IsSet(bFlag.Name) { + if ctx.IsSet(flag.Names()[0]) { return true } }