Skip to content

Coordinate the Block and MEL Validators#4434

Open
ganeshvanahalli wants to merge 5 commits intomel-validator-createvalidationentryfrom
coordinate-blockandmel-validators
Open

Coordinate the Block and MEL Validators#4434
ganeshvanahalli wants to merge 5 commits intomel-validator-createvalidationentryfrom
coordinate-blockandmel-validators

Conversation

@ganeshvanahalli
Copy link
Contributor

@ganeshvanahalli ganeshvanahalli commented Feb 25, 2026

This PR adds the required wiring for MEL validator to be started and used by node and block-validator. It also makes it that block validator sets the target block number for MEL validator up to which the MEL validator will validate message extraction.

[Pending adding a system test with reorg handling by validators]

Resolves NIT-4535

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 11.91710% with 170 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.83%. Comparing base (033ae59) to head (4dda130).

Additional details and impacted files
@@                           Coverage Diff                           @@
##           mel-validator-createvalidationentry    #4434      +/-   ##
=======================================================================
+ Coverage                                28.32%   28.83%   +0.51%     
=======================================================================
  Files                                      500      500              
  Lines                                    59305    59439     +134     
=======================================================================
+ Hits                                     16796    17138     +342     
+ Misses                                   39378    39171     -207     
+ Partials                                  3131     3130       -1     

@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

❌ 9 Tests Failed:

Tests completed Failed Passed Skipped
2968 9 2959 0
View the top 3 failed tests by shortest run time
TestMain
Stack Traces | 0.000s run time
FAIL	github.com/offchainlabs/nitro/system_tests [build failed]
FAIL	github.com/offchainlabs/nitro/system_tests [build failed]
TestMelDelayedMessagesAccumulation
Stack Traces | 0.000s run time
=== RUN   TestMelDelayedMessagesAccumulation
=== PAUSE TestMelDelayedMessagesAccumulation
=== CONT  TestMelDelayedMessagesAccumulation
    database_test.go:163: 
        	Error Trace:	/home/runner/work/nitro/nitro/arbnode/mel/runner/database_test.go:163
        	Error:      	Should be true
        	Test:       	TestMelDelayedMessagesAccumulation
--- FAIL: TestMelDelayedMessagesAccumulation (0.00s)
TestMelDelayedMessagesAccumulation
Stack Traces | 0.000s run time
=== RUN   TestMelDelayedMessagesAccumulation
=== PAUSE TestMelDelayedMessagesAccumulation
=== CONT  TestMelDelayedMessagesAccumulation
    database_test.go:163: 
        	Error Trace:	/home/runner/work/nitro/nitro/arbnode/mel/runner/database_test.go:163
        	Error:      	Should be true
        	Test:       	TestMelDelayedMessagesAccumulation
--- FAIL: TestMelDelayedMessagesAccumulation (0.00s)

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

Copy link
Contributor

@rauljordan rauljordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great so far! Very close to completion

stack,
latestWasmModuleRoot,
)
if messageExtractor != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code duplication can be solved if stateless block validator takes in an interface and you can just pass that in. You can define a var above this function and with an if set it to either messageExtractor or inboxReader + tracker

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed it

b.nodeConfig.MessageExtraction.Enable = false // Skip running in MEL mode for block validator tests
}
}
func UseUnifiedModuleRoot(nodeConfig *arbnode.Config) bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this instead be a method on arbnode.Config ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great idea! added this

@ganeshvanahalli ganeshvanahalli marked this pull request as draft February 27, 2026 16:27
@ganeshvanahalli ganeshvanahalli marked this pull request as ready for review February 27, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants