Skip to content

Commit

Permalink
Merge pull request #126 from bobanetwork/add-holocence-hardfork
Browse files Browse the repository at this point in the history
Add holocene hardfork
  • Loading branch information
boyuan-chen authored Nov 22, 2024
2 parents 4186357 + 27b7097 commit c5f9ede
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
4 changes: 4 additions & 0 deletions params/superchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions params/superchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c5f9ede

Please sign in to comment.