This repository was archived by the owner on Dec 5, 2021. It is now read-only.
[pull] develop from ethereum-optimism:develop#573
Open
pull[bot] wants to merge 10000 commits intoomgnetwork:developfrom
Open
[pull] develop from ethereum-optimism:develop#573pull[bot] wants to merge 10000 commits intoomgnetwork:developfrom
pull[bot] wants to merge 10000 commits intoomgnetwork:developfrom
Conversation
…ce (#19357) BlobSource::load_blobs wrapped all errors from chain_provider.block_info_and_transactions_by_hash with BlobProviderError::Backend(e.to_string()).into(), which forced every error to PipelineErrorKind::Temporary regardless of the underlying error kind. This caused a regression: AlloyChainProvider was fixed in ee4d492 to emit PipelineErrorKind::Reset for BlockNotFound errors (mapping to ResetError::BlockNotFound). However, the Backend wrapping in BlobSource bypassed that fix, downgrading Reset to Temporary. During an L1 reorg when a blob-bearing block hash disappears, kona would spin retrying instead of triggering a pipeline reset, causing a liveness stall. The Go reference (blob_data_source.go:82-85) explicitly branches on errors.Is(err, ethereum.NotFound) and wraps it as NewResetError. Fix: use .map_err(Into::into) to preserve the error classification from the underlying ChainProvider::Error implementation. This mirrors the pattern already used correctly by CalldataSource. Fixes #19354
Adds test duration caching and ordering.
… (Phase 5) (#18876) Implement the "Simplified Network Interface" design by adding a ComponentRegistry interface that provides generic component access. This reduces interface bloat by enabling new component types to be added without requiring new interface methods. Key changes: - Add ComponentRegistry interface with Component(), Components(), ComponentIDs() methods - Embed ComponentRegistry in Network and System interfaces - Add 32 typed free functions (GetL2BatcherByID, GetL2Batchers, etc.) - Add *stack.Registry to shim implementations (presetNetwork, presetL1Network, presetL2Network, presetSystem) - Update all Add* methods to register in both legacy maps and unified registry for backward compatibility - Fix nil map bug in RegisterL2MetricsTargets Existing typed interface methods (L2Batcher, L2Batchers, etc.) continue to work unchanged. Callers can migrate incrementally to the new patterns.
* op-node: copy LocalSafeL2 in follow source mode When op-node runs in light-node/follow-source mode, it follows an upstream node's sync status. Previously, FollowClient.GetFollowStatus() only copied SafeL2, FinalizedL2, and CurrentL1 - but not LocalSafeL2. The FollowSource() function was incorrectly using SafeL2 (cross-safe) for updating the local-safe head, when it should use the upstream's LocalSafeL2 instead. Changes: - Add LocalSafeL2 field to FollowStatus struct - Copy LocalSafeL2 from upstream sync status in GetFollowStatus() - Update FollowSource() to accept separate LocalSafe parameter - Pass LocalSafeL2 through followUpstream() to FollowSource() - Add test for FollowClient to verify LocalSafeL2 is copied * fix(op-node): use local-safe for FollowSource consolidation and inject cross-safe FollowSource was using eSafeBlockRef (cross-safe) for consolidation/reorg checks, but this logic syncs local chain state and should use eLocalSafeRef. Cross-safe was also never injected into the engine, causing promoteFinalized to silently fail when finalized > SafeL2Head (which reads deprecatedSafeHead). - Switch consolidation/reorg/EL-sync checks from eSafeBlockRef to eLocalSafeRef - Add PromoteSafe call for cross-safe injection before promoteFinalized - Add SafeL2 <= LocalSafeL2 invariant check in driver followUpstream - Add L1 origin validation for LocalSafeL2 in driver followUpstream - Add unit test for divergent cross-safe/local-safe values Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(op-node): follow-source nodes report distinct SafeL2/LocalSafeL2 In follow-source mode, SafeL2Head() and FinalizedHead() now return the cross-safe/cross-finalized values (deprecatedSafeHead/deprecatedFinalizedHead) without requiring supervisorEnabled. This lets light CL nodes naturally report distinct SafeL2 vs LocalSafeL2 in SyncStatus, since the upstream always provides both values. Also prevents local-safe from auto-promoting to cross-safe in follow-source mode (localSafeIsFullySafe returns false), since cross-safe comes from upstream. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(op-node): address review nits in FollowSource test - Use FollowSourceEnabled sync config instead of supervisorEnabled to exercise the production code path for follow-source nodes - Assert deprecatedFinalizedHead instead of localFinalizedHead for consistency with cross-safe assertions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: opsuperchain <opsuperchain@slop.bot> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…erop (#19378) * op-devstack: Add preset for light CL follow source Adds a preset `WithTwoL2SupernodeFollowL2` that sets up two L2 chains with interop enabled (via `TwoL2SupernodeInterop`) and one verifier per chain configured with follow source mode (light CL). * op-acceptance-tests: Add `TestFollowSource_LocalSafeDivergesThenConverges` This test exercises the flow where: * We have two L2s using interop via supernode * We have two additional L2 light CLs following the supernode and asserts that: * The follower node's `LocalSafeL2` advances independently of its `SafeL2` * `LocalSafeL2` leads `SafeL2` during the window before cross-safe promotion * Both eventually converge closes #19331 * chore: Annotate TODO for L2 CL P2P issue * op-devstack: Expose the follower ELs in TwoL2SupernodeFollowL2 preset These will be useful in future tests, so exposing them right now makes sense --------- Co-authored-by: wwared <541936+wwared@users.noreply.github.com>
* op-dispute-mon: add supernode endpoint tracking fields * op-dispute-mon: add supernode helper methods * op-dispute-mon: add comprehensive endpoint tracking to super enricher * op-dispute-mon: add supernode monitors and Prometheus metrics * op-dispute-mon: add comprehensive endpoint tracking tests * op-dispute-mon: add safety comment to super agreement enricher Add explanatory comment about safety validation for super roots, matching the equivalent comment in output_agreement_enricher.go. Clarifies that even if the super root matches the game's root claim, the game could still be challenged if the required L1 data was not fully available at proposal time. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * op-dispute-mon: unify rollup and super node endpoint tracking Consolidates duplicate endpoint tracking metrics and fields into a single unified set. Since games are mutually exclusive (either using output roots or super roots), we can use the same fields and metrics for both types. Changes: - Renamed RollupEndpoint* fields to NodeEndpoint* in types - Removed all SuperNodeEndpoint* duplicate fields - Removed duplicate super-specific metrics and monitors - Renamed differentOutputRootGames to differentRootGames - Updated enrichers to populate unified NodeEndpoint* fields This simplifies the codebase (net -973 lines) while maintaining the same monitoring capabilities. Existing metrics now aggregate across both rollup and super nodes. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * op-dispute-mon: rename different_output_roots files to different_roots Renames monitor files to match the refactored naming that tracks both output roots and super roots. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * op-dispute-mon: consolidate super agreement enricher tests Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * lint fixes --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
…19272) * contracts: implement audit code fixes and add tests Add onlyDelegateCall enforcement to upgradeSuperchain, upgrade, and migrate functions (#17). Include msg.sender in deploy salt to prevent cross-caller CREATE2 collisions (#17). Add duplicate instruction key detection in upgrade validation (#9). Validate startingRespectedGameType against enabled game configs (#10). Add code-existence check in loadBytes (#18). Add setUp guard to VerifyOPCM.runSingle (#4). Remove unused _findChar function (#5). Pass real AddressManager in migrator proxy deploy args (#11). Add tests covering all audit fix behaviors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * contracts: regenerate semver-lock.json for OPContractsManagerV2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * contracts: bump OPContractsManagerV2 version to 7.0.10 Semver-diff requires a patch version bump when bytecode changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
… notifications (#19367) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>
… compatibility (#19377) * test(contracts): reuse ProxyAdmin tests on L2ProxyAdmin for backwards compatibility - extract virtual _createAdmin hook in ProxyAdmin_TestInit for subclass override - make ProxyAdmin_TestInit.setUp public virtual to support test inheritance - add 10 backwards-compat test contracts that run all ProxyAdmin tests against L2ProxyAdmin * refactor(test): inline _createL2ProxyAdmin into each override - remove _createL2ProxyAdmin free function from L2ProxyAdmin.t.sol - inline L2ProxyAdmin deployment directly in each _createAdmin override
…nding 22) (#19286) * fix(contracts): forward-compatible OZ v5 Initializable in upgrade (Finding 22) Make OPContractsManagerUtils.upgrade() also clear the OZ v5 ERC-7201 Initializable storage slot (uint64 _initialized in the low 8 bytes). For v4 contracts the slot is all zeros so this is a no-op. Reverts if _initializing bool is set, since a contract should never be mid-initialization during an upgrade. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs(contracts): add ERC-7201 slot derivation comment for OZ v5 Initializable Show the keccak256 derivation formula and link to the OpenZeppelin source for the hardcoded ERC-7201 Initializable storage slot. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(contracts): address PR review comments on OPContractsManagerUtils - Clarify error NatSpec: "mid-initialization" → "has `_initializing` as true" - Remove stale "Otherwise" from comment on initialized slot reset Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…19415) * chore(op-acceptance-tests): add ELSync stalling tests to flake-shake TestUnsafeChainNotStalling_ELSync_Short/Long/RestartOpNode_Long failed 3 times each across 3 distinct branches in the past 7 days, always co-failing in the same job. All instances passed on rerun (confirmed flake). The three tests share the same package and common fixture (UnsafeChainNotStalling_Disconnect / _RestartOpNode), which explains why they fail together — a setup-level timing issue affects all three simultaneously. Quarantine while root cause is investigated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: correct package path to syncmodereqressync/elsync The failing tests are in depreqres/syncmodereqressync/elsync, not reqressyncdisabled/elsync. The reqressyncdisabled variants pass cleanly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: smartcontracts <smartcontracts@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Pin the make version in mise so that all developers and CI use a consistent version. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(contracts): address audit findings #14, #6, #8, #13, #19 - #14: Reuse existing DelayedWETH from SystemConfig instead of deploying a new one in the Migrator, preventing divergence with future upgrades - #6: Document that hardcoded game type lists in OPCMv2 and Migrator are intentional and must be kept in sync when new types are added - #8: Document that migrate() does not enforce SuperchainConfig version floor - #13: Document why migration game config validation is deliberately minimal - #19: Document theoretical risk in AnchorStateRegistry.isGameRegistered when ASR proxy is replaced non-atomically Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(contracts): add cross-reference comment to GameTypes library Add a notice to the GameTypes library reminding developers to update the hardcoded game type lists in OPContractsManagerMigrator and OPContractsManagerV2's _assertValidFullConfig when adding new types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(contracts): bump OPContractsManagerV2 version for rebase Bump OPContractsManagerV2 from 7.0.9 to 7.0.10 to account for the comment-only source change (cross-reference note added in prior commit) that affects the bytecode metadata hash. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(contracts): bump OPContractsManagerV2 version to 7.0.11 for semver-diff CI fix * fix(contracts): apply forge fmt and bump versions for formatting changes forge fmt changed OPContractsManager, FaultDisputeGame, SuperFaultDisputeGame, and several other files. Bump patch versions for the contracts with hash changes, and regenerate semver-lock and snapshots. - OPContractsManager: 6.0.3 -> 6.0.4 - FaultDisputeGame: 2.4.0 -> 2.4.1 - SuperFaultDisputeGame: 0.7.0 -> 0.7.1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: smartcontracts <smartcontracts@users.noreply.github.com>
…-shake (#19413) This test has shown consistent flakiness in memory-all: 3 failures across 3 separate branches in the past 7 days. Quarantine it in flake-shake while the root cause is investigated. Note: this exclusion only takes effect once #19412 (op-acceptor v3.10.1 bump) merges. Prior to that, flake-shake entries for named tests are silently ignored in gateless/memory-all mode. Co-authored-by: smartcontracts <smartcontracts@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: geoknee <georgeknee@googlemail.com>
* op-acceptance-tests: Add PE acceptance tests * linter * linter * fix preset bug causing test to inf hang
Updates op-acceptor to [v3.10.2](https://github.com/ethereum-optimism/infra/releases/tag/op-acceptor%2Fv3.10.2)
* fix(ci): retry L1 archive RPC call in print-pinned-block-number The L1 archive RPC endpoint (ci-mainnet-l1-archive.optimism.io) returns transient 5xx errors occasionally, killing all contracts-bedrock-coverage and contracts-bedrock-tests-upgrade CI jobs simultaneously (5+ jobs fail from a single 30-second outage). Adding 3 retries with a 5s delay makes the step resilient to brief outages with minimal wall-clock cost. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(ci): use exponential backoff in print-pinned-block-number retry Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: smartcontracts <smartcontracts@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: add cannon-builder image to Docker CI builds Add the kona cannon-builder (Rust MIPS64r1 toolchain) image to the branch and tag Docker build workflows. This publishes the image to the shared artifact registry so it can be consumed by prestate builds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * rust: bump op-reth to v1.11.1 and update cannon build infrastructure Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: geoknee <georgeknee@googlemail.com>
…align on single ComponentID type (#18877) * stack: remove backward compatibility type aliases for Phase 6 cleanup Complete the ID type system refactor by removing all backward compatibility code. All code now uses ComponentID directly with typed constructor functions. Changes: - Remove 19 type aliases from component_id.go (L1ELNodeID, L2BatcherID, etc.) - Remove Kind = ComponentKind alias - Update KindProvider interface to use ComponentKind return type - Update context.go functions to use ComponentKind instead of Kind - Fix test files using incorrect constructor patterns The type system is now fully unified: - Single ComponentID type with kind, shape, key, and chainID fields - Typed constructors (NewL2BatcherID, NewL2ELNodeID, etc.) return ComponentID - ComponentKind enum for type discrimination - Simplified Matcher[E] interface with single type parameter * fix(op-devstack): drop misplaced kona tests and finalize componentid cleanup * fix(op-devstack): restore Go build after ComponentID refactor
The 5s timeout is too tight under CI load. When 12 parallel test nodes compete for CPU/IO on a 2xlarge box, Anvil sometimes takes >5s to print its "Listening on" line, triggering "anvil did not start in time" in TestImplementations and TestSuperchain. This is the #2 and #3 most frequent flake in the repo over the last 7 days (67 and 46 incidences). 30s gives Anvil enough headroom on a loaded machine while still failing fast on a genuine startup failure. Co-authored-by: smartcontracts <smartcontracts@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…nc triple-failure flake (#19418) * fix(depreqres): stabilize L2CLB head snapshot after disconnect to eliminate ELSync flake DisconnectPeer removes the libp2p peer but a buffered gossip payload can still arrive and be processed via AddUnsafePayload. This happens because SyncModeReqResp=true routes CL gossip payloads through the CLSync path even in ELSync mode (sync_deriver.go:109). When this in-flight message lands after DisconnectPeer returns but before the ssB_before snapshot is taken, ssB_before records block N+1 instead of N, causing the subsequent require.Equal(ssB_after, ssB_before) to pass when it should (both are N+1) — but the CI pattern shows it records N while the buffered message bumps ssB_after to N+1, causing the failure. Fix: poll ssB until stable (two consecutive reads agree) before taking the baseline snapshot. Drain window is at most a few milliseconds; the 5s timeout is a safety margin that will never be hit in practice. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(depreqres): extract stableSyncStatus helper per review feedback Extract the duplicated gossip-drain polling loop into a stableSyncStatus helper function, used by both UnsafeChainNotStalling_Disconnect and UnsafeChainNotStalling_RestartOpNode. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: smartcontracts <smartcontracts@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…ate (#19410) * test(contracts): fix testFuzz_params_validValues_succeeds rejection rate The fuzz test was exhausting Foundry's 65,536-rejection limit due to two vm.assume filters: 1. `vm.assume(r / e * e == r)` — divisibility constraint; with _elasticityMultiplier uniform in [1,255] this rejects ~97.6% of inputs. 2. `vm.assume(_prevBaseFee * maxPercentIncrease * _gasLimit / 100 < T)` — gas burn safety condition; rejects a further slice of inputs. Fix 1 — round by construction: - Move _elasticityMultiplier binding first - Replace vm.assume with rounding: `r = r / e * e` - Re-bound _gasLimit and _prevBoughtGas from the rounded r (required to preserve the invariant _gasLimit ≤ _maxResourceLimit after rounding) - Keep a targeted vm.assume for the rare case where rounding drops below 21000 Fix 2 — direct bound on _prevBaseFee: - Replace the gas burn vm.assume with a computed cap: `(100 * T - 1) / (maxPercentIncrease * gasLimit)` for m > 0 - Proved equivalent: p * m / 100 < T ↔ p ≤ (100T - 1) / m Formal Lean 4 / Mathlib proof of correctness for both changes: https://gist.github.com/smartcontracts/b0030421b51e305066abacfec0c0b57b Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(contracts): scope gasBurn locals to avoid stack pressure Add scoped block around gasBurnDenom/gasBurnCap variables in testFuzz_params_validValues_succeeds. These variables are not needed after _prevBaseFee is bounded, so scoping them frees stack slots. Note: forge-build-dev (lite/no-optimizer profile) has a pre-existing stack-too-deep failure on this function at the same location on upstream develop. This commit does not fix that pre-existing issue. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(contracts): fix stack-too-deep in testFuzz_params_validValues_succeeds Scope maxPercentIncrease, rcfg, and the storage/assert block into separate blocks to bring the function under the 16-slot stack limit for the lite (no-optimizer) build profile. At the deepest point (params() destructuring) the outer stack now holds only: 10 params + gasLimit + _prevBlockNum + 3 tuple vars = 15 slots. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(contracts): forge fmt Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: smartcontracts <smartcontracts@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extract _mockAndExpect to shared MockHelper contract (7 files) - Deduplicate _changeClaimStatus: import free function instead of redefining (3 files) - Deduplicate _dummyClaim: promote to free function alongside _changeClaimStatus (3 files) - Remove duplicate EIP1967Helper import in OptimismPortal2.t.sol Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…#19405) * fix(op-supernode): early return in VerifiedBlockAtL1 for zero l1Block During startup, FinalizedL1 is zero. VerifiedBlockAtL1 would iterate backwards through all timestamps calling Get() for each one, but with l1Block.Number == 0 no entry could ever match (L1Inclusion.Number <= 0), causing the virtual node driver's event loop to hang permanently and preventing all derivation. Add an early return when l1Block is the zero value. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * test(op-supernode): add unit tests for VerifiedBlockAtL1 - Zero l1Block returns empty immediately (the bug case) - Non-zero l1Block finds the correct matching entry - Empty DB returns empty Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: register zk proofs feature flag * chore: remove interface * chore: add zk dev feature to op deployer * chore: undo foundry.toml modification * feat(ci): add zk proofs flag to ci tests matrix * chore: rename zk proofs flag * chore: rename comments and run just pr * chore: remove single zk dispute game flag from CI * chore: add todo referencing issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )