Draft
Conversation
…ests Core MEL implementation and node integration for replacing the inbox reader/tracker with the Message Extraction Layer: - MEL runner with FSM (Start/ProcessingNextBlock/SavingMessages/Reorging) - Atomic SaveProcessedBlock for crash-safe database writes - Legacy DB migration via CreateInitialMELStateFromLegacyDB - Node wiring with MEL-or-legacy dispatch - Message pruner: prune legacy, RLP, MEL, and parent chain block prefixes - Inbox reader: delayed message rollback on accumulator mismatch - Transaction streamer: adapt for MEL BatchDataProvider interface - Staker/validator: adapt for MEL BatchDataReader interface Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prevent nil pointer dereference panics (which can corrupt the database) when the parent chain RPC returns a nil header or a header with nil Number field: - logs_and_headers_fetcher.go: guard HeaderByNumber(ctx, nil) result - process_next_block.go: extend latestBlk nil check to cover Number - node.go: guard finalizedHeader.Number in computeMigrationStartBlock Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace runtime panics with returned errors to comply with the project rule that the node must never panic at runtime (panics can corrupt the database). The caller in NewDelayedSequencer now checks the error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
MEL runner: - Extract escalateIfPersistent helper for fatal error escalation - Extract ReadMode constants (ReadModeLatest/Safe/Finalized) - Collapse three identical error branches in updateLastBlockToRead into a single failReason path - Remove redundant state validation in initialize (covered by Database.State -> Validate at load time) - Add nil Message guard in GetDelayedMessageBytes Message pruner: - Extract prunePrefix helper to deduplicate fetch/delete/persist pattern - Fix iterator leak in deleteFromLastPrunedUptoEndKey (defer Release) - Propagate errors from fetchLastPrunedKey/insertLastPrunedKey instead of silently logging and returning zero Inbox reader: - Roll back delayed messages on accumulator mismatch to prevent orphaned entries in the DB Transaction streamer: - Extract deleteTrailingEntries for independent testability Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…eanup - Nil header guards in logsAndHeadersFetcher (nil header + nil Number) - escalateIfPersistent: nil chan, zero tolerance, threshold boundary, context cancellation - SetMessageConsumer/SetBlockValidator: double-set and after-start guards - GetDelayedMessage/GetBatchMetadata: boundary checks at and above count - SetDelayedSequencer: double-set error after panic-to-error conversion - validateAndInitializeDBForMEL: fresh-node path - deleteTrailingEntries: orphan removal, sparse entries, zero count, unrelated prefix safety Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## node-transition-to-mel #4603 +/- ##
==========================================================
- Coverage 34.00% 26.03% -7.97%
==========================================================
Files 495 495
Lines 59162 59478 +316
==========================================================
- Hits 20120 15488 -4632
- Misses 35509 41003 +5494
+ Partials 3533 2987 -546 |
Contributor
❌ 218 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Enable nodes to transition from the legacy inbox reader/tracker to the Message Extraction Layer (MEL). This PR builds on the MEL replacement work and adds:
Commit breakdown
Key files for review
Schema changes
Additive only (backwards compatible):
Test plan
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com