diff --git a/.circleci/config.yml b/.circleci/config.yml index b468093883f..9069b14f7fd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -717,42 +717,6 @@ jobs: docker pull $image_name || exit 1 docker run $image_name <> --version || exit 1 - - contracts-bedrock-frozen-code: - machine: true - resource_class: ethereum-optimism/latitude-1 - steps: - - checkout-from-workspace - - check-changed: - patterns: contracts-bedrock - - get-target-branch - - run: - name: Check if target branch is develop or proposal branch - command: | - # If the target branch is not develop or proposal branch, do not run this check - if [ "${TARGET_BRANCH}" != "develop" ] && [[ ! "${TARGET_BRANCH}" =~ ^proposal/.* ]]; then - echo "Target branch is not develop or proposal branch, skipping frozen files check" - circleci-agent step halt - fi - - run: - name: Check if PR has exempt label - command: | - # Get PR number from CIRCLE_PULL_REQUEST - PR_NUMBER=$(echo $CIRCLE_PULL_REQUEST | rev | cut -d/ -f1 | rev) - - # Use GitHub API to get labels - LABELS=$(curl -s "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${PR_NUMBER}" | jq -r .labels) - - # If the PR has the "M-exempt-frozen-files" label, do not run this check - if echo $LABELS | jq -e 'any(.[]; .name == "M-exempt-frozen-files")' > /dev/null; then - echo "Skipping frozen files check, PR has exempt label" - circleci-agent step halt - fi - - run: - name: Check frozen files - command: just check-frozen-code - working_directory: packages/contracts-bedrock - contracts-bedrock-tests: circleci_ip_ranges: true docker: @@ -1158,9 +1122,6 @@ jobs: <> export TEST_TIMEOUT=<> make <> - - codecov/upload: - disable_search: true - files: ./coverage.out - store_test_results: path: ./tmp/test-results - run: @@ -1244,15 +1205,6 @@ jobs: op-acceptance-tests: parameters: - devnet: - description: | - The name of the pre-defined kurtosis devnet to run the acceptance tests against - (e.g. 'simple', 'isthmus', 'interop'). Empty string uses - in-process testing (sysgo orchestrator). Named devnets use - external testing (sysext orchestrator) and must have a - recipe defined in kurtosis-devnet/Justfile. - type: string - default: "" gate: description: The gate to run the acceptance tests against. This gate should be defined in op-acceptance-tests/acceptance-tests.yaml. type: string @@ -1267,42 +1219,6 @@ jobs: resource_class: xlarge steps: - checkout-from-workspace - - run: - name: Setup Kurtosis (if needed) - command: | - if [[ "<>" != "" ]]; then - echo "Setting up Kurtosis for external devnet testing..." - - # Print Kurtosis version - echo "Using Kurtosis from: $(which kurtosis || echo 'not found')" - kurtosis version - - # Start Kurtosis engine - echo "Starting Kurtosis engine..." - kurtosis engine start || true - - # Clean old instances - echo "Cleaning old instances..." - kurtosis clean -a || true - - # Check engine status - kurtosis engine status || true - - echo "Kurtosis setup complete" - else - echo "Using in-process testing (sysgo orchestrator) - no Kurtosis setup needed" - fi - # Notify us of a setup failure - - when: - condition: on_fail - steps: - - discord-notification-failures-on-develop: - mentions: "<@&1346448413172170807>" # Protocol DevX Pod - message: "Devnet <>-devnet failed to start" - - run: - name: Stop the job if the devnet failed to start - command: circleci-agent step halt - when: on_fail # Restore cached Go modules - restore_cache: keys: @@ -1323,13 +1239,13 @@ jobs: name: Run acceptance tests (gate=<>) working_directory: op-acceptance-tests no_output_timeout: 1h - environment: - GOFLAGS: "-mod=mod" - GO111MODULE: "on" - GOGC: "0" command: | - # Run the tests - LOG_LEVEL=debug just acceptance-test "<>" "<>" + if [[ "<>" == "" ]]; then + echo "Running in gateless mode - auto-discovering all tests in ./op-acceptance-tests/..." + else + echo "Running in gate mode (gate=<>)" + fi + LOG_LEVEL=info just acceptance-test "" "<>" - run: name: Print results (summary) working_directory: op-acceptance-tests @@ -1372,37 +1288,12 @@ jobs: steps: - store_artifacts: path: ./op-acceptance-tests/logs - # Dump kurtosis logs if external devnet was used - - run: - name: Dump kurtosis logs (if external devnet was used) - when: on_fail - command: | - if [[ "<>" != "" ]]; then - # Dump logs & specs - kurtosis dump ./.kurtosis-dump - - # Remove spec.json files - rm -rf ./.kurtosis-dump/enclaves/**/*.json - - # Remove all unnecessary logs - rm -rf ./.kurtosis-dump/enclaves/*/kurtosis-api--* - rm -rf ./.kurtosis-dump/enclaves/*/kurtosis-logs-collector--* - rm -rf ./.kurtosis-dump/enclaves/*/task-* - else - echo "In-process testing was used - no kurtosis logs to dump" - fi - - when: - condition: always - steps: - - store_artifacts: - path: ./.kurtosis-dump/enclaves - destination: op-acceptance-tests/kurtosis-logs - when: condition: on_fail steps: - discord-notification-failures-on-develop: mentions: "Platforms (<@225161927351992320>) & Protocol (<@590878816004603924>)" # stefano, changwan - message: "Acceptance tests failed for gate <> on devnet <>" + message: "Acceptance tests failed for gate <>" sanitize-op-program: docker: @@ -1939,11 +1830,6 @@ workflows: - contracts-bedrock-build context: - circleci-repo-readonly-authenticated-github-token - - contracts-bedrock-frozen-code: - requires: - - contracts-bedrock-build - context: - - circleci-repo-readonly-authenticated-github-token - diff-fetcher-forge-artifacts: context: - circleci-repo-readonly-authenticated-github-token @@ -2533,14 +2419,11 @@ workflows: acceptance-tests: when: or: + - equal: ["webhook", << pipeline.trigger_source >>] + # Manual dispatch - and: - - or: - - equal: ["develop", <>] - - matches: { pattern: "^proposal/.*", value: <> } - - equal: ["webhook",<< pipeline.trigger_source >>] - - and: - - equal: [true, <>] - - equal: ["api",<< pipeline.trigger_source >>] + - equal: [true, <>] + - equal: ["api", << pipeline.trigger_source >>] jobs: - initialize: context: @@ -2568,45 +2451,6 @@ workflows: requires: - contracts-bedrock-build - cannon-prestate-quick - # KURTOSIS (Simple) - - op-acceptance-tests: - # Acceptance Testing params - name: kurtosis-simple - devnet: simple - gate: base - # CircleCI params - no_output_timeout: 30m - context: - - circleci-repo-readonly-authenticated-github-token - - discord - requires: - - initialize - # KURTOSIS (Isthmus) - - op-acceptance-tests: - # Acceptance Testing params - name: kurtosis-isthmus - devnet: isthmus - gate: isthmus - # CircleCI params - no_output_timeout: 30m - context: - - circleci-repo-readonly-authenticated-github-token - - discord - requires: - - initialize - # KURTOSIS (Interop) - - op-acceptance-tests: - # Acceptance Testing params - name: kurtosis-interop - devnet: interop - gate: interop - # CircleCI params - no_output_timeout: 30m - context: - - circleci-repo-readonly-authenticated-github-token - - discord - requires: - - initialize # Generate flaky test report - generate-flaky-report: name: generate-flaky-tests-report @@ -2646,45 +2490,6 @@ workflows: requires: - contracts-bedrock-build - cannon-prestate-quick - # KURTOSIS (Simple) - - op-acceptance-tests: - # Acceptance Testing params - name: kurtosis-simple - devnet: simple - gate: base - # CircleCI params - no_output_timeout: 30m - context: - - circleci-repo-readonly-authenticated-github-token - - discord - requires: - - initialize - # KURTOSIS (Isthmus) - - op-acceptance-tests: - # Acceptance Testing params - name: kurtosis-isthmus - devnet: isthmus - gate: isthmus - # CircleCI params - no_output_timeout: 30m - context: - - circleci-repo-readonly-authenticated-github-token - - discord - requires: - - initialize - # KURTOSIS (Interop) - - op-acceptance-tests: - # Acceptance Testing params - name: kurtosis-interop - devnet: interop - gate: interop - # CircleCI params - no_output_timeout: 30m - context: - - circleci-repo-readonly-authenticated-github-token - - discord - requires: - - initialize # Generate flaky test report - generate-flaky-report: name: generate-flaky-tests-report diff --git a/go.mod b/go.mod index d2df6e7cf5f..13172c39f49 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/docker/docker v27.5.1+incompatible github.com/docker/go-connections v0.5.0 github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 - github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20250603144016-9c45ca7d4508 + github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20251006142828-c6753b4d8617 github.com/ethereum/go-ethereum v1.15.11 github.com/fatih/color v1.18.0 github.com/fsnotify/fsnotify v1.9.0 diff --git a/go.sum b/go.sum index e078da3a917..7f222941bb6 100644 --- a/go.sum +++ b/go.sum @@ -230,8 +230,8 @@ github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs= github.com/ethereum-optimism/op-geth v1.101511.1-dev.1.0.20250710181308-c6e05723600e h1:Ur5vjH2RmYqspDBIZH4RymNB6viHFheZkvvHt9W3spQ= github.com/ethereum-optimism/op-geth v1.101511.1-dev.1.0.20250710181308-c6e05723600e/go.mod h1:SkytozVEPtnUeBlquwl0Qv5JKvrN/Y5aqh+VkQo/EOI= -github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20250603144016-9c45ca7d4508 h1:A/3QVFt+Aa9ozpPVXxUTLui8honBjSusAaiCVRbafgs= -github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20250603144016-9c45ca7d4508/go.mod h1:NZ816PzLU1TLv1RdAvYAb6KWOj4Zm5aInT0YpDVml2Y= +github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20251006142828-c6753b4d8617 h1:ocPvHvva9jILii1YJ9X0pW0ExjbfaTuUkZ7AzkE1KlI= +github.com/ethereum-optimism/superchain-registry/validation v0.0.0-20251006142828-c6753b4d8617/go.mod h1:NZ816PzLU1TLv1RdAvYAb6KWOj4Zm5aInT0YpDVml2Y= github.com/ethereum/c-kzg-4844/v2 v2.1.0 h1:gQropX9YFBhl3g4HYhwE70zq3IHFRgbbNPw0Shwzf5w= github.com/ethereum/c-kzg-4844/v2 v2.1.0/go.mod h1:TC48kOKjJKPbN7C++qIgt0TJzZ70QznYR7Ob+WXl57E= github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8= diff --git a/op-deployer/pkg/deployer/broadcaster/keyed.go b/op-deployer/pkg/deployer/broadcaster/keyed.go index 833fe2b0e17..b856490a7be 100644 --- a/op-deployer/pkg/deployer/broadcaster/keyed.go +++ b/op-deployer/pkg/deployer/broadcaster/keyed.go @@ -23,7 +23,7 @@ import ( ) const ( - GasPadFactor = 2.0 + GasPadFactor = 1.2 ) type KeyedBroadcaster struct { diff --git a/op-deployer/pkg/deployer/integration_test/apply_test.go b/op-deployer/pkg/deployer/integration_test/apply_test.go index b8427d3a925..93ebcf569b7 100644 --- a/op-deployer/pkg/deployer/integration_test/apply_test.go +++ b/op-deployer/pkg/deployer/integration_test/apply_test.go @@ -7,12 +7,12 @@ import ( "encoding/hex" "log/slog" "math/big" - "regexp" "strings" "testing" "time" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/bootstrap" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/inspect" "github.com/ethereum/go-ethereum/params" "github.com/ethereum-optimism/optimism/op-service/testutils" @@ -46,6 +46,8 @@ import ( "github.com/stretchr/testify/require" ) +const testCustomGasLimit = uint64(90_123_456) + type deployerKey struct{} func (d *deployerKey) HDPath() string { @@ -144,13 +146,10 @@ func TestEndToEndBootstrapApply(t *testing.T) { } t.Run("default tagged artifacts", func(t *testing.T) { - op_e2e.InitParallel(t) - testutils.RunOnBranch(t, regexp.MustCompile(`^(backports/op-deployer|proposal/op-contracts)/*`)) apply(t, artifacts.DefaultL1ContractsLocator) }) t.Run("local artifacts", func(t *testing.T) { - op_e2e.InitParallel(t) loc, _ := testutil.LocalArtifacts(t) apply(t, loc) }) @@ -248,7 +247,6 @@ func TestGlobalOverrides(t *testing.T) { defer cancel() opts, intent, st := setupGenesisChain(t, devnet.DefaultChainID) - expectedGasLimit := strings.ToLower("0x1C9C380") expectedBaseFeeVaultRecipient := common.HexToAddress("0x0000000000000000000000000000000000000001") expectedL1FeeVaultRecipient := common.HexToAddress("0x0000000000000000000000000000000000000002") expectedSequencerFeeVaultRecipient := common.HexToAddress("0x0000000000000000000000000000000000000003") @@ -260,7 +258,6 @@ func TestGlobalOverrides(t *testing.T) { expectedUseFaultProofs := false intent.GlobalDeployOverrides = map[string]interface{}{ "l2BlockTime": float64(3), - "l2GenesisBlockGasLimit": expectedGasLimit, "baseFeeVaultRecipient": expectedBaseFeeVaultRecipient, "l1FeeVaultRecipient": expectedL1FeeVaultRecipient, "sequencerFeeVaultRecipient": expectedSequencerFeeVaultRecipient, @@ -277,7 +274,6 @@ func TestGlobalOverrides(t *testing.T) { cfg, err := state.CombineDeployConfig(intent, intent.Chains[0], st, st.Chains[0]) require.NoError(t, err) require.Equal(t, uint64(3), cfg.L2InitializationConfig.L2CoreDeployConfig.L2BlockTime, "L2 block time should be 3 seconds") - require.Equal(t, expectedGasLimit, strings.ToLower(cfg.L2InitializationConfig.L2GenesisBlockDeployConfig.L2GenesisBlockGasLimit.String()), "L2 Genesis Block Gas Limit should be 30_000_000") require.Equal(t, expectedBaseFeeVaultRecipient, cfg.L2InitializationConfig.L2VaultsDeployConfig.BaseFeeVaultRecipient, "Base Fee Vault Recipient should be the expected address") require.Equal(t, expectedL1FeeVaultRecipient, cfg.L2InitializationConfig.L2VaultsDeployConfig.L1FeeVaultRecipient, "L1 Fee Vault Recipient should be the expected address") require.Equal(t, expectedSequencerFeeVaultRecipient, cfg.L2InitializationConfig.L2VaultsDeployConfig.SequencerFeeVaultRecipient, "Sequencer Fee Vault Recipient should be the expected address") @@ -705,6 +701,7 @@ func newChainIntent(t *testing.T, dk *devkeys.MnemonicDevKeys, l1ChainID *big.In Eip1559DenominatorCanyon: standard.Eip1559DenominatorCanyon, Eip1559Denominator: standard.Eip1559Denominator, Eip1559Elasticity: standard.Eip1559Elasticity, + GasLimit: testCustomGasLimit, Roles: state.ChainRoles{ L1ProxyAdminOwner: addrFor(t, dk, devkeys.L2ProxyAdminOwnerRole.Key(l1ChainID)), L2ProxyAdminOwner: addrFor(t, dk, devkeys.L2ProxyAdminOwnerRole.Key(l1ChainID)), @@ -842,6 +839,12 @@ func validateOPChainDeployment(t *testing.T, cg codeGetter, st *state.State, int require.False(t, ok, "governance token should not be deployed by default") } + genesis, rollup, err := inspect.GenesisAndRollup(st, chainState.ID) + require.NoError(t, err) + require.Equal(t, rollup.Genesis.SystemConfig.GasLimit, testCustomGasLimit, "rollup gasLimit") + require.Equal(t, genesis.GasLimit, testCustomGasLimit, "genesis gasLimit") + + require.Equal(t, chainIntent.GasLimit, testCustomGasLimit, "chainIntent gasLimit") require.Equal(t, int(chainIntent.Eip1559Denominator), 50, "EIP1559Denominator should be set") require.Equal(t, int(chainIntent.Eip1559Elasticity), 6, "EIP1559Elasticity should be set") } diff --git a/op-deployer/pkg/deployer/pipeline/opchain.go b/op-deployer/pkg/deployer/pipeline/opchain.go index 9a304427e31..b1510a89a2d 100644 --- a/op-deployer/pkg/deployer/pipeline/opchain.go +++ b/op-deployer/pkg/deployer/pipeline/opchain.go @@ -102,7 +102,7 @@ func makeDCI(intent *state.Intent, thisIntent *state.ChainIntent, chainID common L2ChainId: chainID.Big(), Opcm: st.ImplementationsDeployment.OpcmImpl, SaltMixer: st.Create2Salt.String(), // passing through salt generated at state initialization - GasLimit: standard.GasLimit, + GasLimit: thisIntent.GasLimit, DisputeGameType: proofParams.DisputeGameType, DisputeAbsolutePrestate: proofParams.DisputeAbsolutePrestate, DisputeMaxGameDepth: proofParams.DisputeMaxGameDepth, diff --git a/op-deployer/pkg/deployer/standard/standard.go b/op-deployer/pkg/deployer/standard/standard.go index 4b337997959..d127fe4a324 100644 --- a/op-deployer/pkg/deployer/standard/standard.go +++ b/op-deployer/pkg/deployer/standard/standard.go @@ -41,7 +41,8 @@ const ( ContractsV200Tag = "op-contracts/v2.0.0" ContractsV300Tag = "op-contracts/v3.0.0" ContractsV400Tag = "op-contracts/v4.0.0-rc.7" - CurrentTag = ContractsV400Tag + ContractsV410Tag = "op-contracts/v4.1.0" + CurrentTag = ContractsV410Tag ) var DisputeAbsolutePrestate = common.HexToHash("0x038512e02c4c3f7bdaec27d00edf55b7155e0905301e1a88083e4e0a6764d54c") @@ -180,7 +181,7 @@ func DefaultHardforkScheduleForTag(tag string) *genesis.UpgradeScheduleDeployCon return sched case ContractsV180Tag, ContractsV200Tag, ContractsV300Tag: sched.ActivateForkAtGenesis(rollup.Holocene) - case ContractsV400Tag: + case ContractsV400Tag, ContractsV410Tag: sched.ActivateForkAtGenesis(rollup.Holocene) sched.ActivateForkAtGenesis(rollup.Isthmus) default: diff --git a/op-deployer/pkg/deployer/state/chain_intent.go b/op-deployer/pkg/deployer/state/chain_intent.go index 3ad1a3dea3b..727070fc146 100644 --- a/op-deployer/pkg/deployer/state/chain_intent.go +++ b/op-deployer/pkg/deployer/state/chain_intent.go @@ -64,6 +64,7 @@ type ChainIntent struct { Eip1559DenominatorCanyon uint64 `json:"eip1559DenominatorCanyon" toml:"eip1559DenominatorCanyon"` Eip1559Denominator uint64 `json:"eip1559Denominator" toml:"eip1559Denominator"` Eip1559Elasticity uint64 `json:"eip1559Elasticity" toml:"eip1559Elasticity"` + GasLimit uint64 `json:"gasLimit" toml:"gasLimit"` Roles ChainRoles `json:"roles" toml:"roles"` DeployOverrides map[string]any `json:"deployOverrides" toml:"deployOverrides"` DangerousAltDAConfig genesis.AltDADeployConfig `json:"dangerousAltDAConfig,omitempty" toml:"dangerousAltDAConfig,omitempty"` @@ -87,6 +88,7 @@ type ChainRoles struct { } var ErrFeeVaultZeroAddress = fmt.Errorf("chain has a fee vault set to zero address") +var ErrGasLimitZeroValue = fmt.Errorf("chain has a gas limit set to zero value") var ErrNonStandardValue = fmt.Errorf("chain contains non-standard config value") var ErrEip1559ZeroValue = fmt.Errorf("eip1559 param is set to zero value") var ErrIncompatibleValue = fmt.Errorf("chain contains incompatible config value") @@ -105,6 +107,11 @@ func (c *ChainIntent) Check() error { c.Eip1559Elasticity == 0 { return fmt.Errorf("%w: chainId=%s", ErrEip1559ZeroValue, c.ID) } + + if c.GasLimit == 0 { + return fmt.Errorf("%w: chainId=%s", ErrGasLimitZeroValue, c.ID) + } + if c.BaseFeeVaultRecipient == emptyAddress || c.L1FeeVaultRecipient == emptyAddress || c.SequencerFeeVaultRecipient == emptyAddress { diff --git a/op-deployer/pkg/deployer/state/deploy_config.go b/op-deployer/pkg/deployer/state/deploy_config.go index 05123b143e3..c43a218f449 100644 --- a/op-deployer/pkg/deployer/state/deploy_config.go +++ b/op-deployer/pkg/deployer/state/deploy_config.go @@ -39,7 +39,7 @@ func CombineDeployConfig(intent *Intent, chainIntent *ChainIntent, state *State, FundDevAccounts: intent.FundDevAccounts, }, L2GenesisBlockDeployConfig: genesis.L2GenesisBlockDeployConfig{ - L2GenesisBlockGasLimit: 60_000_000, + L2GenesisBlockGasLimit: hexutil.Uint64(chainIntent.GasLimit), L2GenesisBlockBaseFeePerGas: &l2GenesisBlockBaseFeePerGas, }, L2VaultsDeployConfig: genesis.L2VaultsDeployConfig{ diff --git a/op-deployer/pkg/deployer/state/deploy_config_test.go b/op-deployer/pkg/deployer/state/deploy_config_test.go index 53d33d5874f..a91a90a8cbc 100644 --- a/op-deployer/pkg/deployer/state/deploy_config_test.go +++ b/op-deployer/pkg/deployer/state/deploy_config_test.go @@ -5,6 +5,7 @@ import ( "github.com/ethereum-optimism/optimism/op-chain-ops/addresses" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/artifacts" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/standard" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/stretchr/testify/require" @@ -21,6 +22,7 @@ func TestCombineDeployConfig(t *testing.T) { chainIntent := ChainIntent{ Eip1559Denominator: 1, Eip1559Elasticity: 2, + GasLimit: standard.GasLimit, BaseFeeVaultRecipient: common.HexToAddress("0x123"), L1FeeVaultRecipient: common.HexToAddress("0x456"), SequencerFeeVaultRecipient: common.HexToAddress("0x789"), diff --git a/op-deployer/pkg/deployer/state/intent.go b/op-deployer/pkg/deployer/state/intent.go index b60898938d7..e12c356a212 100644 --- a/op-deployer/pkg/deployer/state/intent.go +++ b/op-deployer/pkg/deployer/state/intent.go @@ -152,6 +152,9 @@ func (c *Intent) validateStandardValues() error { chain.Eip1559Elasticity != standard.Eip1559Elasticity { return fmt.Errorf("%w: chainId=%s", ErrNonStandardValue, chain.ID) } + if chain.GasLimit != standard.GasLimit { + return fmt.Errorf("%w: chainId=%s", ErrNonStandardValue, chain.ID) + } if len(chain.AdditionalDisputeGames) > 0 { return fmt.Errorf("%w: chainId=%s additionalDisputeGames must be nil", ErrNonStandardValue, chain.ID) } @@ -294,7 +297,8 @@ func NewIntentCustom(l1ChainId uint64, l2ChainIds []common.Hash) (Intent, error) for _, l2ChainID := range l2ChainIds { intent.Chains = append(intent.Chains, &ChainIntent{ - ID: l2ChainID, + ID: l2ChainID, + GasLimit: standard.GasLimit, }) } return intent, nil @@ -333,6 +337,7 @@ func NewIntentStandard(l1ChainId uint64, l2ChainIds []common.Hash) (Intent, erro Eip1559DenominatorCanyon: standard.Eip1559DenominatorCanyon, Eip1559Denominator: standard.Eip1559Denominator, Eip1559Elasticity: standard.Eip1559Elasticity, + GasLimit: standard.GasLimit, Roles: ChainRoles{ Challenger: challenger, L1ProxyAdminOwner: l1ProxyAdminOwner, diff --git a/op-e2e/config/init.go b/op-e2e/config/init.go index 04aa0fd6209..1c8e93e0e07 100644 --- a/op-e2e/config/init.go +++ b/op-e2e/config/init.go @@ -16,6 +16,7 @@ import ( "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/artifacts" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/inspect" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/pipeline" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/standard" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/state" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum/go-ethereum/common" @@ -386,6 +387,7 @@ func defaultIntent(root string, loc *artifacts.Locator, deployer common.Address, Eip1559Denominator: 250, Eip1559DenominatorCanyon: 250, Eip1559Elasticity: 6, + GasLimit: standard.GasLimit, Roles: state.ChainRoles{ // Use deployer as L1PAO to deploy additional dispute impls L1ProxyAdminOwner: deployer, diff --git a/op-e2e/e2eutils/intentbuilder/builder.go b/op-e2e/e2eutils/intentbuilder/builder.go index 88482bbc11a..448cb72e1c4 100644 --- a/op-e2e/e2eutils/intentbuilder/builder.go +++ b/op-e2e/e2eutils/intentbuilder/builder.go @@ -194,6 +194,7 @@ func (b *intentBuilder) WithL2(l2ChainID eth.ChainID) (Builder, L2Configurator) Eip1559DenominatorCanyon: standard.Eip1559DenominatorCanyon, Eip1559Denominator: standard.Eip1559Denominator, Eip1559Elasticity: standard.Eip1559Elasticity, + GasLimit: standard.GasLimit, DeployOverrides: make(map[string]any), } b.intent.Chains = append(b.intent.Chains, chainIntent) diff --git a/op-e2e/e2eutils/intentbuilder/builder_test.go b/op-e2e/e2eutils/intentbuilder/builder_test.go index eeffb15a14d..ecf7e19d307 100644 --- a/op-e2e/e2eutils/intentbuilder/builder_test.go +++ b/op-e2e/e2eutils/intentbuilder/builder_test.go @@ -13,6 +13,7 @@ import ( "github.com/ethereum-optimism/optimism/op-chain-ops/addresses" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/artifacts" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/standard" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/state" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-service/eth" @@ -157,6 +158,7 @@ func TestBuilder(t *testing.T) { Eip1559DenominatorCanyon: 250, Eip1559Denominator: 50, Eip1559Elasticity: 10, + GasLimit: standard.GasLimit, OperatorFeeScalar: 100, OperatorFeeConstant: 200, DeployOverrides: map[string]any{ diff --git a/packages/contracts-bedrock/justfile b/packages/contracts-bedrock/justfile index 1efb53fd65c..e04ce49a537 100644 --- a/packages/contracts-bedrock/justfile +++ b/packages/contracts-bedrock/justfile @@ -298,10 +298,6 @@ semgrep: semgrep-test: cd ../../ && semgrep scan --test --config .semgrep/rules/ .semgrep/tests/ -# Checks that the frozen code has not been modified. -check-frozen-code: - ./scripts/checks/check-frozen-files.sh - # Runs all checks. check: @just semgrep-test-validity-check \ diff --git a/packages/contracts-bedrock/scripts/checks/check-frozen-files.sh b/packages/contracts-bedrock/scripts/checks/check-frozen-files.sh deleted file mode 100755 index 7391b448690..00000000000 --- a/packages/contracts-bedrock/scripts/checks/check-frozen-files.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Grab the directory of the contracts-bedrock package. -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -# Load semver-utils. -# shellcheck source=/dev/null -source "$SCRIPT_DIR/utils/semver-utils.sh" - -# Path to semver-lock.json. -SEMVER_LOCK="snapshots/semver-lock.json" - -# Create a temporary directory. -temp_dir=$(mktemp -d) -trap 'rm -rf "$temp_dir"' EXIT - -# Exit early if semver-lock.json has not changed. -if ! { git diff origin/develop...HEAD --name-only; git diff --name-only; git diff --cached --name-only; } | grep -q "$SEMVER_LOCK"; then - echo "No changes detected in semver-lock.json" - exit 0 -fi - -# Get the upstream semver-lock.json. -if ! git show origin/develop:packages/contracts-bedrock/snapshots/semver-lock.json > "$temp_dir/upstream_semver_lock.json" 2>/dev/null; then - echo "❌ Error: Could not find semver-lock.json in the snapshots/ directory of develop branch" - exit 1 -fi - -# Copy the local semver-lock.json. -cp "$SEMVER_LOCK" "$temp_dir/local_semver_lock.json" - -# Get the changed contracts. -changed_contracts=$(jq -r ' - def changes: - to_entries as $local - | input as $upstream - | $local | map( - select( - .key as $key - | .value != $upstream[$key] - ) - ) | map(.key); - changes[] -' "$temp_dir/local_semver_lock.json" "$temp_dir/upstream_semver_lock.json") - -# List of files that are allowed to be modified. -# In order to prevent a file from being modified, comment it out. Do not delete it. -# All files in semver-lock.json should be in this list. -ALLOWED_FILES=( - "src/L1/OPContractsManagerStandardValidator.sol:OPContractsManagerStandardValidator" - "src/L1/DataAvailabilityChallenge.sol:DataAvailabilityChallenge" - # "src/L1/ETHLockbox.sol:ETHLockbox" - "src/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger" - "src/L1/L1ERC721Bridge.sol:L1ERC721Bridge" - "src/L1/L1StandardBridge.sol:L1StandardBridge" - "src/L1/OPContractsManager.sol:OPContractsManager" - # "src/L1/OptimismPortal2.sol:OptimismPortal2" - "src/L1/ProtocolVersions.sol:ProtocolVersions" - "src/L1/SuperchainConfig.sol:SuperchainConfig" - "src/L1/SystemConfig.sol:SystemConfig" - "src/L2/BaseFeeVault.sol:BaseFeeVault" - "src/L2/CrossL2Inbox.sol:CrossL2Inbox" - "src/L2/ETHLiquidity.sol:ETHLiquidity" - "src/L2/GasPriceOracle.sol:GasPriceOracle" - "src/L2/L1Block.sol:L1Block" - "src/L2/L1FeeVault.sol:L1FeeVault" - "src/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger" - "src/L2/L2ERC721Bridge.sol:L2ERC721Bridge" - "src/L2/L2StandardBridge.sol:L2StandardBridge" - "src/L2/L2StandardBridgeInterop.sol:L2StandardBridgeInterop" - "src/L2/L2ToL1MessagePasser.sol:L2ToL1MessagePasser" - "src/L2/L2ToL2CrossDomainMessenger.sol:L2ToL2CrossDomainMessenger" - "src/L2/OptimismMintableERC721.sol:OptimismMintableERC721" - "src/L2/OptimismMintableERC721Factory.sol:OptimismMintableERC721Factory" - "src/L2/OptimismSuperchainERC20.sol:OptimismSuperchainERC20" - "src/L2/OptimismSuperchainERC20Beacon.sol:OptimismSuperchainERC20Beacon" - "src/L2/OptimismSuperchainERC20Factory.sol:OptimismSuperchainERC20Factory" - "src/L2/SequencerFeeVault.sol:SequencerFeeVault" - "src/L2/SuperchainERC20.sol:SuperchainERC20" - "src/L2/SuperchainTokenBridge.sol:SuperchainTokenBridge" - "src/L2/SuperchainETHBridge.sol:SuperchainETHBridge" - "src/L2/WETH.sol:WETH" - "src/cannon/MIPS64.sol:MIPS64" - "src/cannon/PreimageOracle.sol:PreimageOracle" - # "src/dispute/AnchorStateRegistry.sol:AnchorStateRegistry" - "src/dispute/DelayedWETH.sol:DelayedWETH" - # "src/dispute/DisputeGameFactory.sol:DisputeGameFactory" - "src/dispute/FaultDisputeGame.sol:FaultDisputeGame" - "src/dispute/PermissionedDisputeGame.sol:PermissionedDisputeGame" - "src/dispute/SuperFaultDisputeGame.sol:SuperFaultDisputeGame" - "src/dispute/SuperPermissionedDisputeGame.sol:SuperPermissionedDisputeGame" - "src/legacy/DeployerWhitelist.sol:DeployerWhitelist" - "src/legacy/L1BlockNumber.sol:L1BlockNumber" - "src/legacy/LegacyMessagePasser.sol:LegacyMessagePasser" - "src/safe/DeputyGuardianModule.sol:DeputyGuardianModule" - "src/safe/DeputyPauseModule.sol:DeputyPauseModule" - "src/safe/LivenessGuard.sol:LivenessGuard" - "src/safe/LivenessModule.sol:LivenessModule" - "src/universal/OptimismMintableERC20.sol:OptimismMintableERC20" - "src/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory" - "src/universal/StorageSetter.sol:StorageSetter" - "src/vendor/asterisc/RISCV.sol:RISCV" - "src/vendor/eas/EAS.sol:EAS" - "src/vendor/eas/SchemaRegistry.sol:SchemaRegistry" -) - -MATCHED_FILES=() -# Check each changed contract against allowed patterns -for contract in $changed_contracts; do - is_allowed=false - for allowed_file in "${ALLOWED_FILES[@]}"; do - if [[ "$contract" == "$allowed_file" ]]; then - is_allowed=true - break - fi - done - if [[ "$is_allowed" == "false" ]]; then - MATCHED_FILES+=("$contract") - fi -done - -if [ ${#MATCHED_FILES[@]} -gt 0 ]; then - echo "❌ Error: Changes detected in files that are not allowed to be modified." - echo "The following files were modified but are not in the allowed list:" - printf ' - %s\n' "${MATCHED_FILES[@]}" - echo "Only the following files can be modified:" - printf ' - %s\n' "${ALLOWED_FILES[@]}" - echo "The code freeze is expected to be lifted no later than 2025-02-20." - exit 1 -fi - -echo "✅ All changes are in allowed files" -exit 0