Skip to content

Karlb/celo rebase 17 preview#427

Draft
karlb wants to merge 99 commits intokarlb/celo-rebase-17-upstreamfrom
karlb/celo-rebase-17-3
Draft

Karlb/celo rebase 17 preview#427
karlb wants to merge 99 commits intokarlb/celo-rebase-17-upstreamfrom
karlb/celo-rebase-17-3

Conversation

@karlb
Copy link

@karlb karlb commented Mar 3, 2026

WIP

Based on upstream commit ethereum-optimism@a812660.

CI failures

The following CI jobs must fail until celo-rebase-17 is pushed since they reference that branch:

  • op-reth-compact-codec
  • semgrep-scan-local
  • rust-e2e test failing due to *** Test killed with quit: ran too long (44m0s).

Manual changes after rebase

  • Delete MISE_VERSION from CircleCI settings since a more recent version is required and it defaults to the correct verson
  • Deploy and use new karlb/circleci-utils@1.0.26 orb, which uses version 1.0.24, but I had to increase the version number due to a bad immutable deployment. We don't have any changes to the orb compared to OP, but their orb is not public. See also https://clabsco.slack.com/archives/C05G2P1LJ1L/p1772553632130619.
  • Disabled semver check. Semver handling was already partially disabled and we're not making use of it. So it doesn't make sense check for updated semver in CI.

LLM summary of merge conflicts:

  1. .circleci/config.yml (7 conflicts across multiple commits) - The upstream restructured this from a monolithic 3500-line config to a thin 150-line setup file. All Celo CI changes were applied to .circleci/continue/main.yml instead:
    • Disabled 16 workflows using when: false
    • Commented out CUSTOM_GAS_TOKEN and OPTIMISM_PORTAL_INTEROP feature matrix entries
    • Changed resource_class to celo-org/xlarge and celo-org/2xlarge for self-hosted runners
    • Reverted 4 jobs using setup_remote_docker back to CircleCI xlarge runners
    • Commented out circleci_ip_ranges: true
    • Added export ETH_RPC_URL="$MAINNET_RPC_URL" to coverage/upgrade tests
    • Set semgrep diff_branch to celo-rebase-17
    • Changed coverage-lcov-all to coverage-lcov
    • Disabled upgrade tests and check-kontrol-build job via branch filter
  2. Initializable.t.sol - Updated array size from 11 to 12 (HEAD's 11 + Celo's src/celo/* exclusion)
  3. go.mod/go.sum - Kept Celo's celo-org/op-geth fork
  4. op-node/service.go - Fixed bigs.Uint64Strict lint requirement
  5. op-alt-da/damgr_test.go - Fixed state.lastPrunedCommitment field access (changed to use Prune return value)
  6. .semgrepignore - Merged both HEAD's rust/op-alloy/book/ and Celo's src/celo/ exclusions
  7. batcher_test.go - Took HEAD's skip message (both sides had the same skip)
  8. l1_block_info.go - Fixed bigs.Uint64Strict lint requirement

theochap and others added 28 commits February 19, 2026 18:52
…ism#19256)

kona-client is an FPVM guest program (#![no_std]) with no CLI argument
handling. The `--version` smoke test doesn't apply to it.

Fixes ethereum-optimism#19255
…hereum-optimism#18873)

Introduce a unified Registry type that can replace the 14+ separate                                                                                                                                                                                                                                                      
locks.RWMap instances in the Orchestrator. The Registry provides:                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                         
- Single map storage keyed by ComponentID (from Phase 1)                                                                                                                                                                                                                                                                 
- Secondary indexes by ComponentKind and ChainID for efficient queries                                                                                                                                                                                                                                                   
- Type-safe generic accessor functions (RegistryGet, RegistryGetByKind, etc.)                                                                                                                                                                                                                                            
- Thread-safe concurrent access via sync.RWMutex                                                                                                                                                                                                                                                                         
- Registrable interface for self-registering components                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                         
Also adds HasChainID() helper to ComponentID to reduce code duplication.                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                         
This is Phase 2 of the ID type system refactor. The Registry is designed                                                                                                                                                                                                                                                 
to coexist with existing RWMap fields during incremental migration.


Amendments:
* op-devstack: avoid calling range callbacks under lock
…artifact output paths (ethereum-optimism#19251)

Move kona-node, op-reth, and related docker image references from
ghcr.io (op-rs/kona, paradigmxyz) to the oplabs-tools-artifacts GCP
registry. Also fix the prestate build output directory to use an
absolute path and update CI to write artifacts to a dedicated
per-kind directory.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…thereum-optimism#19189)

* Refactor Finalized Head Management in EngineController

This commit updates the engine controller to introduce a more flexible
finalized head management approach. Key changes include:

- Introduce `FinalizedHead()` method to dynamically select finalized
  head
- Deprecate direct `finalizedHead` field in favor of new method
- Add support

* add stubs

* Implement FinalizedL2Head with cross-verifier consensus check

* WIP

* Update FinalizedL2Head method with improved fallback logic

The changes modify the `FinalizedL2Head` method in multiple files to:
- Introduce a second return value to signal when local finalized head
  should be used
- Handle cases with no registered verifiers
- Provide more detailed logging
- Improve error handling for unfinalized verifier states

* Refactor Interop Service Finalized L2 Block Tracking

The commit introduces a robust implementation for tracking finalized L2
blocks in the Interop service. Key changes include:

- Implement `LatestFinalizedL2Block` method with logic to find the
  latest verified L2 block based on the finalized L1 block
- Add finalized L2 head tracking in `mockSuperAuthority` for testing
- Expand test coverage for finalized head progression in
  `head_progression_test.go`

* Rename Test to Better Describe Safe Head Progression

* Add Safe and Finalized Head Progression Checks

Extend head progression test to verify both safe and finalized
block progression in the supernode interop scenario. Ensures that
both safe and finalized heads stall when interop activity is
paused and correctly catch

* Update Supernode interop safe head progression test

This commit enhances the `TestSupernodeInterop_SafeHeadProgression` test
by
adding an additional validation step. It now checks that the L1 origin
of
finalized L2 blocks is at or behind the L1 finalized head, providing an
extra
layer of sanity checking for cross-chain head progression.

* Return to Genesis Block as Safe/Finalized Head Fallback

This change modifies the `SafeL2Head()` and `FinalizedHead()` methods to
return the genesis block when no safe or finalized head is yet
established, instead of returning an empty `L2BlockRef`.

The key changes are:
- Fetch the genesis block from the engine when no safe/finalized head is
  available
- Panic if the genesis block cannot be retrieved, as this represents a
  critical system failure

* Add time travel to supernode interop tests

* Update Interop verification to include L1 head context

* Replace `L1Head` with `L1Inclusion` in interop functionality

* lint

* Add FinalizedHead tests to engine and supernode

* engine-controller: update localFinalizedHead

* Update SafeL2Head test to return genesis block with empty SuperAuthority

* add comment

* interop activity: expose VerifiedBlockAtL1 instead of
LatestFinalizedL2Block

the chain container calls this with the finalized l1 of its virtual
node, in order to satisfy the FinalizedL2Head() API

* interop algo: update result.L1Inclusion semantics

the earliest L1 block such that all L2 blocks at the supplied timestamp
were derived from a source at or before that L1 block

* interop verification: return error when there are no chains

add unit test coverage for the algo

* remove unused fn

* do not panic if we cannot get genesis block from engine

* fix test

* add comments

* tidy
)

* ci: Switch auth used to publish kona prestates.

* ci: Only publish kona prestates on push to develop, not scheduled builds.
…um-optimism#19270)

The workflow used `or` logic, causing it to run on any scheduled
pipeline with branch=develop or any webhook push to any branch.
Change to `and` so it only fires on webhook pushes to develop.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…thereum-optimism#19275)

* test(contracts): improve DelayedWETH test coverage with fuzz tests

- Convert unlock tests to fuzz: testFuzz_unlock_once_succeeds,
  testFuzz_unlock_twice_succeeds
- Convert withdraw success tests to fuzz:
  testFuzz_withdraw_whileUnlocked_succeeds,
  testFuzz_withdraw_withdrawFromWhileUnlocked_succeeds
- Convert hold tests to fuzz: testFuzz_hold_byOwner_succeeds,
  testFuzz_hold_withoutAmount_succeeds, testFuzz_hold_byNonOwner_fails
- Convert recover tests to fuzz: testFuzz_recover_byNonOwner_fails,
  testFuzz_recover_moreThanBalance_succeeds
- Add testFuzz_recover_partialAmount_succeeds for _wad < balance branch
- Add testFuzz_hold_withoutAmount_byNonOwner_fails for hold(address)
  non-owner access control
- Add DelayedWETH_Version_Test with SemverComp.parse validation

* fix(test): rename hold test to satisfy 4-part naming convention

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
kona-host is built in the kona-build-release job already.
…reum-optimism#19278)

* ci: disable incremental compilation and bump rust cache version

- Set CARGO_INCREMENTAL=0 in rust-setup-env to disable incremental
  compilation for all Rust CI jobs, reducing cache size and improving
  reproducibility
- Bump rust build cache version from 15 to 16 to invalidate stale caches
- Use a YAML anchor in main.yml so the cache version only needs to be
  set once

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(ci): remove stale ci jobs

* ci: pin nightly toolchain and add weekly bump job

- Add c-rust-nightly-version pipeline parameter (pinned to
  nightly-2025-11-01) to prevent surprise breakages from transitive deps
  incompatible with the latest nightly (e.g. shellexpand-3.1.1)
- Update rust-install-toolchain to link a pinned nightly as "nightly"
  so existing `cargo +nightly` commands keep working
- Replace all hardcoded `toolchain_version: nightly` with the parameter
- Add rust-bump-nightly-pin job that opens a PR each week bumping the
  pin to the latest available nightly
- Add scheduled-rust-nightly-bump workflow triggering on build_weekly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…thereum-optimism#19254)

* proofs: Port TestInteropFaultProofs_UnsafeProposal test to devstack

* Fix unsafe proposal test to deterministically order safe heads
* feat: policy engine staking

* feat: slots tests

* fix: pre-pr

* fix: linter

* fix: linter

* feat: inmutable contract

* fix: check link to self

* fix: natspec

* fix: make

* feat: improving code

* feat: improving code

* fix: lint

* fix: comments

* fix: comments

* feat: improving tests

* fix: linter

* fix: linter

* style: formatting

* style: formatting

* style: formatting

* feat polish improvments and comments

* feat: polish and comments

* feat: sender and fuzz

* fix: bugs and sender

* fix: natspec

* feat: policy engine refactor (ethereum-optimism#867)

* feat: add V2 policy engine implementation

* chore: undo foundry.toml modification

* fix: stake function available if not allowlisted

* refactor: rename PolicyEngineStakingV2 -> PolicyEngineStaking

* refactor: remove stake function, add allowlist check when same beneficiary

* refactor: make peData functions arg uint128

* chore: add comments

* test: add fuzz testing

* test: max approval on setup

* refactor: remove helper function

* chore: make link not puasable

* feat: rename functions, add token to constructor

* feat: add deployment script

* fix: wrong foundry.toml

* fix: pr (ethereum-optimism#868)

* chore: make owner address public

* refactor: rename data->stakingData

* docs: natspec

* refactor: improve checks

* fix: pre-pr

* fix: foundry.toml

* fix: comments and link

* chore: bump solidity version

* feat: add named members in mapping

* fix: revert contract creation on zero address

* refactor: reduce parameters size

* chore: undo unnecessary casting

* fix: revert on same beneficiary linking

* perf: optimize stake() sstores

* feat: add transferOwnership

* refactor: update stakedAmount after decrease

* chore: make change beneficiary pausable

* feat: unlink after allowance revoked

* refactor: remove linking concept and use beneficiary instead

* docs: improve natspec

* test: stake() after being revoked reverts

* feat: add ISemver

* fix: conflicts

* refactor: improve var naming

* test: transferOwnership

* refactor; vars naming

* chore: improve comments

* chore downgrade pragma

* fix: pre-pr

* fix: wrong foundry.toml

* chore: improve comments

* fix: ci failing

* fix: pre-pr

* fix: self allowlist

* feat: disable self-allowlist

* docs: improve natspec

---------

Co-authored-by: Chiin <77933451+0xChin@users.noreply.github.com>
Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com>
Co-authored-by: OneTony <onetony@defi.sucks>
* op-supernode: add TestCleanShutdown

return from supernode.Start() function without waiting for the context
to be cancelled

* improve test

* pass bg context to supernode start in test

* mock runnable activity: calling stop causes start to return

this mirrors the interop activity, for example

* op-supernode: several improvements to lifecycle management

* improve robustness of TestRunnableActivityGating

since activities are started async and we don't have a way to wait on
them, there is a race betwen start and stop in this test

* reinstate fix
… 3) (ethereum-optimism#18874)

Introduce L2ELCapable interface that captures shared behavior across                                                                                                                                                                                                                                                     
L2ELNode, RollupBoostNode, and OPRBuilderNode without requiring them to                                                                                                                                                                                                                                                  
share an ID() method signature.                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                         
This enables polymorphic lookups where code can find any L2 EL-capable                                                                                                                                                                                                                                                   
component by key+chainID, regardless of concrete type:                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                         
  sequencer, ok := FindL2ELCapableByKey(registry, "sequencer", chainID)                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                         
Previously this required manual multi-registry lookups checking each                                                                                                                                                                                                                                                     
type separately.
* feat: add Karst hard fork activation

Adds the forking logic for the Karst network upgrade, following
the same pattern as the Jovian activation (PR ethereum-optimism#13722).

* feat: Update to op-geth with karst fork

* fix: add Karst to genesis allocs, deploy config, and fork numbering

Fixes interop test failures caused by Solidity Fork enum and Go
SolidityForkNumber being out of sync after Karst addition.

* fix: enable KarstTime in applyHardforks

op-geth now includes KarstTime in HardforkConfig, so the
TODO guard is no longer needed.

* fix: add Karst to deploy config test fork overrides

The fork ordering validation requires karst before interop.

* fix: exclude Karst from upgrade-tx batch test

Karst has no upgrade deposit transactions, so user txs in its
activation block should not be rejected.

* fix: add Karst to remaining e2e and op-wheel files

Cover the remaining files that had Jovian entries but were missing
Karst equivalents.
* ci: tag security oncall for contracts failures

* fix: solidity interface mismatch

* ci: fix store_test_results syntax for contracts jobs

Use when: always directly on store_test_results steps instead of wrapping
in a conditional block, and broaden path from results.xml to results dir.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(contracts): use correct Foundry env vars for fork RPC retries

FORK_RETRIES and FORK_BACKOFF were never consumed by Foundry — the
correct env var names are FOUNDRY_FORK_RETRIES and
FOUNDRY_FORK_RETRY_BACKOFF. Without these, fork tests had no retry
protection against RPC 429 rate limit errors, causing CI flakes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…e 4) (ethereum-optimism#18875)

* op-devstack: add capability interfaces for polymorphic lookups (Phase 3)                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                           
Introduce L2ELCapable interface that captures shared behavior across                                                                                                                                                                                                                                                     
L2ELNode, RollupBoostNode, and OPRBuilderNode without requiring them to                                                                                                                                                                                                                                                  
share an ID() method signature.                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                         
This enables polymorphic lookups where code can find any L2 EL-capable                                                                                                                                                                                                                                                   
component by key+chainID, regardless of concrete type:                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                         
  sequencer, ok := FindL2ELCapableByKey(registry, "sequencer", chainID)                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                         
Previously this required manual multi-registry lookups checking each                                                                                                                                                                                                                                                     
type separately.

* refactor(op-devstack): migrate Orchestrator to unified Registry (Phase 4)                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                         
Replace 15 separate locks.RWMap registry fields in Orchestrator with a                                                                                                                                                                                                                                                   
single unified *stack.Registry. This completes the ID type system refactor                                                                                                                                                                                                                                               
by consolidating all component storage into one registry with secondary                                                                                                                                                                                                                                                  
indexes for efficient lookups by kind and chainID.                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                         
Key changes:                                                                                                                                                                                                                                                                                                             
- Remove l1ELs, l1CLs, l1Nets, l2ELs, l2CLs, l2Nets, batchers, proposers,                                                                                                                                                                                                                                                
  challengers, rollupBoosts, oprbuilderNodes, supervisors, clusters,                                                                                                                                                                                                                                                     
  superchains, and faucets fields from Orchestrator                                                                                                                                                                                                                                                                      
- Add single registry *stack.Registry field                                                                                                                                                                                                                                                                              
- Update GetL2EL to use FindL2ELCapableByKey for polymorphic lookups                                                                                                                                                                                                                                                     
- Update Hydrate to iterate by kind with explicit ordering                                                                                                                                                                                                                                                               
- Update ControlPlane methods to use registry lookups                                                                                                                                                                                                                                                                    
- Migrate ~24 files to use registry.Register() and registry.Get() patterns                                                                                                                                                                                                                                               
- Change l2MetricsEndpoints from locks.RWMap to map with sync.RWMutex                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                         
All 54 stack tests pass.

* fix(op-devstack): address PR ethereum-optimism#18875 review feedback
* feat: l2cm impl l2contractsmanager (ethereum-optimism#837)

* feat: add initial iteration of L2ContractsManager

* feat: add network configuration structs

* feat: load full config for L2ContractsManager

* feat: implement L2CM::_apply

* feat: add gas price oracle

* refactor: move L2CM types to library

* fix: upgrade ProxyAdmin predeploy

* chore: enforce delegatecall for L2CM::upgrade

* feat: add conditional upgrade for CGT

* refactor: remove non-proxied predeploys

* chore: renamed l2cm

* refactor: l2cm address comments (ethereum-optimism#839)

* refactor: rename _fullConfig to _loadFullConfig to match OPCM v2

* chore: remove non-proxied weth from implementations struct

* test: add config preservation test

* test: add CGT specific tests

* refactor: avoid casting network config values to address

* test: add test cases

* chore: pr ready (ethereum-optimism#844)

* chore: remove unnecesary casting on L2CM

* feat: add interface for XForkL2ContractsManager

* chore: add natspec to XForkL2ContractsManager

* chore: pr ready

* refactor: moves util functions out of L2CM implementation (ethereum-optimism#848)

* feat: l2cm address comments (ethereum-optimism#850)

* chore: add comment clarifying use `useCustomGasToken`

* chore: upgrade both native native asset liquidity and liquidity controller predeploys together

* feat: prohibit downgrading predeploy implementations

* refactor: make isCustomGasToken part of the network full config

* fix: add missing import

* fix: use FeeVault legacy getters for backward compat

* chore: update name XForkL2ContractsManager to L2ContractsManager

* feat: conditionally skip some predeploys based on them being supported in a given chain (ethereum-optimism#857)

* fix: l2cm address comments (ethereum-optimism#872)

* chore: add todo tracking removal of L2ProxyAdmin skips

* chore: add natspec comment for isPredeployNamespace

* chore: use vm.prank(address,bool) to prank a delegatecall

* chore: add todo for dev flags for CrossL2Inbox and L2ToL2CrossDomainMessenger

* feat: allow immutables for L2CM in semgrep rules

* chore: pr ready

* test: L2CM verify testing (ethereum-optimism#874)

* test: add coverage test for predeploy upgrades

* chore: update test natspec

* chore: just pr ready

* chore: L2CM round comments (ethereum-optimism#877)

* refactor: move helper function into Predeploys.s.sol

* fix: add conditional deployer to L2CM

* chore: update to l1block and l1blockCGT

* test: fixes issue where OptimismSuperchainERC20 tests fail due to profile ambiguity

* chore: just pr ready

* chore: l2cm round comments2 (ethereum-optimism#883)

* fix: move code length check out of isUpgradeable

* chore: inline fullCofig_.isCustomGasToken initialization

* chore: add public getters for the implementations on the L2CM

* chore: remove XForkL2ContractsManager sol rule exclusion

* test: add downgrade prevention test suite

* chore: just pr ready

* refactor: check for address 0 instead code length

* Revert "refactor: check for address 0 instead code length"

This reverts commit 1fa8694.

* chore: remove non-needed check

* chore: remove unused function in tests (ethereum-optimism#884)

* refactor: l2cm group impls (ethereum-optimism#885)

* refactor: remove individual getters in favor of a unified one

* test: add test for getImplementations

* test: add OZ v5 Initializable compatibility in L2ContractsManagerUtils (ethereum-optimism#887)
…thereum-optimism#19305)

* add much logging

* op-devstack/supernode: check Start error, and cancel Start context
before calling Stop

* devstack/supernode: eliminate duplicated lifecycle management

* use interop name instead of reflection

---------

Co-authored-by: Axel Kingsley <axel.kingsley@gmail.com>
…erop flag (ethereum-optimism#19302)

* op-devstack: refactor genesis interop activation to use UseGenesisInterop flag

Extracts genesis timestamp resolution out of WithSharedSupernodeCLsInterop
and into withSharedSupernodeCLsImpl via a new UseGenesisInterop field on
SupernodeConfig. Adds WithSupernodeInteropAtGenesis() option and threads
snOpts through defaultSupernodeSuperProofsSystem so callers can pass
supernode options independently of deployer options.

Ported from ethereum-optimism#19242

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Skip failing test.

* Move test that stops the batcher to its own package.

* Skip one more test.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…#19323)

* fix(contracts-bedrock): resolve VerifyOPCM bytecode mismatch from compiler profile ambiguity

When `additional_compiler_profiles` is configured in foundry.toml, contracts
pulled into the dispute profile's compilation graph get compiled with both
default (999999 optimizer runs) and dispute (5000 runs) profiles. PR ethereum-optimism#19111
added L2ProxyAdmin extending ProxyAdmin, which pulled ProxyAdmin (and
transitively OptimismMintableERC20Factory) into the dispute profile graph.

On CI (Linux), `vm.getCode("ProxyAdmin")` non-deterministically resolves to
the dispute profile artifact (6149 bytes creation code), while VerifyOPCM reads
the default profile artifact from disk (6751 bytes). This mismatch causes
VerifyOPCM_Failed() across all chains and feature flags on CI, while passing
locally on macOS where the resolution order differs.

The fix adds `DeployUtils.getCode()` which constructs explicit artifact file
paths (`forge-artifacts/<Name>.sol/<Name>.json`) to always resolve the default
profile. All `vm.getCode()` callsites in scripts and tests are migrated to use
this helper. A semgrep rule enforces this going forward.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(contracts-bedrock): add try/catch fallback and cicoverage gas test fix

Add try/catch fallback to DeployUtils.getCode() so the Go script host
(which doesn't support explicit artifact paths) gracefully falls back
to vm.getCode(_name). Also add "/" passthrough for callers passing
explicit paths.

Fix L1ChugSplashProxy OOG gas test: under cicoverage, the now-correct
default-profile proxy bytecode is larger, leaving insufficient retained
gas (1/64 rule) for the require message. Use generic vm.expectRevert()
for unoptimized profiles — the test still verifies the revert occurs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(contracts-bedrock): fix semgrep findings in DeployUtils and L1ChugSplashProxy

Rename try/catch return variable to `code_` (trailing underscore convention)
and add L1ChugSplashProxy.t.sol to expectrevert-no-args exclusion list since
the bare vm.expectRevert() is intentional (OOG produces no revert data).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(contracts-bedrock): skip explicit artifact path under coverage

Under coverage profiles, forge-artifacts/ contains the default profile's
(optimized) artifacts, not the coverage profile's. Since coverage profiles
have no additional_compiler_profiles, there is no profile ambiguity, so
plain vm.getCode() resolves correctly. Skip the explicit artifact path
under vm.isContext(Coverage) to avoid bytecode mismatches between artifact-
loaded code and fresh compilation in tests (DeployFeesDepositor, DeployMIPS).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(contracts-bedrock): wrap isContext in try/catch for Go host compat

The Go script host doesn't implement vm.isContext(), causing a revert
that propagates up as an unrecognized selector error. Wrap the coverage
detection in try/catch so the Go host silently falls through to the
artifact-path resolution (which itself falls back to vm.getCode).

Also adds a comment explaining why the catch block is intentionally empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@karlb karlb changed the base branch from celo-rebase-16 to karlb/celo-rebase-17-upstream March 3, 2026 11:32
@karlb karlb force-pushed the karlb/celo-rebase-17-3 branch from 5a77945 to 83ccd9e Compare March 3, 2026 13:05
gastonponti and others added 27 commits March 6, 2026 13:39
* test(altda): add test for altda->ethda failover

* feat(batcher): altda->ethda failover when altda is down

* chore: fix typos

* fix(fakeDAServer): handlePut was still handling put when in failover mode

* Fix logs

---------

Co-authored-by: Samuel Laferriere <samlaf92@gmail.com>
* Add Prometheus metrics for AltDA failover in Batcher

* Fix calls of RecordBatchDaType

* Revert deleted comment

* Add metrics for total stored batch size

* Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes

* Add missing namespace to prometheus definition

* Fix the amount of batch sizes recorded for DA

* Unify recordings of size of batch to be stored

* Improve Prometheus help text
* test(altda): add a test to make sure altda node keeps finalizing even after failover to ethda

Currently it does not, as shown by the test TestAltDA_FinalizationAfterEthDAFailover failing

* fix(damgr): ethda failover finalization stall bug

Weiwei from Polymer found this bug. He proposed a solution. This is an alternative solution which seems simpler, but not 100% of its soundness.

* fix: damgr_test doesn't compile

* chore: add more logs to damgr and altda_data_source

* docs(altda_test): fix typo

---------

Co-authored-by: Samuel Laferriere <samlaf92@gmail.com>
… holocene order (#379)

* fix(batcher): altda parallel submitted blobs respect strict holocene order (#21)

test(e2e): new altda e2e test for concurrent blob submissions to maintain new holocene strict ordering rules

test(batcher): add altda unit tests for unhappy failure cases (except channel timeout)

test(batcher): fix flaky driver tests + speed them up

test(batcher): robustify batcher driver altda tests

fix(batcher): altda concurrent blob responses are reordered to respect holocene strict ordering rules

docs: fix typos and add documentation comments for some batcher public methods

test(op-alt-da): fix MockDAClient.DeleteData decrement semantic

chore(batcher): move channel failover behavior from TxFailed to AltDASubmissionFailed

The failover logic in the failover feature commits was aded on TxFailed, as the separate function AltDASubmissionFailed didn't exist yet. This change makes it much cleaner as a tx having failed cannot lead to a failover given... since that would come from an ethereum issue.

fix(batcher): bug in sendTransaction

chore(test-logger): fix test logger.Crit which wasn't getting flushed

test(batcher): fix altDASetup w new channel config

DaType was added, so needed to change config to use DaTypeAltDA

style: wrap errors

style(damock): dont explicitly initialize to 0

We make use default values instead

docs(batcher-test): document why channel timeout test is left unimplemented

docs(batcher): fix todos in batcher readme

chore: make lint-go-fix

docs(batcher): fix readme typo

* Change test to write a log instead of stdout

---------

Co-authored-by: Samuel Laferriere <samlaf92@gmail.com>
Add default to switch for lint

Allow to override with flags the celo forks

22nd Jan 2026: Noted that we didn't need to set the PectraBlobScheduleTime
flag, but now we do need to keep it as removing it would be a hardfork.
* isthmus: Update L1Block contract bytecode

---------

Co-authored-by: Gastón Ponti <gaston.ponti@clabs.co>
Co-authored-by: Gaston Ponti <pontigaston@gmail.com>
It is also prepared for using the bridged WETH as fee currency, but we
are currently lacking a simple way to send fee currency txs, so I left
the final tx out.
This uses the default fee-currency-directory address from op-geth.
It will fix the issue that the EVM calls into the directoy will fail
when executed on the local devnet.

e2e: use `--broadcast` with `forge create` (#281)

Forge started to require the `--broadcast` flag for actually deploying a
contract. Otherwise it will only do a dry-run.

We should really pin our foundry version. But let's wait until we rebase
to the latest upstream, since there have been changes to the overall
setup.

Closes #278
These tests perform a check at the end to ensure that the total funds
after a test match the total funds before the test.

We had modified the state transition function to direct baseFee payments
to the fee handler instead of optimism's OperatorFeeVault when in a cel2
context.

This caused the tests to fail because the tests were not including the
balance of the fee handler.

This change ensures that we do consider the fee handler balance when
calculating the total.
The test was configured with MaxFrameSize: 150 which was too small
for the compressed block data (~291 bytes), causing 2 frames per
block instead of 1. This doubled the AltDA Store count from the
expected 5 to 10.

Fixed by increasing MaxFrameSize to 400 to ensure each block fits
in a single frame as the test intended.
Update the test to deploy a 65KB contract that exceeds Celo's increased
64KB MaxCodeSize limit. The previous 25KB test contract no longer
triggers the max code size check.

Changes:
- Use PUSH3 (0x62) instead of PUSH2 to push the 3-byte size value
- Update runtime size from 25KB to 65KB
- Update init code offset from 0x0c to 0x10 (16 bytes)
The issue was using opcm.opcmStandardValidator() directly, which fails
when the OPCM_V2 feature is enabled (the validator should come from
opcmV2).
It needs a kona version and I'm not clear what this is, but we don't
actually use op-challenger so simply disabling it seems to be a good
solution.
* Fix TestFees acceptance test

* Skip TestBatcherFullChannelsAfterDowntime, as upstream does

This test is also skipped upstream (01a4115) due to a nonce
tracking race condition in the async event system.

* Increase retry attempts to make acceptance tests likelier to pass

* Hardcode Cel2Time to 0

op-geth requires all pre-Cel2 blocks to come from migrated Celo L1
chaindata. If Cel2 is after genesis, op-geth expects blocks
between genesis and Cel2 to already exist, causing test failures.

* Skip TestSyncTesterHFS acceptance tests, not applicable to Celo

These tests sync across hard-fork activation boundaries on op-sepolia.
Celo activates all forks through Granite at genesis (Cel2Time=0), so
there are no fork boundaries to cross. The Holocene/Isthmus tests also
target op-sepolia endpoints and block numbers, not Celo infrastructure.

We could keep running the test against the OP testnet, but we're lacking
the respective node RPCs to do that cheaply and reliably.

* Skip flashblocks acceptance tests, not applicable to Celo

Skip both flashblocks tests since Celo doesn't use flashblocks.
…num to da-server (#45)

* feat(altda-client): pass l1_inclusion_block_number as query param to da server

This is used to perform punctuality check on EigenDA, but is generic and should be used by all da layers for the same purpose.

* feat(altda): drop invalid certs

Defined generic protocol where da-server will return a 418 (TEAPOT) error when a cert is invalid, along with the reason (250 bytes) in the body.

The 418 error is transformed into an internal golang InvalidCommitmentError which when received by the derivation pipeline, causes it to skip the commitment and move forward.

* chore(daclient): use uint64 for blocknum directly instead of L1BlockRef struct

The struct was confusing to use in tests because it wasnt sure only the .Number field of it was used, so made implementers unsure whether they needed to populate the whole struct. Since we only used the .Number field, I opted to just take a uint64 directly as argument to GetInput.

* style(daclient): use MaxBytesReader

Use MaxBytesReader and document why we restrict error body to 1000 characters (upped from 250 previously): to prevent DDoS
)

feat: InvalidCommitmentError contains status code

This commit goes hand-in-hand with Layr-Labs/eigenda-proxy#406, as it now parses the StatusCodes that are returned during 418 TEAPOT errors by proxy.
feat(altda): implement all teapot statuscodes

This should (hopefully!) be the last PR changing the teapot error handling. I think (??) we've finally nailed it with the recent spec: https://github.com/Layr-Labs/eigenda/blob/f4ef5cd55633d70bed0d54416c2d253684f0639c/docs/spec/src/integration/spec/6-secure-integration.md#derivation-process

This PR thus implements handling of the 4 types of TEAPOT errors possible. Still need to update proxy to return those errors.
* op-node/derive: Gate BPO activation in L1InfoDeposit per L2 chain

Disable BPO/Osaka blob fee formula for Celo L2 chains (mainnet,
sepolia, chaos) until Jovian hardfork, matching the gating in
celo-kona PR #121. For non-Celo chains, BPO remains enabled by
default (preserving upstream behavior).

* Update op-geth

Updates op-geth to a version that specifies CeloChaosChainID

* Fix TestBlobBaseFeeFromSepolia: use stripBPOActivations and inline header data

The test was failing because it computed BlobBaseFee using the full
SepoliaChainConfig (which includes BPO activation times), but the
expected value was the Prague-era blob fee from the actual Celo Sepolia
L2 block (derived before BPO was known).

Fix by:
- Using stripBPOActivations on the config, which is exactly what
  the production code does for Celo chains
- Inlining the header data (ExcessBlobGas, Time) instead of making
  a live RPC call, so the test runs in CI's -short mode
- Removing unused context and ethclient imports

* ci: Skip OP mainnet upgrade tests not relevant to Celo

The contracts-bedrock-tests-upgrade and coverage-upgrade tests fork OP
mainnet to test OP-specific upgrade paths. These fail on the Celo fork
because ForkLive.s.sol is out of sync with upstream (the
DelayedWETHProxy deployment lookup fails).

Since these tests are not relevant to Celo chains, skip them:
- Comment out contracts-bedrock-tests-upgrade workflow jobs
- Use coverage-lcov instead of coverage-lcov-all (which includes
  upgrade coverage)

---------

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

Refactor bpo hardfork gating (#420)

The previous implementation was broken since it was using block numbers
to determine if jovian was active, but in fact jovian is activated by
timestamp.
@karlb karlb force-pushed the karlb/celo-rebase-17-3 branch from 544374c to 8f60bd1 Compare March 6, 2026 13:06
karlb added 2 commits March 6, 2026 15:19
The Go RollupConfig has a Celo-specific cel2_time hardfork field that
gets serialized to JSON when passed to kona-node. The Rust HardForkConfig
uses serde(deny_unknown_fields), causing kona-node to crash on startup
when it encounters the unknown field. This made e2e sysgo tests hang
for 44 minutes until timeout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.