Enable transitioning of node to using MEL when previously ran with Inbox Reader-Tracker#4597
Open
ganeshvanahalli wants to merge 4 commits intoreplace-readerandtracker-with-messageextractorfrom
Open
Conversation
…box Reader-Tracker
…de-transition-to-mel
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## replace-readerandtracker-with-messageextractor #4597 +/- ##
==================================================================================
- Coverage 34.56% 34.00% -0.56%
==================================================================================
Files 494 495 +1
Lines 58938 59162 +224
==================================================================================
- Hits 20369 20120 -249
- Misses 34985 35509 +524
+ Partials 3584 3533 -51 |
Contributor
❌ 13 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
rauljordan
reviewed
Apr 3, 2026
| // | ||
| // Batch count, msg count, and delayed read are derived from legacy batch metadata. | ||
| // The MEL inbox accumulator is reconstructed for any unread delayed messages. | ||
| func CreateInitialMELStateFromLegacyDB( |
Contributor
There was a problem hiding this comment.
This is a really nice function! Great job on putting it together
rauljordan
approved these changes
Apr 3, 2026
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.
This PR enables a nitro node to transition to using message extraction code in place of the current inbox reader and tracker code. MEL is considered to be consensus active if the state's version > 0, hence a node can turn MEL
ONwith version = 0 and use it just for processing without having to use it for consensus, validation etc...When MEL is first enabled on the node, we first detect an appropriate finalized parent chain block from whom a batch has been READ, we then appropriately fill in the MEL state fields and create an Initial MEL state. From here on, the node will use MEL for processing parent chain blocks and
the node will not be allowed to restart the old way i.e using inbox reader and tracker code.Testing Done
I successfully ran an arb-sepolia node from scratch upto ~300k blocks using inbox reader and tracker code - shut it down - and successfully restarted with MEL turned on and saw the node continue catchup in an expected way.
Resolves NIT-4209