From 58a0932a0db38918fc0ebfad4790b60a0681ab7b Mon Sep 17 00:00:00 2001 From: Kelvin Fichter Date: Tue, 28 Oct 2025 11:53:01 -0400 Subject: [PATCH 1/5] feat: run dev features thru normal tests --- .circleci/config.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ee30a568c85a1..b87b9470cdb04 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -887,6 +887,10 @@ jobs: description: List of changed files to run tests on type: string default: contracts-bedrock + dev_features: + description: Comma-separated list of dev features to enable (e.g., "OPTIMISM_PORTAL_INTEROP,ANOTHER_FEATURE") + type: string + default: "" steps: - checkout-from-workspace - run: @@ -920,6 +924,8 @@ jobs: working_directory: packages/contracts-bedrock - go-save-cache: namespace: packages/contracts-bedrock/scripts/go-ffi + - setup-dev-features: + dev_features: <> - run: name: Run tests command: | @@ -2404,20 +2410,19 @@ workflows: - contracts-bedrock-tests: # Test everything except PreimageOracle.t.sol since it's slow. name: contracts-bedrock-tests - test_list: find test -name "*.t.sol" -not -name "PreimageOracle.t.sol" + test_list: find test -name "*.t.sol" + dev_features: <> + matrix: + parameters: + dev_features: &dev_features_matrix + - main + - OPTIMISM_PORTAL_INTEROP + - CANNON_KONA,DEPLOY_V2_DISPUTE_GAMES context: - circleci-repo-readonly-authenticated-github-token requires: - initialize check_changed_patterns: contracts-bedrock,op-node - - contracts-bedrock-tests: - # PreimageOracle test is slow, run it separately to unblock CI. - name: contracts-bedrock-tests-preimage-oracle - test_list: find test -name "PreimageOracle.t.sol" - context: - - circleci-repo-readonly-authenticated-github-token - requires: - - initialize - contracts-bedrock-tests: # Heavily fuzz any fuzz tests within added or modified test files. name: contracts-bedrock-tests-heavy-fuzz-modified @@ -2436,7 +2441,7 @@ workflows: dev_features: <> matrix: parameters: - dev_features: ["main", "OPTIMISM_PORTAL_INTEROP","CANNON_KONA,DEPLOY_V2_DISPUTE_GAMES"] + dev_features: *dev_features_matrix # need this requires to ensure that all FFI JSONs exist requires: - contracts-bedrock-build From baebe96c8e6cbbac23990b418cab53b7d8e5bae5 Mon Sep 17 00:00:00 2001 From: Kelvin Fichter Date: Tue, 28 Oct 2025 11:54:40 -0400 Subject: [PATCH 2/5] fix: test suite names --- .circleci/config.yml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b87b9470cdb04..53427757d49e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2408,8 +2408,17 @@ workflows: context: - circleci-repo-readonly-authenticated-github-token - contracts-bedrock-tests: - # Test everything except PreimageOracle.t.sol since it's slow. - name: contracts-bedrock-tests + # Heavily fuzz any fuzz tests within added or modified test files. + name: contracts-bedrock-tests-heavy-fuzz-modified + test_list: git diff origin/develop...HEAD --name-only --diff-filter=AM -- './test/**/*.t.sol' | sed 's|packages/contracts-bedrock/||' + test_timeout: 1h + test_profile: ciheavy + context: + - circleci-repo-readonly-authenticated-github-token + requires: + - initialize + - contracts-bedrock-tests: + name: contracts-bedrock-tests <> test_list: find test -name "*.t.sol" dev_features: <> matrix: @@ -2423,16 +2432,6 @@ workflows: requires: - initialize check_changed_patterns: contracts-bedrock,op-node - - contracts-bedrock-tests: - # Heavily fuzz any fuzz tests within added or modified test files. - name: contracts-bedrock-tests-heavy-fuzz-modified - test_list: git diff origin/develop...HEAD --name-only --diff-filter=AM -- './test/**/*.t.sol' | sed 's|packages/contracts-bedrock/||' - test_timeout: 1h - test_profile: ciheavy - context: - - circleci-repo-readonly-authenticated-github-token - requires: - - initialize - contracts-bedrock-coverage: # Generate coverage reports. name: contracts-bedrock-coverage <> @@ -2442,11 +2441,10 @@ workflows: matrix: parameters: dev_features: *dev_features_matrix - # need this requires to ensure that all FFI JSONs exist - requires: - - contracts-bedrock-build context: - circleci-repo-readonly-authenticated-github-token + requires: + - initialize - contracts-bedrock-tests-upgrade: name: contracts-bedrock-tests-upgrade <>-mainnet fork_op_chain: <> From a5585d9b8690c0c922d803456709c52a0e2673d0 Mon Sep 17 00:00:00 2001 From: Kelvin Fichter Date: Tue, 28 Oct 2025 17:17:30 -0400 Subject: [PATCH 3/5] fix: skip test for v2 dispute game feature --- packages/contracts-bedrock/test/scripts/VerifyOPCM.t.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/contracts-bedrock/test/scripts/VerifyOPCM.t.sol b/packages/contracts-bedrock/test/scripts/VerifyOPCM.t.sol index 2fa98d442422a..a09475447d39b 100644 --- a/packages/contracts-bedrock/test/scripts/VerifyOPCM.t.sol +++ b/packages/contracts-bedrock/test/scripts/VerifyOPCM.t.sol @@ -297,6 +297,11 @@ contract VerifyOPCM_Run_Test is VerifyOPCM_TestInit { address blueprint = ref.addr; bytes memory blueprintCode = blueprint.code; + // Skip the V2 dispute games blueprint when feature is enabled. + if (blueprintCode.length == 0 && isDevFeatureEnabled(DevFeatures.DEPLOY_V2_DISPUTE_GAMES)) { + continue; + } + // We don't care about immutable references for blueprints. // Pick a random position. uint256 randomDiffPosition = vm.randomUint(0, blueprintCode.length - 1); From 4f4173be60c745aa884a40943c2032297fa62f4b Mon Sep 17 00:00:00 2001 From: Kelvin Fichter Date: Tue, 28 Oct 2025 17:48:50 -0400 Subject: [PATCH 4/5] fix: build go ffi --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 53427757d49e1..0dbf83daebb73 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1077,6 +1077,10 @@ jobs: name: Pull artifacts command: bash scripts/ops/pull-artifacts.sh working_directory: packages/contracts-bedrock + - run: + name: Build go-ffi + command: just build-go-ffi + working_directory: packages/contracts-bedrock - run: name: Install lcov command: | From 58fb59747701429f2d6f063b4a71a801ee2c10da Mon Sep 17 00:00:00 2001 From: Kelvin Fichter Date: Tue, 28 Oct 2025 18:04:26 -0400 Subject: [PATCH 5/5] fix: build source before coverage tests --- .circleci/config.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0dbf83daebb73..940a44fc2fb22 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1077,10 +1077,6 @@ jobs: name: Pull artifacts command: bash scripts/ops/pull-artifacts.sh working_directory: packages/contracts-bedrock - - run: - name: Build go-ffi - command: just build-go-ffi - working_directory: packages/contracts-bedrock - run: name: Install lcov command: | @@ -1097,6 +1093,14 @@ jobs: key: forked-state-contracts-bedrock-tests-upgrade-{{ checksum "packages/contracts-bedrock/pinnedBlockNumber.txt" }} - setup-dev-features: dev_features: <> + - run: + name: Build go-ffi + command: just build-go-ffi + working_directory: packages/contracts-bedrock + - run: + name: Build contract source + command: just build-source + working_directory: packages/contracts-bedrock - run: name: Run coverage tests command: just coverage-lcov-all <>