Skip to content

micro-opmtimise address-filter hashing implementation - NIT-4757#4600

Merged
joshuacolvin0 merged 3 commits intomasterfrom
micro-optimise-hashing-for-addressfilter
Apr 6, 2026
Merged

micro-opmtimise address-filter hashing implementation - NIT-4757#4600
joshuacolvin0 merged 3 commits intomasterfrom
micro-optimise-hashing-for-addressfilter

Conversation

@mahdy-nasr
Copy link
Copy Markdown
Contributor

As per title, address NIT-4757.

@mahdy-nasr
Copy link
Copy Markdown
Contributor Author

will update destination branch after destination PR get merged.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

❌ Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.00%. Comparing base (50a91e4) to head (f98d1ac).
⚠️ Report is 75 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4600      +/-   ##
==========================================
- Coverage   34.33%   34.00%   -0.34%     
==========================================
  Files         498      494       -4     
  Lines       59085    58932     -153     
==========================================
- Hits        20286    20038     -248     
- Misses      35218    35349     +131     
+ Partials     3581     3545      -36     

Base automatically changed from implement-string-hashing-for-address-filtering to master April 3, 2026 16:21
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

❌ 10 Tests Failed:

Tests completed Failed Passed Skipped
4709 10 4699 0
View the top 3 failed tests by shortest run time
TestPruningDBSizeReduction
Stack Traces | 0.000s run time
=== RUN   TestPruningDBSizeReduction
--- FAIL: TestPruningDBSizeReduction (0.00s)
TestAliasingFlaky
Stack Traces | -0.000s run time
=== RUN   TestAliasingFlaky
=== PAUSE TestAliasingFlaky
=== CONT  TestAliasingFlaky
    common_test.go:777: BuildL1 deployConfig: DeployBold=true, DeployReferenceDAContracts=false
INFO [04-06|14:04:34.950] New local node record                    seq=1,775,484,274,949 id=ceba72948052f0a2                        ip=127.0.0.1 udp=0 tcp=0
INFO [04-06|14:04:34.950] Started P2P networking                   self=enode://1d8768640a0716a1f0a97b058d060892049ddc3f2e633fae141a5d1a36342f09e1d3abc0d6f961b1ec0426cb8167fcfba557eb76fdbc069de75fbe03f5b5849c@127.0.0.1:0
WARN [04-06|14:04:34.950] Getting file info                        dir= error="stat : no such file or directory"
INFO [04-06|14:04:34.950] Started log indexer
TestBatchPosterL1SurplusMatchesBatchGasFlaky
Stack Traces | 0.550s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
panic: runtime error: invalid memory address or nil pointer dereference [recovered, repanicked]
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x207ed92]

goroutine 60 [running]:
testing.tRunner.func1.2({0x37e7220, 0x62029b0})
	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1872 +0x237
testing.tRunner.func1()
	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1875 +0x35b
panic({0x37e7220?, 0x62029b0?})
	/opt/hostedtoolcache/go/1.25.8/x64/src/runtime/panic.go:783 +0x132
github.com/offchainlabs/nitro/arbnode.(*InboxTracker).GetBatchCount(0x9d93900?)
	/home/runner/work/nitro/nitro/arbnode/inbox_tracker.go:210 +0x12
github.com/offchainlabs/nitro/arbnode.(*InboxTracker).FindInboxBatchContainingMessage(0x0, 0x7)
	/home/runner/work/nitro/nitro/arbnode/inbox_tracker.go:225 +0x2f
github.com/offchainlabs/nitro/system_tests.TestBatchPosterL1SurplusMatchesBatchGasFlaky(0xc00039d880)
	/home/runner/work/nitro/nitro/system_tests/batch_poster_test.go:839 +0x725
testing.tRunner(0xc00039d880, 0x41b9d48)
	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1934 +0xea
created by testing.(*T).Run in goroutine 1
	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1997 +0x465

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

@tsahee tsahee assigned joshuacolvin0 and unassigned tsahee Apr 3, 2026
}

hash := HashWithSalt(data.salt, addr)
hash := HashWithPrefix(GetHashInputPrefix(data.salt), addr)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably better to use data.hashInputPrefix here to test the cached field?

Copy link
Copy Markdown
Member

@joshuacolvin0 joshuacolvin0 left a comment

Choose a reason for hiding this comment

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

LGTM

@joshuacolvin0 joshuacolvin0 added this pull request to the merge queue Apr 6, 2026
Merged via the queue into master with commit 4676f43 Apr 6, 2026
26 of 27 checks passed
@joshuacolvin0 joshuacolvin0 deleted the micro-optimise-hashing-for-addressfilter branch April 6, 2026 16:17
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.

3 participants