diff --git a/op-chain-ops/genesis/config.go b/op-chain-ops/genesis/config.go index 7ed0a6e2f682a..69d8999880bbc 100644 --- a/op-chain-ops/genesis/config.go +++ b/op-chain-ops/genesis/config.go @@ -854,12 +854,6 @@ func (d *L1DependenciesConfig) CheckAddresses(dependencyContext DependencyContex // The genesis generation may log warnings, do a best-effort support attempt, // or ignore these attributes completely. type LegacyDeployConfig struct { - // CliqueSignerAddress represents the signer address for the clique consensus engine. - // It is used in the multi-process devnet to sign blocks. - CliqueSignerAddress common.Address `json:"cliqueSignerAddress"` - // L1UseClique represents whether or not to use the clique consensus engine. - L1UseClique bool `json:"l1UseClique"` - // DeploymentWaitConfirmations is the number of confirmations to wait during // deployment. This is DEPRECATED and should be removed in a future PR. DeploymentWaitConfirmations int `json:"deploymentWaitConfirmations"` diff --git a/op-chain-ops/genesis/genesis.go b/op-chain-ops/genesis/genesis.go index c852fa0fc1006..ee78368523588 100644 --- a/op-chain-ops/genesis/genesis.go +++ b/op-chain-ops/genesis/genesis.go @@ -11,7 +11,6 @@ import ( "github.com/ethereum/go-ethereum/consensus/misc/eip1559" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" ) @@ -141,25 +140,12 @@ func NewL1Genesis(config *DeployConfig) (*core.Genesis, error) { LondonBlock: big.NewInt(0), ArrowGlacierBlock: big.NewInt(0), GrayGlacierBlock: big.NewInt(0), - ShanghaiTime: nil, - CancunTime: nil, - } - - extraData := make([]byte, 0) - if config.L1UseClique { - // warning: clique has an overly strict block header timestamp check against the system wallclock, - // causing blocks to get scheduled as "future block" and not get mined instantly when produced. - chainConfig.Clique = ¶ms.CliqueConfig{ - Period: config.L1BlockTime, - Epoch: 30000, - } - extraData = append(append(make([]byte, 32), config.CliqueSignerAddress[:]...), make([]byte, crypto.SignatureLength)...) - } else { - chainConfig.MergeNetsplitBlock = big.NewInt(0) - chainConfig.TerminalTotalDifficulty = big.NewInt(0) - chainConfig.TerminalTotalDifficultyPassed = true - chainConfig.ShanghaiTime = u64ptr(0) - chainConfig.CancunTime = u64ptr(0) + ShanghaiTime: u64ptr(0), + CancunTime: u64ptr(0), + // To enable post-Merge consensus at genesis + MergeNetsplitBlock: big.NewInt(0), + TerminalTotalDifficulty: big.NewInt(0), + TerminalTotalDifficultyPassed: true, } gasLimit := config.L1GenesisBlockGasLimit @@ -178,7 +164,7 @@ func NewL1Genesis(config *DeployConfig) (*core.Genesis, error) { if timestamp == 0 { timestamp = hexutil.Uint64(time.Now().Unix()) } - if !config.L1UseClique && config.L1CancunTimeOffset != nil { + if config.L1CancunTimeOffset != nil { cancunTime := uint64(timestamp) + uint64(*config.L1CancunTimeOffset) chainConfig.CancunTime = &cancunTime } @@ -187,7 +173,7 @@ func NewL1Genesis(config *DeployConfig) (*core.Genesis, error) { Config: &chainConfig, Nonce: uint64(config.L1GenesisBlockNonce), Timestamp: uint64(timestamp), - ExtraData: extraData, + ExtraData: make([]byte, 0), GasLimit: uint64(gasLimit), Difficulty: difficulty.ToInt(), Mixhash: config.L1GenesisBlockMixHash, 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 814fff245b0d1..7fe9a78e71549 100644 --- a/op-chain-ops/genesis/testdata/test-deploy-config-full.json +++ b/op-chain-ops/genesis/testdata/test-deploy-config-full.json @@ -6,8 +6,6 @@ "maxSequencerDrift": 20, "sequencerWindowSize": 100, "channelTimeout": 30, - "l1UseClique": false, - "cliqueSignerAddress": "0x0000000000000000000000000000000000000000", "customGasTokenAddress": "0x0000000000000000000000000000000000000000", "p2pSequencerAddress": "0x9965507d1a55bcc2695c58ba16fb37d819b0a4dc", "batchInboxAddress": "0x42000000000000000000000000000000000000ff", diff --git a/op-e2e/config/init.go b/op-e2e/config/init.go index 9419c1277060d..032f70bf2a883 100644 --- a/op-e2e/config/init.go +++ b/op-e2e/config/init.go @@ -201,9 +201,6 @@ func initAllocType(root string, allocType AllocType) { panic(err) } - // Do not use clique in the in memory tests. Otherwise block building - // would be much more complex. - dc.L1UseClique = false // Set the L1 genesis block timestamp to now dc.L1GenesisBlockTimestamp = hexutil.Uint64(time.Now().Unix()) dc.FundDevAccounts = true diff --git a/op-e2e/e2eutils/secrets.go b/op-e2e/e2eutils/secrets.go index cd4c91e1e09e5..9cee2f25c4c1f 100644 --- a/op-e2e/e2eutils/secrets.go +++ b/op-e2e/e2eutils/secrets.go @@ -19,8 +19,8 @@ const defaultHDPathPrefix = "m/44'/60'/0'/0/" // If these values are changed, it is subject to breaking tests. They // must be in sync with the values in the DeployConfig used to create the system. var DefaultMnemonicConfig = &MnemonicConfig{ - Mnemonic: "test test test test test test test test test test test junk", - CliqueSigner: "m/44'/60'/0'/0/0", + Mnemonic: "test test test test test test test test test test test junk", + // Note: "m/44'/60'/0'/0/0" is a legacy mnemonic path, used for the L1 clique signer. Proposer: "m/44'/60'/0'/0/1", Batcher: "m/44'/60'/0'/0/2", Deployer: "m/44'/60'/0'/0/3", @@ -36,9 +36,8 @@ var DefaultMnemonicConfig = &MnemonicConfig{ type MnemonicConfig struct { Mnemonic string - CliqueSigner string - Deployer string - SysCfgOwner string + Deployer string + SysCfgOwner string // rollup actors Proposer string @@ -66,10 +65,6 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) { if err != nil { return nil, err } - cliqueSigner, err := wallet.PrivateKey(account(m.CliqueSigner)) - if err != nil { - return nil, err - } sysCfgOwner, err := wallet.PrivateKey(account(m.SysCfgOwner)) if err != nil { return nil, err @@ -102,7 +97,6 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) { return &Secrets{ Deployer: deployer, SysCfgOwner: sysCfgOwner, - CliqueSigner: cliqueSigner, Proposer: proposer, Batcher: batcher, SequencerP2P: sequencerP2P, @@ -115,9 +109,8 @@ func (m *MnemonicConfig) Secrets() (*Secrets, error) { // Secrets bundles secp256k1 private keys for all common rollup actors for testing purposes. type Secrets struct { - Deployer *ecdsa.PrivateKey - CliqueSigner *ecdsa.PrivateKey - SysCfgOwner *ecdsa.PrivateKey + Deployer *ecdsa.PrivateKey + SysCfgOwner *ecdsa.PrivateKey // rollup actors Proposer *ecdsa.PrivateKey @@ -138,7 +131,6 @@ type Secrets struct { func (s *Secrets) Addresses() *Addresses { return &Addresses{ Deployer: crypto.PubkeyToAddress(s.Deployer.PublicKey), - CliqueSigner: crypto.PubkeyToAddress(s.CliqueSigner.PublicKey), SysCfgOwner: crypto.PubkeyToAddress(s.SysCfgOwner.PublicKey), Proposer: crypto.PubkeyToAddress(s.Proposer.PublicKey), Batcher: crypto.PubkeyToAddress(s.Batcher.PublicKey), @@ -151,9 +143,8 @@ func (s *Secrets) Addresses() *Addresses { // Addresses bundles the addresses for all common rollup addresses for testing purposes. type Addresses struct { - Deployer common.Address - CliqueSigner common.Address - SysCfgOwner common.Address + Deployer common.Address + SysCfgOwner common.Address // rollup actors Proposer common.Address @@ -169,7 +160,6 @@ type Addresses struct { func (a *Addresses) All() []common.Address { return []common.Address{ a.Deployer, - a.CliqueSigner, a.SysCfgOwner, a.Proposer, a.Batcher, diff --git a/op-wheel/cheat/cheat.go b/op-wheel/cheat/cheat.go index 4b2d428e1029b..1b5089c283648 100644 --- a/op-wheel/cheat/cheat.go +++ b/op-wheel/cheat/cheat.go @@ -138,7 +138,7 @@ func (ch *Cheater) RunAndClose(fn HeadFn) error { // Geth stores the TD for each block separately from the block itself. We must update this // manually, otherwise Geth thinks we haven't reached TTD yet and tries to build a block - // using Clique consensus, which causes a panic. + // using pre-merge consensus, which causes a panic. rawdb.WriteTd(batch, blockHash, preID.Number, ch.Blockchain.GetTd(preID.Hash, preID.Number)) // Need to copy over receipts since they are keyed by block hash. diff --git a/packages/contracts-bedrock/deploy-config/sepolia-devnet-0.json b/packages/contracts-bedrock/deploy-config/sepolia-devnet-0.json index 4239d10c3d071..8cc17a8f668d6 100644 --- a/packages/contracts-bedrock/deploy-config/sepolia-devnet-0.json +++ b/packages/contracts-bedrock/deploy-config/sepolia-devnet-0.json @@ -15,8 +15,6 @@ "l2OutputOracleStartingBlockNumber": 0, "l2OutputOracleProposer": "0x95014c45078354ff839f14192228108eac82e00a", "l2OutputOracleChallenger": "0x8c20c40180751d93e939dddee3517ae0d1ebead2", - "cliqueSignerAddress": "0x0000000000000000000000000000000000000000", - "l1UseClique": false, "l1BlockTime": 12, "l1GenesisBlockTimestamp": "0x0", "l1GenesisBlockNonce": "0x0",