Skip to content

Commit

Permalink
Merge pull request #112 from bobanetwork/support-boba-devnet
Browse files Browse the repository at this point in the history
Support boba devnet
  • Loading branch information
boyuan-chen authored Aug 27, 2024
2 parents 7c7d111 + 6c6377f commit e6513b2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,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-20240819154617-8df002c150f0
replace github.com/ethereum-optimism/superchain-registry/superchain => github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240827163850-4bff0d8a9936
4 changes: 2 additions & 2 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-20240819154617-8df002c150f0 h1:x0hI6E4LkcoNWK6izCSTPSEgwO4RirDf9eDN2M6K2Do=
github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240819154617-8df002c150f0/go.mod h1:zy9f3TNPS7pwW4msMitF83fp0Wf452tZ6+Fg6d4JyXM=
github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240827163850-4bff0d8a9936 h1:4np1Iuf9RWW/P1SbiB/tx9lYsi61x5BSd95BPLFlKFI=
github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240827163850-4bff0d8a9936/go.mod h1:zy9f3TNPS7pwW4msMitF83fp0Wf452tZ6+Fg6d4JyXM=
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
5 changes: 3 additions & 2 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ var (
OPMainnetGenesisHash = libcommon.HexToHash("0x7ca38a1916c42007829c55e69d3e9a73265554b586a499015373241b8a3fa48b")
OPSepoliaGenesisHash = libcommon.HexToHash("0x102de6ffb001480cc9b8b548fd05c34cd4f46ae4aa91759393db90ea0409887d")

BobaMainnetGenesisHash = libcommon.HexToHash("0xdcd9e6a8f9973eaa62da2874959cb152faeb4fd6929177bd6335a1a16074ef9c")
BobaSepoliaGenesisHash = libcommon.HexToHash("0xc6171953a6a376ece6e33149686044f24f58a387ce2636a54e391d330b2326b5")
BobaMainnetGenesisHash = libcommon.HexToHash("0xdcd9e6a8f9973eaa62da2874959cb152faeb4fd6929177bd6335a1a16074ef9c")
BobaSepoliaGenesisHash = libcommon.HexToHash("0xc6171953a6a376ece6e33149686044f24f58a387ce2636a54e391d330b2326b5")
BobaSepoliaDev0GenesisHash = libcommon.HexToHash("0xe919706177d2c568ed21a4b443d421c8098b4e453a29bd432258fab3f7fe1d07")

BobaBnbTestnetGenesisHash = libcommon.HexToHash("0x4d26ddc947c7cea924d5ef272c1a5ef40a1dce5ca2cbbaccad59d33f2505a30d")
)
Expand Down
26 changes: 21 additions & 5 deletions params/superchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@ var bobaBnbTestnetCfg = hardforkConfig{
EIP1559DenominatorCanyon: 250,
}

var bobaSepoliaDev0Cfg = hardforkConfig{
chainID: 288882,
ShanghaiTime: big.NewInt(1724692140),
CancunTime: big.NewInt(1724692141),
BedrockBlock: big.NewInt(0),
RegolithTime: big.NewInt(0),
CanyonTime: big.NewInt(1724692140),
EcotoneTime: big.NewInt(1724692141),
FjordTime: big.NewInt(1724692150),
GraniteTime: nil,
EIP1559Elasticity: 6,
EIP1559Denominator: 50,
EIP1559DenominatorCanyon: 250,
}

var opSepoliaCfg = hardforkConfig{
chainID: 11155420,
ShanghaiTime: big.NewInt(1699981200),
Expand Down Expand Up @@ -132,11 +147,12 @@ func TestChainConfigByOpStackChainName(t *testing.T) {

func TestChainConfigByOpStackGenesisHash(t *testing.T) {
hardforkConfigsByName := map[common.Hash]hardforkConfig{
BobaSepoliaGenesisHash: bobaSepoliaCfg,
BobaMainnetGenesisHash: bobaMainnetCfg,
BobaBnbTestnetGenesisHash: bobaBnbTestnetCfg,
OPSepoliaGenesisHash: opSepoliaCfg,
OPMainnetGenesisHash: opMainnetCfg,
BobaSepoliaDev0GenesisHash: bobaSepoliaDev0Cfg,
BobaSepoliaGenesisHash: bobaSepoliaCfg,
BobaMainnetGenesisHash: bobaMainnetCfg,
BobaBnbTestnetGenesisHash: bobaBnbTestnetCfg,
OPSepoliaGenesisHash: opSepoliaCfg,
OPMainnetGenesisHash: opMainnetCfg,
}

for genesisHash, expectedHarhardforkCfg := range hardforkConfigsByName {
Expand Down

0 comments on commit e6513b2

Please sign in to comment.