Skip to content

Add test for invalid feed signature handling#4459

Open
pmikolajczyk41 wants to merge 8 commits intomasterfrom
pmikolajczyk/nit-4034-invalid-feed-signature
Open

Add test for invalid feed signature handling#4459
pmikolajczyk41 wants to merge 8 commits intomasterfrom
pmikolajczyk/nit-4034-invalid-feed-signature

Conversation

@pmikolajczyk41
Copy link
Member

As part of NIT-4017, TestInvalidSignature was removed in #3852 because the behavior changed - invalid feed signatures now cause messages to be skipped rather than triggering fatal errors. This PR adds TestInvalidSignatureMessagesAreSkipped to cover the new behavior. The test sends valid messages, then messages signed by an untrusted key, then a sentinel valid message to confirm the invalid ones were skipped.


closes NIT-4034

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

❌ 10 Tests Failed:

Tests completed Failed Passed Skipped
4244 10 4234 0
View the top 3 failed tests by shortest run time
TestNitroNodeVersionAlerter
Stack Traces | 0.820s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
INFO [03-04|14:31:57.473] Chain head was updated                   number=94  hash=76c286..2e66ba root=9cbd39..60c2f7 elapsed="63.859µs"
INFO [03-04|14:31:57.473] Imported new potential chain segment     number=307 hash=be8728..aa6958 blocks=1  txs=1   mgas=0.021  elapsed=1.304ms      mgasps=16.094   triediffs=656.24KiB triedirty=133.22KiB
INFO [03-04|14:31:57.473] Updated payload                          id=0x036ca7a41d1248cd number=341 hash=df1a09..d42925 txs=1   withdrawals=0 gas=151,025    fees=0.000755125    root=1bf3cf..1b559d elapsed=1.248ms
INFO [03-04|14:31:57.473] Chain head was updated                   number=307 hash=be8728..aa6958 root=85e253..512cbe elapsed="57.999µs"
INFO [03-04|14:31:57.474] Ethereum protocol stopped
INFO [03-04|14:31:57.474] Transaction pool stopped
INFO [03-04|14:31:57.474] Stopping work on payload                 id=0x036ca7a41d1248cd reason=delivery
INFO [03-04|14:31:57.474] Persisting dirty state                   head=33  root=48da4d..91a834 layers=33
WARN [03-04|14:31:57.474] ExecuteNextMsg failed to send message to execEngine err="createBlock mutex held"               msgIdxToExecute=124
INFO [03-04|14:31:57.474] Imported new potential chain segment     number=111 hash=fd2e3e..79a6dc blocks=1  txs=1   mgas=0.021  elapsed=1.265ms      mgasps=16.591   triediffs=608.42KiB triedirty=0.00B
INFO [03-04|14:31:57.474] Chain head was updated                   number=111 hash=fd2e3e..79a6dc root=e00694..ca036f elapsed="56.014µs"
INFO [03-04|14:31:57.474] Updated payload                          id=0x0328580e64c7eeb8 number=104 hash=fdd3ab..180455 txs=1   withdrawals=0 gas=142,058    fees=0.00071029     root=85fce0..dfcc48 elapsed=2.287ms
INFO [03-04|14:31:57.475] Imported new potential chain segment     number=341 hash=df1a09..d42925 blocks=1  txs=1   mgas=0.151  elapsed=1.753ms      mgasps=86.113   triediffs=664.84KiB triedirty=151.18KiB
INFO [03-04|14:31:57.476] Chain head was updated                   number=341 hash=df1a09..d42925 root=1bf3cf..1b559d elapsed="101.289µs"
INFO [03-04|14:31:57.476] Stopping work on payload                 id=0x0328580e64c7eeb8 reason=delivery
INFO [03-04|14:31:57.476] Batch overflow: compressed size limit exceeded compressedSize=247 limit=186 isHeader=false
INFO [03-04|14:31:57.476] Persisted dirty state to disk            size=152.66KiB elapsed=2.287ms
INFO [03-04|14:31:57.476] Blockchain stopped
INFO [03-04|14:31:57.478] Submitted transaction                    hash=0x6dac877f49b670958ac40062b5572819ea7c542455ebd3f60bf532562cfb52b9 from=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A nonce=226 recipient=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A value=1
--- FAIL: TestNitroNodeVersionAlerter (0.82s)
TestVersion30
Stack Traces | 7.950s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
        github.com/offchainlabs/nitro/system_tests.TestVersion30(0xc02e327180?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:67 +0x798
        testing.tRunner(0xc02e327180, 0x3d27690)
        	/opt/hostedtoolcache/go/1.25.7/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.7/x64/src/testing/testing.go:1997 +0x465
        
    precompile_inclusion_test.go:94: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
INFO [03-04|14:31:09.576] Stopping work on payload                 id=0x03923f132a085688 reason=delivery
INFO [03-04|14:31:09.577] Imported new potential chain segment     number=12 hash=08ff06..801bf0 blocks=1  txs=1  mgas=1.779  elapsed=1.678ms     mgasps=1060.147 triediffs=41.09KiB  triedirty=0.00B
INFO [03-04|14:31:09.592] Chain head was updated                   number=12 hash=08ff06..801bf0 root=1b0bfe..b096aa elapsed="245.94µs"
INFO [03-04|14:31:09.588] Submitted transaction                    hash=0x0475944c32b2b76c4d7457f507ba0531d61d82d7edb8a066577f3ad5f6c556a7 from=0x26E554a8acF9003b83495c7f45F06edCB803d4e3 nonce=1  recipient=0x0000000000000000000000000000000000000070 value=0
INFO [03-04|14:31:09.595] Writing cached state to disk             block=1  hash=0f2121..3322ae root=d45d64..4e7811
INFO [03-04|14:31:09.595] Persisted trie from memory database      nodes=23  flushnodes=0 size=3.61KiB   flushsize=0.00B time="112.43µs"  flushtime=0s gcnodes=0 gcsize=0.00B gctime="1.913µs"  livenodes=0   livesize=0.00B
INFO [03-04|14:31:09.595] Writing cached state to disk             block=1  hash=0f2121..3322ae root=d45d64..4e7811
INFO [03-04|14:31:09.595] Persisted trie from memory database      nodes=0   flushnodes=0 size=0.00B     flushsize=0.00B time=621ns       flushtime=0s gcnodes=0 gcsize=0.00B gctime=0s         livenodes=0   livesize=0.00B
INFO [03-04|14:31:09.595] Writing snapshot state to disk           root=28fb26..40a768
INFO [03-04|14:31:09.595] Persisted trie from memory database      nodes=0   flushnodes=0 size=0.00B     flushsize=0.00B time=391ns       flushtime=0s gcnodes=0 gcsize=0.00B gctime=0s         livenodes=0   livesize=0.00B
INFO [03-04|14:31:09.595] Blockchain stopped
--- FAIL: TestVersion30 (7.95s)
TestVersion40
Stack Traces | 8.640s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
        	/opt/hostedtoolcache/go/1.25.7/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x40f07d0, 0xc02e327880}, {0x40ad0c0, 0xc11ac85e00}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc02e327880, {0x40ad0c0, 0xc11ac85e00}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:2075 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc02e327880, 0x28, {0xc0999f5df8, 0x5, 0x39?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:94 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion40(0xc02e327880?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:71 +0x64b
        testing.tRunner(0xc02e327880, 0x3d27698)
        	/opt/hostedtoolcache/go/1.25.7/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.7/x64/src/testing/testing.go:1997 +0x465
        
    precompile_inclusion_test.go:94: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
INFO [03-04|14:31:09.573] Starting work on payload                 id=0x03923f132a085688
INFO [03-04|14:31:09.575] Updated payload                          id=0x03923f132a085688 number=12 hash=08ff06..801bf0 txs=1  withdrawals=0 gas=1,779,063  fees=1.779063e-06  root=1b0bfe..b096aa elapsed=1.339ms
INFO [03-04|14:31:09.575] Updated payload                          id=0x0376cd91233aad17 number=11 hash=8249bd..61cca8 txs=1  withdrawals=0 gas=1,404,923  fees=1.404923e-06  root=c04e35..cb88ce elapsed=8.592ms
WARN [03-04|14:31:09.576] Served eth_call                          reqid=12  duration=7.848678559s err="execution aborted (timeout = 5s)"
--- FAIL: TestVersion40 (8.64s)

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

@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 34.11%. Comparing base (b9b3864) to head (5353746).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4459      +/-   ##
==========================================
+ Coverage   32.72%   34.11%   +1.38%     
==========================================
  Files         493      493              
  Lines       58290    58290              
==========================================
+ Hits        19076    19883     +807     
+ Misses      35868    34823    -1045     
- Partials     3346     3584     +238     

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