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
Move BlobTipOracle configuration from batcher to txmgr: - BTO config is now set up in txmgr.NewConfig() when BlobTipCapDynamic is enabled, rather than in batcher's initTxManager() - BTO CLI flags are now only exposed via CLIFlagsWithBTO(), which only the batcher uses - BTO validation moved from batcher to txmgr's CLIConfig.Check() - Added comprehensive tests for CLIConfig.Check() This follows the previous commit that moved BTO ownership to txmgr, completing the consolidation of BTO logic in the txmgr package.
…18780) * WIP * Return blobs directly from LoadBlobs Rename LoadBlobsBundle to LoadBlobs and return []*eth.Blob from the store. Remove conversion to engine.BlobsBundle/hexutil and simplify the Start handler to use blobs directly. Drop unused hexutil import and adjust related log messages. * Add GetBlobsByHash and use in FakeBeacon Introduce Store.GetBlobsByHash(time, hashes) returning map[common.Hash]*eth.Blob; if hashes is empty all blobs at the given timestamp are returned. Update the FakeBeacon HTTP handler to accept versioned_hashes query parameters, call the new LoadBlobsByHash, and return the filtered blobs. * Add blobs endpoint test for fake beacon * Consolidate blob endpoint tests into subtests * Remove pre-Fulu restriction on blobs endpoint this was causing some older tests to fail * Use BeaconBlobs API in eip4844 test Accept un-indexed versioned hashes (common.Hash) in the BeaconClient and convert IndexedBlobHash where needed. Make Store.GetBlobsByHash return a slice indexed by blob index to preserve request ordering. Update the eip4844 test and HTTP client to call BeaconBlobs and adapt blob access/assertions accordingly. * make generate-mocks-op-service * Remove unused eth import and helper function * Document blob ordering in GetBlobsByHash * Pass correct hash types in L1 beacon tests * Update l1_beacon_client_test.go * Fix test so commitments, proofs and blobs match * Remove pointer arg from NewBeacon call Update test to match the new NewBeacon signature (removed the final *uint64 parameter) and add the missing newline at end of file * Remove slices dependency and rework blob lookup Replace slices.Contains with manual matching and build the output array by blob index. Return all known blobs when the hashes slice is empty. Return an error if any requested hash is missing. * refactor: remove BlobSideCarsClient and update related interfaces and tests * remove unused code * refactor: update blobToCommitmentAndProof function to return BlobsBundle * refactor(tests): simplify response decoding and blob verification in TestBlobsEndpoints * test: reverse order of versioned_hashes in blobs endpoint query for stronger validation * refactor(tests): streamline TestGetBlobs by removing unnecessary cases and simplifying mock responses * refactor(tests): enhance TestBlobsEndpoints by adding additional blobs so a proper subset is requested fix underlying blobstore to sort in a safe way (removes possible panic condition) * Remove blobstore.GetBlobs([]IndexedBlobHash) Update preimage oracle blob hints to not use the blob index * Refactor Blob Fetching Interface to Simplify Blob Retrieval * Remove deprecated GetBlobs methods from blob fetcher and beacon client * Remove unused eth package and update blob retrieval method
* fix: remove description variable & target fields from bakefile * chore: drop unencountered advisory * chore: Address warnings and a security issue
* Add RewindEngine support to chain container Implements RewindEngine on simpleChainContainer: compute target safe and finalized blocks, pause the container, stop the virtual node, issue a ForkchoiceUpdate to rewind the engine, then resume the container. Expose FinalizedBlock and ForkchoiceUpdate on EngineController and l2Provider; add implementations and test mocks. Remove stray blank line in blobs_api.go * undo unintended change * Fix error formatting in RewindEngine Use %d to print the numeric timestamp and %+v to format PayloadStatus so error messages show the correct values. * Add logging to RewindEngine * temp: Add Rewind RPC activity for chains Expose RPC namespace "rewind" with ChainTo(chainID, timestamp) which invokes ChainContainer.RewindEngine to rewind a chain to a timestamp. Register the new activity in the supernode activities list. * Remove unused context fields from Rewind struct * Implement RewindToTimestamp and use in RewindEngine * Update NewPayload to take payload and parent root * Use EngineController to rewind L2 in acceptance test Add EngineController usage in advance_multiple_test to rewind an L2 chain to a timestamp. Also add Close() to EthClient, add logging in the engine controller, fix an incorrect block-number comparison in the error message, and add a mock NewPayload implementation for tests. * Make engine controller rollup-aware Add NewEngineControllerWithL2AndRollup and rollup-based helpers (blockNumberAtTimestamp, blockAtTimestamp) so RewindToTimestamp can compute the target block from the rollup config. Use the rollup target block for payload creation and forkchoice updates, tighten error messages, and set the synthetic payload FeeRecipient to MaxAddress. Update tests to wait for L2A progress and use the new constructor. * lint * Improve timestamp rewind logic with safe block handling This commit refactors the RewindToTimestamp method to: - Handle safe and finalized block targets more robustly - Use a two-step process for guaranteed block reorging - Add more detailed error handling and logging - Introduce helper methods to improve code clarity * Modify block rewind logic for accurate synthetic payload insertion * Add Supernode rewind action tests for various block head scenarios * Add tests for RewindEngine method in ChainContainer * Add nil check for l2 engine client in SafeBlockAtTimestamp * wip * wip * revert test changes * Remove unused stopChan and related code in mockVirtualNode * Remove Rewind activity from Supernode * tidy * Remove unused methods from simpleEngineController * Update RewindToTimestamp logic with detailed block reorganization * Add robust retry and error handling for engine rewind * Add labeled break to improve retry loop clarity * Improve error handling and retry logic in RewindEngine * Refactor critical error tests in chain container test Consolidate duplicate test cases for non-retryable critical errors into a single parameterized test. Improves test readability and reduces code duplication while maintaining the same test coverage for different critical error scenarios. * Add comprehensive unit tests for RewindToTimestamp * Remove Unused FinalizedBlockRef Method from mockL2 * Fix context timeout leak in chain container test * Update forkchoice heads during block rewind * Add nil checks for virtual node and engine in RewindEngine * Remove Unused SafeBlockAtTimestamp Method * move rewind code to separate files * Refactor and Clean Up mockEngineController * Add RewindEngine method to mockChainContainer * Remove mutex synchronization in mock engine controller * Add hash comparison in rewind state verification * Add error handling for timestamp to block conversion * Fix RewindEngine test to expect context deadline exceeded * Move rewind errors to rewind.go and add new payload not found error * Fix synthetic payload generation with deep clone * Refactor Engine Controller Rewind Test to Support Multiple Error Scenarios Tighten this up verymuch
* feat: add starting AGENTS.md file * feat: add rust dev section * fix: pr review comments
…d reconciliation (#18993) Add stateless validators for flashblock processing: - FlashblockSequenceValidator: validates consecutive indices within blocks - ReorgDetector: detects chain reorgs via transaction hash comparison - CanonicalBlockReconciler: determines strategy when canonical blocks arrive
These already run on PRs, so running them again in the merge queue is redundant and can bounce the queue on transient failures.
… components (#19060) * Generalize generate-release-notes recipe to support multiple components * update justfile command hint/comment to suggest gh auth token
Introduce a new unified ID type system using Go generics to address the
parallel type system problem in op-devstack. The current system has 19
separate ID types, each with ~150 lines of boilerplate for marshal/unmarshal,
String(), sorting, and matcher methods.
The new system provides:
- ComponentID: single underlying struct for all IDs
- ID[T]: generic wrapper with KindMarker constraint for type safety
- Marker types (L2BatcherMarker, etc.) to avoid circular dependencies
- IDShape enum to handle three ID formats (key+chain, chain-only, key-only)
- Conversion helpers for incremental migration from old to new types
New types use a "2" suffix (L2BatcherID2, NewL2BatcherID2) to coexist with
the existing system during migration. Serialization output is identical to
the old system for compatibility.
This is Phase 1 of a multi-phase refactor. Future phases will introduce a
unified registry and capability interfaces for polymorphic lookups.
See docs/design/id-type-system-refactor.md for the full design document.
…9084) During OPCM super-roots migration we temporarily transfer each OptimismPortal’s ProxyAdmin ownership to the DelegateCallProxy. Restore each portal ProxyAdmin back to the L1PAO after shared admin contracts are reset so both portals report the expected proxyAdminOwner() With this we can re-enable the TestInteropReadiness acceptance-test
* supernode: Handle genesis L2 block in L1AtSafeHead lookup Add special case in L1AtSafeHead to return genesis L1 directly when querying for the genesis L2 block, avoiding unnecessary SafeDB walkback that would otherwise fail at genesis boundary. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * for the genesis case; check the entire blockid --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…clude the v prefix (#19090) * op-program: Fix reproducibility test. The short version should not include the v prefix. * Fix short string for legacy kona too.
* op-acceptance: Add start of test to run FPP program across a chain. * op-acceptance: Execute kona-interop for the generated chain. * Back to kona release build path. * Tidy up code.
The Blob Tip Oracle (BTO) previously used ethclient.SubscribeNewHead() for header notifications, which only works over WebSocket connections. This change converts it to polling for new headers instead, allowing it to work with HTTP connections. The polling uses the existing PollRate configuration (2.5s default) to check for new headers at regular intervals. Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
…zz tests (#19094) * test(contracts): enhance OptimismMintableERC721 test coverage with fuzz tests - Convert constructor test to fuzz test with variable remoteChainId - Convert safeMint test to fuzz test with variable recipient and tokenId - Convert safeMint notBridge test to fuzz test with variable caller - Convert burn test to fuzz test with variable tokenId - Convert burn notBridge test to fuzz test with variable caller - Convert tokenURI test to fuzz test with variable tokenId - Add supportsInterface test for unsupported interfaces - Add version format validation test using SemverComp.parse() * fix(test): add IERC721Metadata to supportsInterface fuzz exclusions The contract inherits IERC721Metadata from ERC721, so it must be excluded from the unsupported interface fuzz test to prevent false failures. --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix: safer safes interface and deploy * feat: DeploySaferSafes test * fix: error string * fix: forge fmt
* op-acceptance-tests: Add InvalidMessageHalt test for supernode interop This TDD test verifies the Interop Activity's behavior when an invalid executing message is included in a chain: - Validity should NEVER advance to include the invalid block's timestamp - Safety and unsafety for both chains should continue to advance The test sends a valid initiating message on chain A, then sends an invalid executing message on chain B (with an impossible log index), and observes that the Supernode correctly halts validity advancement while allowing safety heads to progress. * op-supernode: Add logsDB infrastructure for interop activity This prepares the interop activity for implementing the actual interop algorithm by: 1. Moving stubbed algorithm functions to algo.go: - loadLogs: loads and persists logs up to a timestamp - verifyInteropMessages: validates executing messages - invalidateBlock: handles invalid blocks 2. Adding per-chain logs.DB for log persistence: - Uses op-supervisor's logs.DB directly (no wrapper) - openLogsDB helper creates DB per chain in data directory - Full persistence support (data survives restart) 3. Extending ChainContainer interface with FetchReceipts: - Added to ChainContainer, EngineController, and l2Provider interfaces - Enables interop activity to fetch receipts for log processing 4. Initializing logsDBs in Interop activity: - Creates one logs.DB per chain on startup - Properly closes all logsDBs on Stop() 5. Unit tests for log persistence: - Tests for open/close, seal block, persistence - Tests for multiple chain isolation * op-supernode: Refactor interop logdb and improve test coverage This commit reorganizes the interop activity code and adds comprehensive tests: 1. File reorganization: - Renamed algo.go to logdb.go for log persistence code - Created new algo.go with just verifyInteropMessages - Moved invalidateBlock back to interop.go 2. Added LogsDB interface: - Defines interface around logs.DB for better testability - Enables mock implementations in unit tests 3. Added chain continuity check: - verifyPreviousTimestampSealed now returns previous block hash - loadLogs verifies block parent matches logsDB hash - Added ErrParentHashMismatch error 4. Expanded unit test coverage for logdb: - Tests for verifyPreviousTimestampSealed (activation/non-activation) - Tests for processBlockLogs (empty, with logs, errors) - Tests for loadLogs parent hash mismatch 5. Improved interop_test.go assertions: - Verify logsDBs population in constructor tests - Verify verifyFn receives correct args - Verify timestamps before activation return true - Verify Result.IsEmpty for various scenarios - Verify data retrieval after handleResult - Full cycle tests verify logsDB and L2Heads * op-supernode: Implement interop message verification This commit implements the core verification logic for the interop activity, completing the TDD cycle for the InvalidMessageHalt acceptance test. Key changes: - Implement verifyInteropMessages to validate executing messages at each timestamp - Verify initiating messages exist in source chain's logsDB via Contains query - Verify timestamp ordering: initiating timestamp < executing timestamp - Fix verifyPreviousTimestampSealed to accept any sealed block timestamp < ts (not just ts-1), handling block times > 1 second - Add comprehensive unit tests for verification logic The acceptance test now passes, demonstrating that: - Valid cross-chain messages are verified successfully - Invalid executing messages (wrong LogIndex) halt validity advancement - Safe/unsafe heads continue to advance independently * op-supernode: Consolidate interop unit tests Refactor tests for better organization and reduced redundancy: - Create logdb_test.go for logsDB infrastructure tests - TestLogsDB_Persistence (data persistence, multi-chain isolation) - TestVerifyPreviousTimestampSealed (7 table-driven cases) - TestProcessBlockLogs (5 subtests) - TestLoadLogs_ParentHashMismatch - Rewrite algo_test.go for verification algorithm only - TestVerifyInteropMessages_ValidBlocks (3 subtests) - TestVerifyInteropMessages_InvalidBlocks (5 subtests) - TestVerifyInteropMessages_Errors - Consolidate interop_test.go for lifecycle/coordination - Merge related tests into table-driven patterns - Remove trivial getter/empty-case tests Test count: 62 functions → 19 functions (~55 cases via subtests) Removed 8 trivial tests that added no value. * remove unused code * validate timestamp gap using block time * implement message expiry time validation * simplify verifyExecutingMessage logic * fix logdb timing check and track local safe in acceptance test * fix loadLogs to process blocks when DB is empty * simplify timestamp progression test baseline logic * skip logsDB loading and verification at activation timestamp For activation-after-genesis, the logsDB cannot handle non-sequential block sealing (starting from block N instead of genesis). At activation timestamp: - Skip loading logs (logsDB requires sequential blocks from genesis) - Skip verification (can't verify cross-chain messages referencing pre-activation data) - Trust blocks at activation time Also allow empty logsDB at activation+blockTime (the first real timestamp). * fix logsDB to start at activation block instead of genesis * move invalid_message_halt_test to separate package to avoid test pollution
* fix: gaps in VerifyOPCM * fix: broken test init * fix: correct env loading * fix: outdated code * fix: more outdated code * fix: bad parsing * fix: wrong function call * fix: remove unused MIN verification, fix test env vars - Remove documented but unimplemented MIN:<value> check type - Remove unused _verifyMinValue function - Add missing env vars to test_verifyOpcmCorrectness_succeeds: - EXPECTED_L1_PAO_MULTISIG - EXPECTED_CHALLENGER - EXPECTED_WITHDRAWAL_DELAY_SECONDS Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: skip mainnet-only checks in testing environment The _verifyZeroOnMainnet check should also be skipped in testing environments where we can't control the actual chain state. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: use vm mock for isolation * fix: format * fix: final test tweaks --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* fix: SuperchainConfig comments and test refactoring - Remove outdated warning comment from SuperchainConfig - Bump SuperchainConfig version to 2.4.1 - Fix comment in OPContractsManagerV2 - Refactor test helpers: move NeedsSuperchainConfigUpgrade to testutil package - Update add-game-type-v2 tests to deploy a full OP chain Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: semver lock * fix: broken test when applying superchain config upgrade --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…19076) * chore: return migrator address on ReadImplementationAddresses output (#819) * chore: return migrator address on ReadImplementationAddresses output * chore: use fixed solidity version * chore: just pr ready * test: add zero length code test for opcm * chore: update tests on migrator (#822) * refactor: replace contract mocks with vm.mock * fix: read impl typo * fix: remove nonexistent delayedWETHPermissionedGameProxy from test The test referenced input_.delayedWETHPermissionedGameProxy which doesn't exist in the ReadImplementationAddresses.Input struct. The delayedWETH implementation is read from OPCM's implementations() return value, not from an input proxy address. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: use common test * fix: handle OPCM V2 feature flag in ReadImplementationAddresses tests The test was using the `opcm` variable directly, which is only set when OPCM_V2 feature is disabled. Added `_opcm()` helper to return the correct instance based on the feature flag. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: IamFlux <175354924+0xiamflux@users.noreply.github.com> Co-authored-by: niha <205694301+0xniha@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* docs: add TODO checker workflow to docs/ai/ci-ops.md Adds detailed operational instructions for resolving TODO checker CI failures in a dedicated file following the docs/ai/ pattern. The workflow includes: - CircleCI API commands to find the latest scheduled pipeline - Parsing job output to identify closed issues - GitHub API commands to find who closed the issue - Proper reopening comment format with attribution and traceability This enables natural language commands like "fix the latest TODO checker failure" to work automatically via AGENTS.md/CLAUDE.md guidance that Claude Code reads. References the new ci-ops.md file from AGENTS.md alongside other topic-specific documentation. * Simplify docs * docs: fix TODO checker workflow to work without CIRCLECI_TOKEN Updates the TODO checker workflow with two key fixes: 1. Remove CIRCLECI_TOKEN requirement - CircleCI API is publicly accessible for this repository, so no authentication needed 2. Fix "who closed the issue" detection - Use GraphQL to find the most recent person who closed the issue from the timeline, not just the closing PR author. This correctly handles cases where an issue was closed via PR, then reopened, then closed directly by a different user. Also improves Step 2 to search through recent scheduled pipelines to find one with the actual "scheduled-todo-issues" workflow, since the latest may only contain a "setup" workflow. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Add claude skill for fixing todo check job. * Put detail in the skill file and simple more human readable instructions in ci-ops.md --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat(op-deployer): build contracts in docker * fix(tests): comments * fix(tests): comments * fix(tests): comments * fix(tests): comments
* op-acceptance: Change to creating super cannon kona games * op-acceptance: Use the interop prestate dir for kona * Fix lint * Enable super cannon kona game type in challenger.
#19077) * fix: only allow enabling permissioned game types in opcmv2 deployment (#835) * fix: only allow permissioned game types in opcmv2 deployment * docs: add comment for permissionless games config in deployopchain * feat: add isInitialDeployment argument to std validator script * fix: undo OPCMv1 changes * fix: old test content * fix: expect validator errors for disabled games in deploy test CANNON and CANNON_KONA are intentionally disabled during initial deployment, so no implementations are registered. The validator correctly flags this as PLDG-10 and CKDG-10 errors. Update test to expect these errors. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: revert on non-PERMISSIONED_CANNON game type in DeployOPChain Address review feedback: raise an error instead of silently overwriting the disputeGameType input. Only PERMISSIONED_CANNON is valid for initial deployment since no prestate exists for permissionless games. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: niha <205694301+0xniha@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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 : )