From 27b7097440010f2094087ac1902cbbba6c87643e Mon Sep 17 00:00:00 2001 From: cby3149 Date: Thu, 21 Nov 2024 14:22:40 -0800 Subject: [PATCH] Add holocence hardfork --- go.mod | 4 ++-- go.sum | 8 ++++---- params/superchain.go | 4 ++++ params/superchain_test.go | 4 ++++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 83feaecd7b2..95ab5bd1a64 100644 --- a/go.mod +++ b/go.mod @@ -270,7 +270,7 @@ require ( go.uber.org/dig v1.17.1 // indirect go.uber.org/fx v1.21.1 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/mod v0.20.0 // indirect + golang.org/x/mod v0.21.0 // indirect golang.org/x/text v0.19.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect @@ -293,4 +293,4 @@ replace github.com/anacrolix/torrent => github.com/erigontech/torrent v1.54.2-al replace github.com/ledgerwatch/erigon-lib => ./erigon-lib -replace github.com/ethereum-optimism/superchain-registry/superchain => github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240926214052-4aa1ce20dfa5 +replace github.com/ethereum-optimism/superchain-registry/superchain => github.com/bobanetwork/superchain-registry/superchain v0.0.0-20241121215800-d562ce7b7272 diff --git a/go.sum b/go.sum index da182237eb2..db63e2f401d 100644 --- a/go.sum +++ b/go.sum @@ -171,8 +171,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240926214052-4aa1ce20dfa5 h1:XvIdo6TKf6KHy0ItEBCF5LHCforqyp2UELpMp1VZlws= -github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240926214052-4aa1ce20dfa5/go.mod h1:XaVXL9jg8BcyOeugECgIUGa9Y3DjYJj71RHmb5qon6M= +github.com/bobanetwork/superchain-registry/superchain v0.0.0-20241121215800-d562ce7b7272 h1:SwaUWhth1re3pezKc0Ml+emvQPpSNC7PrQM4aDb3pyw= +github.com/bobanetwork/superchain-registry/superchain v0.0.0-20241121215800-d562ce7b7272/go.mod h1:9feO8jcL5OZ1tvRjEfNAHz4Aggvd6373l+ZxmZZAyZs= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= github.com/bradfitz/iter v0.0.0-20190303215204-33e6a9893b0c/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= @@ -1015,8 +1015,8 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/params/superchain.go b/params/superchain.go index a0be823f5f2..bd16d93dad0 100644 --- a/params/superchain.go +++ b/params/superchain.go @@ -129,6 +129,7 @@ func LoadSuperChainConfig(opStackChainCfg *superchain.ChainConfig) *chain.Config EcotoneTime: nil, FjordTime: nil, GraniteTime: nil, + HoloceneTime: nil, TerminalTotalDifficulty: common.Big0, TerminalTotalDifficultyPassed: true, Ethash: nil, @@ -149,6 +150,9 @@ func LoadSuperChainConfig(opStackChainCfg *superchain.ChainConfig) *chain.Config if chConfig.GraniteTime != nil { out.GraniteTime = new(big.Int).SetUint64(*chConfig.GraniteTime) } + if chConfig.HoloceneTime != nil { + out.HoloceneTime = new(big.Int).SetUint64(*chConfig.HoloceneTime) + } if chConfig.Optimism != nil { out.Optimism = &chain.OptimismConfig{ EIP1559Elasticity: chConfig.Optimism.EIP1559Elasticity, diff --git a/params/superchain_test.go b/params/superchain_test.go index e90b5e671da..8affb236afa 100644 --- a/params/superchain_test.go +++ b/params/superchain_test.go @@ -18,6 +18,7 @@ type hardforkConfig struct { EcotoneTime *big.Int FjordTime *big.Int GraniteTime *big.Int + HoloceneTime *big.Int EIP1559Elasticity uint64 EIP1559Denominator uint64 EIP1559DenominatorCanyon uint64 @@ -78,6 +79,7 @@ var bobaSepoliaDev0Cfg = hardforkConfig{ EcotoneTime: big.NewInt(1724692141), FjordTime: big.NewInt(1724692150), GraniteTime: big.NewInt(1724914800), + HoloceneTime: big.NewInt(1732435200), EIP1559Elasticity: 6, EIP1559Denominator: 50, EIP1559DenominatorCanyon: 250, @@ -93,6 +95,7 @@ var opSepoliaCfg = hardforkConfig{ EcotoneTime: big.NewInt(1708534800), FjordTime: big.NewInt(1716998400), GraniteTime: big.NewInt(1723478400), + HoloceneTime: big.NewInt(1732633200), EIP1559Elasticity: 6, EIP1559Denominator: 50, EIP1559DenominatorCanyon: 250, @@ -138,6 +141,7 @@ func TestChainConfigByOpStackChainName(t *testing.T) { require.Equal(t, expectedHarhardforkCfg.EcotoneTime, gotCfg.EcotoneTime) require.Equal(t, expectedHarhardforkCfg.FjordTime, gotCfg.FjordTime) require.Equal(t, expectedHarhardforkCfg.GraniteTime, gotCfg.GraniteTime) + require.Equal(t, expectedHarhardforkCfg.HoloceneTime, gotCfg.HoloceneTime) // EIP-1559 require.Equal(t, expectedHarhardforkCfg.EIP1559Elasticity, gotCfg.Optimism.EIP1559Elasticity)