Skip to content

Add Stylus redeem filtering tests: execution rollback NIT-4607#4564

Merged
tsahee merged 4 commits intomasterfrom
validate-stylus-contracts-redeems
Apr 2, 2026
Merged

Add Stylus redeem filtering tests: execution rollback NIT-4607#4564
tsahee merged 4 commits intomasterfrom
validate-stylus-contracts-redeems

Conversation

@mahdy-nasr
Copy link
Copy Markdown
Contributor

Add system tests for Stylus contract redeem filtering (NIT-4607). Verifies that the group rollback mechanism
from PR #4436 correctly handles Stylus (WASM) contracts. Two tests: SandwichRollback (L2 same-block sandwich via Pause/Activate), DelayedSandwichRollback (L1 delayed inbox halt/resume cycle).

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 34.47%. Comparing base (3751444) to head (02c81bc).
⚠️ Report is 254 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4564      +/-   ##
==========================================
- Coverage   34.50%   34.47%   -0.04%     
==========================================
  Files         497      498       +1     
  Lines       58978    59094     +116     
==========================================
+ Hits        20353    20372      +19     
- Misses      35012    35081      +69     
- Partials     3613     3641      +28     

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

❌ 17 Tests Failed:

Tests completed Failed Passed Skipped
4699 17 4682 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
... [CONTENT TRUNCATED: Keeping last 20 lines]
INFO [03-31|15:49:35.315] Updated payload                          id=0x030a555e332c1f9e                      number=45 hash=10483a..00c019 txs=1  withdrawals=0 gas=21000     fees=0.0020907153   root=b66360..56fec8 elapsed="596.784µs"
INFO [03-31|15:49:35.315] Stopping work on payload                 id=0x030a555e332c1f9e                      reason=delivery
INFO [03-31|15:49:35.316] Imported new potential chain segment     number=45 hash=10483a..00c019 blocks=1  txs=1  mgas=0.021 elapsed="706.53µs"  mgasps=29.723   triediffs=219.33KiB triedirty=0.00B
INFO [03-31|15:49:35.316] Chain head was updated                   number=45 hash=10483a..00c019 root=b66360..56fec8 elapsed="64.807µs"
INFO [03-31|15:49:35.317] Starting work on payload                 id=0x0357e46a0f2de708
INFO [03-31|15:49:35.318] Updated payload                          id=0x0357e46a0f2de708                      number=46 hash=1e3895..67a4aa txs=0  withdrawals=0 gas=0         fees=0              root=3ff08c..20c9f4 elapsed="580.17µs"
INFO [03-31|15:49:35.318] Stopping work on payload                 id=0x0357e46a0f2de708                      reason=delivery
INFO [03-31|15:49:35.319] Imported new potential chain segment     number=46 hash=1e3895..67a4aa blocks=1  txs=0  mgas=0.000 elapsed="917.561µs" mgasps=0.000    triediffs=222.48KiB triedirty=0.00B
INFO [03-31|15:49:35.319] Chain head was updated                   number=46 hash=1e3895..67a4aa root=3ff08c..20c9f4 elapsed="19.589µs"
INFO [03-31|15:49:35.320] Submitted transaction                    hash=0x4d6064e44c7537bf33cf00d602fad132637ea9f1a2c03b60004b0ee87265d2db from=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A nonce=7  recipient=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A value=1,000,000,000,000
INFO [03-31|15:49:35.320] Ethereum protocol stopped
INFO [03-31|15:49:35.320] Transaction pool stopped
INFO [03-31|15:49:35.320] Starting work on payload                 id=0x03b3f46fbed9bd88
INFO [03-31|15:49:35.320] Persisting dirty state                   head=33 root=5f33d4..4ba7a0 layers=33
INFO [03-31|15:49:35.321] Updated payload                          id=0x03b3f46fbed9bd88                      number=47 hash=497b6f..0550de txs=1  withdrawals=0 gas=21000     fees=0.00209288868  root=dcf315..210d4e elapsed="409.654µs"
INFO [03-31|15:49:35.321] Stopping work on payload                 id=0x03b3f46fbed9bd88                      reason=delivery
INFO [03-31|15:49:35.321] Persisted dirty state to disk            size=162.93KiB elapsed="914.03µs"
INFO [03-31|15:49:35.321] Blockchain stopped
INFO [03-31|15:49:35.321] Imported new potential chain segment     number=47 hash=497b6f..0550de blocks=1  txs=1  mgas=0.021 elapsed="441.683µs" mgasps=47.545   triediffs=226.45KiB triedirty=0.00B
INFO [03-31|15:49:35.322] Chain head was updated                   number=47 hash=497b6f..0550de root=dcf315..210d4e elapsed="35.042µs"
TestBatchPosterL1SurplusMatchesBatchGasFlaky
Stack Traces | 0.570s 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=0x207b192]

goroutine 55 [running]:
testing.tRunner.func1.2({0x37e38e0, 0x61f89b0})
	/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({0x37e38e0?, 0x61f89b0?})
	/opt/hostedtoolcache/go/1.25.8/x64/src/runtime/panic.go:783 +0x132
github.com/offchainlabs/nitro/arbnode.(*InboxTracker).GetBatchCount(0x1217900?)
	/home/runner/work/nitro/nitro/arbnode/inbox_tracker.go:210 +0x12
github.com/offchainlabs/nitro/arbnode.(*InboxTracker).FindInboxBatchContainingMessage(0x0, 0x6)
	/home/runner/work/nitro/nitro/arbnode/inbox_tracker.go:225 +0x2f
github.com/offchainlabs/nitro/system_tests.TestBatchPosterL1SurplusMatchesBatchGasFlaky(0xc000482c40)
	/home/runner/work/nitro/nitro/system_tests/batch_poster_test.go:839 +0x725
testing.tRunner(0xc000482c40, 0x41b5880)
	/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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new system test coverage to ensure redeem filtering group rollback behaves correctly when the redeem chain involves Stylus (WASM) contracts, including both same-block “sandwich” scenarios and delayed inbox halt/resume scenarios (NIT-4607).

Changes:

  • Add two new Stylus-focused system tests covering rollback isolation within a block and delayed sequencer halt/resume behavior.
  • Add helper routines to enable Stylus (chain ownership + ink price) and deploy a Stylus storage contract for the tests.
  • Add a changelog entry documenting the internal test additions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
system_tests/retryable_tickets_filtering_stylus_test.go New system tests validating redeem filtering rollback behavior with Stylus contracts (same-block and delayed-inbox variants).
changelog/mnasr-nit-4607.md Notes the addition of Stylus redeem-related tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@diegoximenes diegoximenes assigned tsahee and unassigned diegoximenes Apr 1, 2026
@tsahee tsahee added this pull request to the merge queue Apr 1, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Apr 1, 2026
@tsahee tsahee added this pull request to the merge queue Apr 2, 2026
Merged via the queue into master with commit bcf4a04 Apr 2, 2026
27 checks passed
@tsahee tsahee deleted the validate-stylus-contracts-redeems branch April 2, 2026 15:29
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