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
kona-client is an FPVM guest program (#![no_std]) with no CLI argument handling. The `--version` smoke test doesn't apply to it. Fixes #19255
…8873) 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 (#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>
…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
…anged transactions (#19030)
* ci: Switch auth used to publish kona prestates. * ci: Only publish kona prestates on push to develop, not scheduled builds.
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>
…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.
* 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>
…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 (#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 (#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) (#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 #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) (#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 #18875 review feedback
* feat: l2cm impl l2contractsmanager (#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 (#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 (#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 (#848) * feat: l2cm address comments (#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 (#857) * fix: l2cm address comments (#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 (#874) * test: add coverage test for predeploy upgrades * chore: update test natspec * chore: just pr ready * chore: L2CM round comments (#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 (#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 (#884) * refactor: l2cm group impls (#885) * refactor: remove individual getters in favor of a unified one * test: add test for getImplementations * test: add OZ v5 Initializable compatibility in L2ContractsManagerUtils (#887)
…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 (#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 #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>
* 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 #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>
* DSL: Coordinate Interop Activity Pause for Acceptance Testing * op-acceptance-tests: add same-timestamp invalid message tests Add acceptance tests for supernode interop that verify invalid same-timestamp executing messages are correctly detected and replaced. TestSupernodeSameTimestampInvalidExecMessage: - Chain A emits initiating message at timestamp T - Chain B executes that message at timestamp T (same timestamp - invalid) - Verifies Chain B's block is replaced with deposits-only block - Verifies Chain A's block (with valid init) is NOT replaced TestSupernodeSameTimestampInvalidTransitive: - Chain A: init(IA) + exec(IB) (valid reference to B's init) - Chain B: init(IB) + exec(IA) (invalid - bad log index) - Verifies transitive invalidation: B replaced first, then A replaced because B's init no longer exists after B was replaced These tests validate the strict timestamp checking and cascading invalidation behavior of the interop system. * Rename first test * interop: allow same-timestamp executing messages Subfeature 1 of Same-Timestamp Interop feature. Changes the timestamp validation to allow executing messages that reference initiating messages from the same timestamp. Previously, the check was >= which rejected same-timestamp messages. Now it uses > which only rejects future timestamps. - algo.go: Change timestamp check from >= to > in verifyExecutingMessage - algo_test.go: Add ValidBlocks/SameTimestampMessage test, rename TimestampViolation to FutureTimestamp for clarity - same_timestamp_invalid_test.go: Update expectations - same-timestamp messages are now valid and blocks are not replaced - SameTimestampInterop_Feature.md: Feature diary documenting the work * interop: add cycleVerifyFn field for same-timestamp verification Subfeature 2 of Same-Timestamp Interop feature. Adds the cycleVerifyFn field to the Interop struct. This function will be used to verify same-timestamp executing messages that may form circular dependencies between chains. The field starts as nil and will be set by the circular verification implementation (Subfeature 4). - interop.go: Add cycleVerifyFn field with documentation - interop_test.go: Add TestCycleVerifyFn test section verifying the field can be set, called, return invalid heads, and return errors * interop: route same-timestamp messages through cycleVerifyFn Subfeature 3 of Same-Timestamp Interop feature. Implements the routing logic for same-timestamp executing messages: - verifyExecutingMessage now returns ErrSameTimestamp sentinel when the initiating message timestamp equals the executing timestamp - verifyInteropMessages catches ErrSameTimestamp and tracks whether any chain has same-timestamp messages - After the main loop, if same-timestamp messages exist AND cycleVerifyFn is set, it calls cycleVerifyFn and merges any invalid heads into the result This allows same-timestamp messages to be verified by the cycle verification algorithm (to be implemented in Subfeature 4) rather than immediate validation. - algo.go: Add ErrSameTimestamp, modify verification flow - algo_test.go: Add CycleVerify/* tests for routing behavior * interop: add cycleVerifyFn for same-timestamp cycle verification Adds infrastructure for same-timestamp interop cycle verification: - Add cycleVerifyFn field to Interop struct, called after verifyFn in progressInterop with results merged (invalid heads combined) - Create circular.go with stub verifyCycleMessages implementation that returns a valid result (algorithm to be implemented) - Set cycleVerifyFn in New() - function is always set, not optional - Add TestProgressInteropWithCycleVerify test suite verifying: - Results from both verifyFn and cycleVerifyFn are merged - Errors from cycleVerifyFn propagate correctly - Invalid heads from both functions are combined This prepares the codebase for implementing the actual cycle verification algorithm that will resolve same-timestamp circular dependencies. * interop: implement cycle detection algorithm for same-timestamp messages - Add executingMessageBefore helper (finds latest EM with logIndex <= target) - Add buildCycleGraph to construct dependency graph from same-timestamp EMs - Implement verifyCycleMessages to orchestrate cycle detection - Add comprehensive tests for executingMessageBefore, buildCycleGraph, checkCycle Edges in dependency graph: - Intra-chain: each EM depends on previous EM on same chain - Cross-chain: each EM depends on executingMessageBefore(targetChain, refLogIdx) Cycle detection uses Kahn's topological sort algorithm. * acceptance: add cycle detection test and rename same_timestamp_test.go - Rename same_timestamp_invalid_test.go to same_timestamp_test.go (since same-ts is now valid) - Add TestSupernodeSameTimestampCycle: tests that mutual same-timestamp exec messages (A executes B, B executes A) are detected as a circular dependency and cause both blocks to be replaced - Update spec comment to document all three test scenarios * interop: add feature diary for same-timestamp interop Documents the implementation of same-timestamp interop verification: - Feature goals and breakdown into subfeatures - Development diary with entries for each implementation phase - Complete test coverage summary (30 unit tests, 3 acceptance tests) Key changes documented: - Relaxed timestamp check (>= → >) to allow same-timestamp messages - Added cycleVerifyFn for cycle detection - Implemented Kahn's topological sort for circular dependency detection - Added acceptance test for cycle detection causing reorgs * interop: only invalidate cycle participants, not bystanders Previously, when a cycle was detected, all chains with same-timestamp executing messages were marked as invalid. This was overly broad. Now, only chains with unresolved nodes after Kahn's algorithm are marked as invalid. Chains that have same-timestamp EMs but whose nodes all resolved (i.e., they weren't part of any cycle) are spared. - Add collectCycleParticipants helper to identify unresolved chains - Update verifyCycleMessages to use precise cycle participant set - Add TestVerifyCycleMessagesOnlyCycleParticipants test - Add TestCycleParticipants graph-level test * interop: rename circular.go to cycle.go Self-review cleanup: rename 'circular' to 'cycle' throughout: - circular.go -> cycle.go - circular_test.go -> cycle_test.go - Updated comments: 'circular dependency' -> 'cycle' - Updated Feature.md documentation references * interop: simplify cycle verification buildCycleGraph simplification: - Remove unused nodeByLocation map (dead code) - Remove intermediate logIndices extraction - Build nodes directly from map iteration - Sort with slices.SortFunc after building - Delete sortUint32s helper (replaced by stdlib) Remove cycleVerify knowledge from verifyInteropMessages: - verifyInteropMessages now has no knowledge of cycleVerify - cycleVerifyFn is called from progressInterop (not verifyInteropMessages) - Remove hasSameTimestampMessages tracking - Remove cycleVerifyFn call block - Delete 4 CycleVerify tests from algo_test.go (covered by interop_test.go) * interop: remove feature diary from PR Keep locally for reference but exclude from version control. * remove unrelated files from PR - reth submodule - superchain-registry submodule - SuperRootRefactor_Feature.md diary * tests: simplify same-timestamp interop tests cycle_test.go (692 → 536 lines, -23%): - Add helper functions: mutualCycle, triangleCycle, oneWayRef, mergeEMs - Merge TestCycleParticipants into TestBuildCycleGraph - Delete redundant TestVerifyCycleMessagesOnlyCycleParticipants - Use shared test constants (testChainA/B/C/D, testTS) same_timestamp_test.go (830 → 298 lines, -64%): - Extract sameTimestampHarness for common setup - Consolidate 3 tests using shared harness methods - Remove ~500 lines of duplicated setup code - Simplify helper functions Total reduction: 1522 → 834 lines (-45%) * interop: remove block comments from file headers * Human updates * remove test from other PR * Test Sequencer and DSL * lint * update from merge * address PR comments
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 : )