Skip to content

Conversation

@bragaigor
Copy link
Contributor

Introduce MachineLocator for Rust Validator. Currently Validator can handle multiple module roots; however it can only find one (through command line). This PR introduces MachineLocator, which its responsibility is to look for replay.wasm machines locations relative to where Validator is running. Such machines are later on started by JitProcessManager. That also simulates the same behaviour of Validator that's implemented in Go, with the caveat that Rust Validator only looks for such machine at startup.

closes NIT-4346

Signed-off-by: Igor Braga <5835477+bragaigor@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.05%. Comparing base (2946369) to head (860270b).
⚠️ Report is 26 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4350      +/-   ##
==========================================
+ Coverage   32.88%   33.05%   +0.16%     
==========================================
  Files         489      489              
  Lines       58002    58002              
==========================================
+ Hits        19076    19174      +98     
+ Misses      35576    35451     -125     
- Partials     3350     3377      +27     

Signed-off-by: Igor Braga <5835477+bragaigor@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

❌ 8 Tests Failed:

Tests completed Failed Passed Skipped
4252 8 4244 0
View the top 3 failed tests by shortest run time
TestVersion30
Stack Traces | 5.330s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
        github.com/offchainlabs/nitro/system_tests.Require(0xc03ac9bdc0, {0x40a3a40, 0xc050b90540}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:2075 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc03ac9bdc0, 0x1e, {0xc09f84fdb0, 0x6, 0x0?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:94 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion30(0xc03ac9bdc0?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:67 +0x798
        testing.tRunner(0xc03ac9bdc0, 0x3d1f1a8)
        	/opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:1997 +0x465
        
    precompile_inclusion_test.go:94: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
INFO [02-11|16:05:06.208] Writing cached state to disk             block=1  hash=8aa0c3..5e17c8 root=c02835..9ffaab
INFO [02-11|16:05:06.208] Persisted trie from memory database      nodes=20  flushnodes=0 size=3.26KiB   flushsize=0.00B time="129.775µs" flushtime=0s gcnodes=0 gcsize=0.00B gctime="2.285µs"  livenodes=0   livesize=0.00B
INFO [02-11|16:05:06.208] Writing cached state to disk             block=1  hash=8aa0c3..5e17c8 root=c02835..9ffaab
INFO [02-11|16:05:06.208] Persisted trie from memory database      nodes=0   flushnodes=0 size=0.00B     flushsize=0.00B time="1.884µs"   flushtime=0s gcnodes=0 gcsize=0.00B gctime=0s         livenodes=0   livesize=0.00B
INFO [02-11|16:05:06.208] Writing snapshot state to disk           root=92585b..f227c9
INFO [02-11|16:05:06.208] Persisted trie from memory database      nodes=0   flushnodes=0 size=0.00B     flushsize=0.00B time="1.894µs"   flushtime=0s gcnodes=0 gcsize=0.00B gctime=0s         livenodes=0   livesize=0.00B
WARN [02-11|16:05:06.208] Served eth_call                          reqid=11  duration=5.192351143s err="execution aborted (timeout = 5s)"
--- FAIL: TestVersion30 (5.33s)
TestVersion40
Stack Traces | 5.380s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
    precompile_inclusion_test.go:94: goroutine 634032 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x40e70f0, 0xc091310000}, {0x40a3a40, 0xc0a93867e0}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc091310000, {0x40a3a40, 0xc0a93867e0}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:2075 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc091310000, 0x28, {0xc0a75c9df8, 0x5, 0x39?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:94 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion40(0xc091310000?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:71 +0x64b
        testing.tRunner(0xc091310000, 0x3d1f1b0)
        	/opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.6/x64/src/testing/testing.go:1997 +0x465
        
INFO [02-11|16:05:06.208] Blockchain stopped
    precompile_inclusion_test.go:94: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
INFO [02-11|16:05:06.210] Deploying inbox
--- FAIL: TestVersion40 (5.38s)
TestSequencerPriceAdjustsFrom5Gwei
Stack Traces | 34.210s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
INFO [02-11|16:13:03.573] Log index head rendering in progress     firstblock=0 lastblock=215 processed=2  remaining=0 elapsed=1.022s
INFO [02-11|16:13:03.573] Log index head rendering finished        firstblock=0 lastblock=215 processed=2  elapsed=1.023s
INFO [02-11|16:13:03.574] Transaction pool stopped
WARN [02-11|16:13:03.574] error applying transaction               tx="{\"type\":\"0x2\",\"chainId\":\"0x64aba\",\"nonce\":\"0x10e\",\"to\":\"0x0c709f340f0bb2e361229e345b7e26999d0969ab\",\"gas\":\"0x7a1200\",\"gasPrice\":\"0x0\",\"maxPriorityFeePerGas\":\"0xbebc200\",\"maxFeePerGas\":\"0xbebc200\",\"value\":\"0xe8d4a51000\",\"input\":\"0x\",\"accessList\":[],\"v\":\"0x0\",\"r\":\"0xdf4963485a7283d0654d893448fa218303e41e959f161d1347a0a56d6b98c0e4\",\"s\":\"0x4f968ee6eb6659dabed2006229e9299f053ccd70551e95a1d8a231a1ec627bb9\",\"yParity\":\"0x0\",\"hash\":\"0x2712e5c45d81800feae08d549320a6c995bc9c0e3d3f7eb5b306a8455ff58d59\"}" err="Storage slot value condition not met"
INFO [02-11|16:13:03.574] Persisting dirty state                   head=215 root=c9e6ea..d8841a layers=215
WARN [02-11|16:13:03.580] Served eth_sendRawTransactionConditional reqid=310  duration=7.83959ms     err="Storage slot value condition not met"
WARN [02-11|16:13:03.582] error applying transaction               tx="{\"type\":\"0x2\",\"chainId\":\"0x64aba\",\"nonce\":\"0x10e\",\"to\":\"0x0c709f340f0bb2e361229e345b7e26999d0969ab\",\"gas\":\"0x7a1200\",\"gasPrice\":\"0x0\",\"maxPriorityFeePerGas\":\"0xbebc200\",\"maxFeePerGas\":\"0xbebc200\",\"value\":\"0xe8d4a51000\",\"input\":\"0x\",\"accessList\":[],\"v\":\"0x0\",\"r\":\"0xdf4963485a7283d0654d893448fa218303e41e959f161d1347a0a56d6b98c0e4\",\"s\":\"0x4f968ee6eb6659dabed2006229e9299f053ccd70551e95a1d8a231a1ec627bb9\",\"yParity\":\"0x0\",\"hash\":\"0x2712e5c45d81800feae08d549320a6c995bc9c0e3d3f7eb5b306a8455ff58d59\"}" err="Storage slot value condition not met"
WARN [02-11|16:13:03.583] Served eth_sendRawTransactionConditional reqid=311  duration=2.19612ms     err="Storage slot value condition not met"
WARN [02-11|16:13:03.584] error applying transaction               tx="{\"type\":\"0x2\",\"chainId\":\"0x64aba\",\"nonce\":\"0x10e\",\"to\":\"0x0c709f340f0bb2e361229e345b7e26999d0969ab\",\"gas\":\"0x7a1200\",\"gasPrice\":\"0x0\",\"maxPriorityFeePerGas\":\"0xbebc200\",\"maxFeePerGas\":\"0xbebc200\",\"value\":\"0xe8d4a51000\",\"input\":\"0x\",\"accessList\":[],\"v\":\"0x0\",\"r\":\"0xdf4963485a7283d0654d893448fa218303e41e959f161d1347a0a56d6b98c0e4\",\"s\":\"0x4f968ee6eb6659dabed2006229e9299f053ccd70551e95a1d8a231a1ec627bb9\",\"yParity\":\"0x0\",\"hash\":\"0x2712e5c45d81800feae08d549320a6c995bc9c0e3d3f7eb5b306a8455ff58d59\"}" err="Storage slot value condition not met"
INFO [02-11|16:13:03.585] Imported new potential chain segment     number=27  hash=fb214c..ce863d blocks=1  txs=1   mgas=7.089  elapsed=42.084ms     mgasps=168.436  triediffs=130.32KiB  triedirty=0.00B
INFO [02-11|16:13:03.586] Chain head was updated                   number=27  hash=fb214c..ce863d root=af758d..d82d95 elapsed="306.51µs"
INFO [02-11|16:13:03.586] Persisted dirty state to disk            size=737.32KiB elapsed=9.888ms
INFO [02-11|16:13:03.586] Log index head rendering in progress     firstblock=0 lastblock=26  processed=1  remaining=0 elapsed=1.126s
INFO [02-11|16:13:03.586] Log index head rendering finished        firstblock=0 lastblock=26  processed=1  elapsed=1.126s
INFO [02-11|16:13:03.587] Imported new potential chain segment     number=292 hash=a081bb..624391 blocks=1  txs=1   mgas=0.142  elapsed=72.935ms     mgasps=1.948    triediffs=752.22KiB  triedirty=129.78KiB
INFO [02-11|16:13:03.588] Chain head was updated                   number=292 hash=a081bb..624391 root=f50039..8c0d4e elapsed="104.437µs"
INFO [02-11|16:13:03.588] Submitted transaction                    hash=0x1154d8400138eff3385eaf18f622d093d65bfc2d1acabc2bef49769334d476ce from=0x26E554a8acF9003b83495c7f45F06edCB803d4e3 nonce=46  recipient=0x0C709F340F0BB2e361229e345B7e26999d0969Ab value=1
WARN [02-11|16:13:03.604] Served eth_sendRawTransactionConditional reqid=312  duration=21.01808ms    err="Storage slot value condition not met"
INFO [02-11|16:13:03.586] Blockchain stopped
--- FAIL: TestSequencerPriceAdjustsFrom5Gwei (34.21s)

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

@bragaigor bragaigor marked this pull request as ready for review February 9, 2026 19:47
Signed-off-by: Igor Braga <5835477+bragaigor@users.noreply.github.com>
Signed-off-by: Igor Braga <5835477+bragaigor@users.noreply.github.com>
pmikolajczyk41
pmikolajczyk41 previously approved these changes Feb 11, 2026
Copy link
Member

@pmikolajczyk41 pmikolajczyk41 left a comment

Choose a reason for hiding this comment

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

one minor request, otherwise LGTM

gligneul
gligneul previously approved these changes Feb 11, 2026
@gligneul gligneul assigned eljobe and unassigned gligneul Feb 12, 2026
@eljobe eljobe enabled auto-merge February 12, 2026 12:52
@eljobe eljobe added this pull request to the merge queue Feb 12, 2026
Merged via the queue into master with commit ffbcad1 Feb 12, 2026
26 checks passed
@eljobe eljobe deleted the braga/intro-machine_locator_validator branch February 12, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants