diff --git a/.circleci/config.yml b/.circleci/config.yml index b5943c5bc89..59b32cb96ed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -136,7 +136,7 @@ jobs: description: The make target to execute type: string docker: - - image: us-docker.pkg.dev/${GCP_PROJECT_ID}/${GCP_ARTIFACT_REPOSITORY}/images/ci-builder:v1.3.0 + - image: us-docker.pkg.dev/${GCP_PROJECT_ID}/${GCP_ARTIFACT_REPOSITORY}/images/ci-builder:v1.4.0 resource_class: xlarge steps: - attach_workspace: { at: "." } @@ -166,6 +166,10 @@ jobs: name: Cannon-prestate command: make cannon-prestate working_directory: ~/project/boba + - run: + name: Build Contracts + command: make build-contracts + working_directory: ~/project/boba - run: name: print go's available MIPS targets command: go tool dist list | grep mips diff --git a/go.mod b/go.mod index b458539313f..075720c6881 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf github.com/edsrzf/mmap-go v1.1.0 github.com/emicklei/dot v1.6.1 - github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240726164940-d2a098074a5d + github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240916154111-a90e302558bc github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c github.com/gballet/go-verkle v0.0.0-20221121182333-31427a1f2d35 github.com/gfx-labs/sse v0.0.0-20231226060816-f747e26a9baa diff --git a/params/superchain.go b/params/superchain.go index d513a1af771..a295d42f4df 100644 --- a/params/superchain.go +++ b/params/superchain.go @@ -2,6 +2,7 @@ package params import ( "bytes" + "fmt" "math/big" "strings" @@ -95,13 +96,13 @@ func ChainConfigByOpStackGenesisHash(genesisHash common.Hash) *chain.Config { // LoadSuperChainConfig loads superchain config from superchain registry for given chain, and builds erigon chain config. // This implementation is based on op-geth(https://github.com/ethereum-optimism/op-geth/blob/c7871bc4454ffc924eb128fa492975b30c9c46ad/params/superchain.go#L39) func LoadSuperChainConfig(opStackChainCfg *superchain.ChainConfig) *chain.Config { - superchainConfig, ok := superchain.Superchains[opStackChainCfg.Superchain] + chConfig, ok := superchain.OPChains[opStackChainCfg.ChainID] if !ok { - panic("unknown superchain: " + opStackChainCfg.Superchain) + panic("unknown superchain: " + fmt.Sprint(opStackChainCfg.ChainID)) } out := &chain.Config{ - ChainName: opStackChainCfg.Name, - ChainID: new(big.Int).SetUint64(opStackChainCfg.ChainID), + ChainName: chConfig.Name, + ChainID: new(big.Int).SetUint64(chConfig.ChainID), HomesteadBlock: common.Big0, DAOForkBlock: nil, TangerineWhistleBlock: common.Big0, @@ -129,31 +130,31 @@ func LoadSuperChainConfig(opStackChainCfg *superchain.ChainConfig) *chain.Config TerminalTotalDifficultyPassed: true, Ethash: nil, Clique: nil, - Optimism: &chain.OptimismConfig{ - EIP1559Elasticity: 6, - EIP1559Denominator: 50, - EIP1559DenominatorCanyon: 250, - }, } - if opStackChainCfg.CanyonTime != nil { - out.ShanghaiTime = new(big.Int).SetUint64(*opStackChainCfg.CanyonTime) // Shanghai activates with Canyon - out.CanyonTime = new(big.Int).SetUint64(*opStackChainCfg.CanyonTime) + if chConfig.CanyonTime != nil { + out.ShanghaiTime = new(big.Int).SetUint64(*chConfig.CanyonTime) // Shanghai activates with Canyon + out.CanyonTime = new(big.Int).SetUint64(*chConfig.CanyonTime) } - if opStackChainCfg.EcotoneTime != nil { - out.CancunTime = new(big.Int).SetUint64(*opStackChainCfg.EcotoneTime) // CancunTime activates with Ecotone - out.EcotoneTime = new(big.Int).SetUint64(*opStackChainCfg.EcotoneTime) + if chConfig.EcotoneTime != nil { + out.CancunTime = new(big.Int).SetUint64(*chConfig.EcotoneTime) // CancunTime activates with Ecotone + out.EcotoneTime = new(big.Int).SetUint64(*chConfig.EcotoneTime) } - if opStackChainCfg.FjordTime != nil { - out.FjordTime = new(big.Int).SetUint64(*opStackChainCfg.FjordTime) + if chConfig.FjordTime != nil { + out.FjordTime = new(big.Int).SetUint64(*chConfig.FjordTime) } - if opStackChainCfg.GraniteTime != nil { - out.GraniteTime = new(big.Int).SetUint64(*opStackChainCfg.GraniteTime) + if chConfig.GraniteTime != nil { + out.GraniteTime = new(big.Int).SetUint64(*chConfig.GraniteTime) + } + if chConfig.Optimism != nil { + out.Optimism = &chain.OptimismConfig{ + EIP1559Elasticity: chConfig.Optimism.EIP1559Elasticity, + EIP1559Denominator: chConfig.Optimism.EIP1559Denominator, + } + if chConfig.Optimism.EIP1559DenominatorCanyon != nil { + out.Optimism.EIP1559DenominatorCanyon = *chConfig.Optimism.EIP1559DenominatorCanyon + } } - - // note: no actual parameters are being loaded, yet. - // Future superchain upgrades are loaded from the superchain chConfig and applied to the geth ChainConfig here. - _ = superchainConfig.Config // special overrides for OP-Stack chains with pre-Regolith upgrade history switch opStackChainCfg.ChainID {