diff --git a/go.mod b/go.mod index 30f1e0463ff8..073098a42b8f 100644 --- a/go.mod +++ b/go.mod @@ -235,7 +235,7 @@ require ( rsc.io/tmplfunc v0.0.3 // indirect ) -replace github.com/ethereum/go-ethereum => github.com/celo-org/op-geth v1.101408.1-0.20240917081657-bbf17c79dfc1 +replace github.com/ethereum/go-ethereum => github.com/celo-org/op-geth v1.101408.1-0.20240923132759-84a6afde2ea0 // replace github.com/ethereum/go-ethereum => ../op-geth diff --git a/go.sum b/go.sum index a224bfcad422..476dadc742e6 100644 --- a/go.sum +++ b/go.sum @@ -77,8 +77,8 @@ github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/celo-org/op-geth v1.101408.1-0.20240917081657-bbf17c79dfc1 h1:Zwhv6paw0yB3VlsAVfBVRKCJgChr6+6TDp2vlEJeUy8= -github.com/celo-org/op-geth v1.101408.1-0.20240917081657-bbf17c79dfc1/go.mod h1:Mk8AhvlqFbjI9oW2ymThSSoqc6kiEH0/tCmHGMEu6ac= +github.com/celo-org/op-geth v1.101408.1-0.20240923132759-84a6afde2ea0 h1:Hrt/8ScXO/EDYb7lwzX9/QnNySyzGMJSNswaIDW+usk= +github.com/celo-org/op-geth v1.101408.1-0.20240923132759-84a6afde2ea0/go.mod h1:Mk8AhvlqFbjI9oW2ymThSSoqc6kiEH0/tCmHGMEu6ac= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= diff --git a/op-chain-ops/cmd/celo-migrate/state.go b/op-chain-ops/cmd/celo-migrate/state.go index 4fadf3b62469..f246b2534e22 100644 --- a/op-chain-ops/cmd/celo-migrate/state.go +++ b/op-chain-ops/cmd/celo-migrate/state.go @@ -252,6 +252,12 @@ func applyStateMigrationChanges(config *genesis.DeployConfig, l2Allocs types.Gen EIP1559DenominatorCanyon: &config.EIP1559DenominatorCanyon, EIP1559Elasticity: config.EIP1559Elasticity, } + + // Set the Celo options. + cfg.Celo = ¶ms.CeloConfig{ + EIP1559BaseFeeFloor: config.EIP1559BaseFeeFloor, + } + // Set Optimism hardforks cfg.BedrockBlock = cel2Block.Number() cfg.RegolithTime = &cel2Header.Time diff --git a/op-chain-ops/genesis/config.go b/op-chain-ops/genesis/config.go index 0c7858cb7a20..cf72fce00894 100644 --- a/op-chain-ops/genesis/config.go +++ b/op-chain-ops/genesis/config.go @@ -310,6 +310,8 @@ type EIP1559DeployConfig struct { EIP1559Denominator uint64 `json:"eip1559Denominator"` // EIP1559DenominatorCanyon is the denominator of EIP1559 base fee market when Canyon is active. EIP1559DenominatorCanyon uint64 `json:"eip1559DenominatorCanyon"` + // EIP1559BaseFeeFloor is the fixed floor for the EIP1559 base fee market. + EIP1559BaseFeeFloor uint64 `json:"eip1559BaseFeeFloor,omitempty"` } var _ ConfigChecker = (*EIP1559DeployConfig)(nil) diff --git a/op-chain-ops/genesis/genesis.go b/op-chain-ops/genesis/genesis.go index fe0a04eb9378..621362f52e0d 100644 --- a/op-chain-ops/genesis/genesis.go +++ b/op-chain-ops/genesis/genesis.go @@ -39,7 +39,6 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro if eip1559Elasticity == 0 { eip1559Elasticity = 10 } - optimismChainConfig := params.ChainConfig{ ChainID: new(big.Int).SetUint64(config.L2ChainID), HomesteadBlock: big.NewInt(0), @@ -75,6 +74,9 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro EIP1559Elasticity: eip1559Elasticity, EIP1559DenominatorCanyon: &eip1559DenomCanyon, }, + Celo: ¶ms.CeloConfig{ + EIP1559BaseFeeFloor: config.EIP1559BaseFeeFloor, + }, } gasLimit := config.L2GenesisBlockGasLimit diff --git a/op-chain-ops/genesis/testdata/test-deploy-config-full.json b/op-chain-ops/genesis/testdata/test-deploy-config-full.json index cd51a99cfcdc..3138d293d113 100644 --- a/op-chain-ops/genesis/testdata/test-deploy-config-full.json +++ b/op-chain-ops/genesis/testdata/test-deploy-config-full.json @@ -93,5 +93,6 @@ "daChallengeWindow": 0, "daResolveWindow": 0, "daResolverRefundPercentage": 0, - "deployCeloContracts": false + "deployCeloContracts": false, + "eip1559BaseFeeFloor": 5000000000 } diff --git a/packages/contracts-bedrock/scripts/getting-started/config-vars-celo.sh b/packages/contracts-bedrock/scripts/getting-started/config-vars-celo.sh index 82c009804f07..09f85226fad7 100755 --- a/packages/contracts-bedrock/scripts/getting-started/config-vars-celo.sh +++ b/packages/contracts-bedrock/scripts/getting-started/config-vars-celo.sh @@ -109,6 +109,7 @@ cat << EOL > tmp_config.json "eip1559Denominator": 50, "eip1559DenominatorCanyon": 250, "eip1559Elasticity": 6, + "eip1559BaseFeeFloor": 5000000000, EOL # Append conditional environment variables with their corresponding default values