Skip to content

Add system tests for custom genesis files#4641

Draft
bragaigor wants to merge 1 commit intomasterfrom
braga/tests-genesis-json-files
Draft

Add system tests for custom genesis files#4641
bragaigor wants to merge 1 commit intomasterfrom
braga/tests-genesis-json-files

Conversation

@bragaigor
Copy link
Copy Markdown
Contributor

@bragaigor bragaigor commented Apr 15, 2026

  • Add end-to-end system tests that boot a node from custom genesis JSON files and verify that declared wallet balances, contract code, and contract storage actually materialize on-chain
  • Add NodeBuilder.WithGenesisFile(t, path) helper for loading genesis files in tests
  • Cover three configuration variants: standard alloc, custom chain ID with InitialChainOwner, and arbOSInit with native token management

Co-Authored-By: Claude Opus 4.6

closes NIT-4801

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

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.79%. Comparing base (c28c984) to head (929310d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4641      +/-   ##
==========================================
- Coverage   33.79%   33.79%   -0.01%     
==========================================
  Files         499      499              
  Lines       60120    60120              
==========================================
- Hits        20317    20316       -1     
+ Misses      36259    36257       -2     
- Partials     3544     3547       +3     

@github-actions
Copy link
Copy Markdown
Contributor

❌ 11 Tests Failed:

Tests completed Failed Passed Skipped
4943 11 4932 0
View the top 3 failed tests by shortest run time
TestRedisProduceComplex/one_producer,_all_consumers_are_active
Stack Traces | 1.330s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
�[36mDEBUG�[0m[04-15|00:57:33.186] consumer: xack                           �[36mcid�[0m=ced837d1-a39c-4563-98b4-d37e6f38de56 �[36mmessageId�[0m=1776214652022-6
�[36mDEBUG�[0m[04-15|00:57:33.186] consumer: xdel                           �[36mcid�[0m=e135583e-32ac-4a8a-8206-eb7b5568fa11 �[36mmessageId�[0m=1776214652022-2
�[36mDEBUG�[0m[04-15|00:57:33.186] Redis stream consuming                   �[36mconsumer_id�[0m=31781bd4-f9ea-4156-bb7a-503420e30280 �[36mmessage_id�[0m=1776214652022-8
�[36mDEBUG�[0m[04-15|00:57:33.186] consumer: setting result                 �[36mcid�[0m=31781bd4-f9ea-4156-bb7a-503420e30280 �[36mmsgIdInStream�[0m=1776214652022-8  �[36mresultKeyInRedis�[0m=result-key:stream:d4e443fe-d396-4b53-9efd-d9dc02612e36.1776214652022-8
�[36mDEBUG�[0m[04-15|00:57:33.186] Redis stream consuming                   �[36mconsumer_id�[0m=d14b77fb-8c35-4174-a82d-0d05227d7be9 �[36mmessage_id�[0m=1776214652022-7
�[36mDEBUG�[0m[04-15|00:57:33.186] consumer: setting result                 �[36mcid�[0m=d14b77fb-8c35-4174-a82d-0d05227d7be9 �[36mmsgIdInStream�[0m=1776214652022-7  �[36mresultKeyInRedis�[0m=result-key:stream:d4e443fe-d396-4b53-9efd-d9dc02612e36.1776214652022-7
�[36mDEBUG�[0m[04-15|00:57:33.186] consumer: xdel                           �[36mcid�[0m=3eaf7dd6-de92-4b20-a34e-c2a23ae75735 �[36mmessageId�[0m=1776214652022-5
�[36mDEBUG�[0m[04-15|00:57:33.186] Redis stream consuming                   �[36mconsumer_id�[0m=ea82e50e-f368-4551-b948-8a25b2ea4bc3 �[36mmessage_id�[0m=1776214652022-9
�[36mDEBUG�[0m[04-15|00:57:33.186] consumer: xack                           �[36mcid�[0m=31781bd4-f9ea-4156-bb7a-503420e30280 �[36mmessageId�[0m=1776214652022-8
�[36mDEBUG�[0m[04-15|00:57:33.186] consumer: setting result                 �[36mcid�[0m=ea82e50e-f368-4551-b948-8a25b2ea4bc3 �[36mmsgIdInStream�[0m=1776214652022-9  �[36mresultKeyInRedis�[0m=result-key:stream:d4e443fe-d396-4b53-9efd-d9dc02612e36.1776214652022-9
�[36mDEBUG�[0m[04-15|00:57:33.187] consumer: xack                           �[36mcid�[0m=d14b77fb-8c35-4174-a82d-0d05227d7be9 �[36mmessageId�[0m=1776214652022-7
�[36mDEBUG�[0m[04-15|00:57:33.187] consumer: xack                           �[36mcid�[0m=ea82e50e-f368-4551-b948-8a25b2ea4bc3 �[36mmessageId�[0m=1776214652022-9
�[36mDEBUG�[0m[04-15|00:57:33.187] consumer: xdel                           �[36mcid�[0m=31781bd4-f9ea-4156-bb7a-503420e30280 �[36mmessageId�[0m=1776214652022-8
�[36mDEBUG�[0m[04-15|00:57:33.191] consumer: xdel                           �[36mcid�[0m=ced837d1-a39c-4563-98b4-d37e6f38de56 �[36mmessageId�[0m=1776214652022-6
�[36mDEBUG�[0m[04-15|00:57:33.191] redis producer: check responses starting
�[36mDEBUG�[0m[04-15|00:57:33.191] consumer: xdel                           �[36mcid�[0m=d14b77fb-8c35-4174-a82d-0d05227d7be9 �[36mmessageId�[0m=1776214652022-7
�[36mDEBUG�[0m[04-15|00:57:33.191] consumer: xdel                           �[36mcid�[0m=ea82e50e-f368-4551-b948-8a25b2ea4bc3 �[36mmessageId�[0m=1776214652022-9
�[36mDEBUG�[0m[04-15|00:57:33.243] checkResponses                           �[36mresponded�[0m=69 �[36merrored�[0m=0 �[36mchecked�[0m=69
�[36mDEBUG�[0m[04-15|00:57:33.309] Error destroying a stream group          �[36merror�[0m="dial tcp 127.0.0.1:40857: connect: connection refused"
--- FAIL: TestRedisProduceComplex/one_producer,_all_consumers_are_active (1.33s)
TestRetryableFilteringStylusDelayedSandwichRollback
Stack Traces | 9.470s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
INFO [04-15|01:03:53.993] Imported new potential chain segment     number=36  hash=07840e..1d1216 blocks=1  txs=1  mgas=0.021  elapsed=4.920ms     mgasps=4.267    triediffs=179.76KiB triedirty=0.00B
INFO [04-15|01:03:54.000] Chain head was updated                   number=36  hash=07840e..1d1216 root=264e38..7ab6c0 elapsed="74.248µs"
INFO [04-15|01:03:54.000] Starting work on payload                 id=0x03c9133a867b8bb9
INFO [04-15|01:03:54.001] Stopping work on payload                 id=0x03a7e08f7edfe46c reason=delivery
INFO [04-15|01:03:54.001] Updated payload                          id=0x03c9133a867b8bb9 number=83  hash=569d59..7046cb txs=1  withdrawals=0 gas=21000      fees=0.002099941182 root=782c1e..d2e100 elapsed="611.773µs"
INFO [04-15|01:03:54.002] Stopping work on payload                 id=0x03c9133a867b8bb9 reason=delivery
INFO [04-15|01:03:54.002] Transaction pool stopped
INFO [04-15|01:03:54.002] Imported new potential chain segment     number=83  hash=569d59..7046cb blocks=1  txs=1  mgas=0.021  elapsed=1.085ms     mgasps=19.349   triediffs=378.41KiB triedirty=0.00B
INFO [04-15|01:03:54.002] Persisting dirty state                   head=29  root=c06c27..810335 layers=29
INFO [04-15|01:03:54.002] Chain head was updated                   number=83  hash=569d59..7046cb root=782c1e..d2e100 elapsed="56.306µs"
INFO [04-15|01:03:54.003] Starting work on payload                 id=0x03c6a6be2496c6e6
INFO [04-15|01:03:54.004] Submitted transaction                    hash=0xbf2737e7c091a7e18347e0b1e0dc3761eb742460d4d9f77eea4d373af8e71ecd from=0x26E554a8acF9003b83495c7f45F06edCB803d4e3 nonce=3   recipient=0x0000000000000000000000000000000000000070 value=0
INFO [04-15|01:03:54.004] Updated payload                          id=0x03c6a6be2496c6e6 number=44  hash=0e35da..ba61d3 txs=1  withdrawals=0 gas=21000      fees=0.002089462185 root=9ef3c0..a4de82 elapsed=1.128ms
INFO [04-15|01:03:54.005] InboxTracker                             sequencerBatchCount=2  messageCount=2   l1Block=33  l1Timestamp=2026-04-15T01:03:53+0000
INFO [04-15|01:03:54.005] Persisted dirty state to disk            size=142.01KiB elapsed=2.110ms
INFO [04-15|01:03:54.005] Blockchain stopped
INFO [04-15|01:03:54.005] Stopping work on payload                 id=0x03c6a6be2496c6e6 reason=delivery
INFO [04-15|01:03:54.006] Imported new potential chain segment     number=44  hash=0e35da..ba61d3 blocks=1  txs=1  mgas=0.021  elapsed=1.277ms     mgasps=16.436   triediffs=209.39KiB triedirty=0.00B
INFO [04-15|01:03:54.006] Chain head was updated                   number=44  hash=0e35da..ba61d3 root=9ef3c0..a4de82 elapsed="95.248µs"
--- FAIL: TestRetryableFilteringStylusDelayedSandwichRollback (9.47s)
TestRetryableFilteringAutoRedeemCascadeDepth3_EventFilter
Stack Traces | 11.860s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
INFO [04-15|01:07:56.278] Submitted transaction                    hash=0xcd3f8e9ecd43a62da6f7e28626352c0b4c54f622901cf28c8120126cab29209b from=0xb386a74Dcab67b66F8AC07B4f08365d37495Dd23 nonce=73  recipient=0x4814C33F30bEF04A7EAd60d3225441684124428A value=0
INFO [04-15|01:07:56.278] DataPoster sent transaction              nonce=73  hash=cd3f8e..29209b feeCap=501,972,090    tipCap=50,000,000    blobFeeCap=&lt;nil&gt; gas=157,187
INFO [04-15|01:07:56.278] Starting work on payload                 id=0x03fa4620b1876c44
INFO [04-15|01:07:56.279] BatchPoster: batch sent                  sequenceNumber=74 from=140 to=143 prevDelayed=51 currentDelayed=53 totalSegments=5  numBlobs=0
INFO [04-15|01:07:56.279] Updated payload                          id=0x03469b81c096e72e number=36  hash=09a594..6ab172 txs=1  withdrawals=0 gas=21000      fees=0.002069276962 root=b6b44a..5cbe72 elapsed=1.156ms
INFO [04-15|01:07:56.280] Updated payload                          id=0x03fa4620b1876c44 number=251 hash=66675f..bc1317 txs=1  withdrawals=0 gas=21000      fees=0.0021         root=d7e40c..00b7b0 elapsed=1.142ms
INFO [04-15|01:07:56.280] Stopping work on payload                 id=0x03469b81c096e72e reason=delivery
INFO [04-15|01:07:56.280] Starting work on payload                 id=0x03e0aea2c91dec61
INFO [04-15|01:07:56.280] Stopping work on payload                 id=0x03fa4620b1876c44 reason=delivery
INFO [04-15|01:07:56.280] Imported new potential chain segment     number=36  hash=09a594..6ab172 blocks=1  txs=1  mgas=0.021  elapsed=1.459ms      mgasps=14.389   triediffs=183.90KiB triedirty=0.00B
INFO [04-15|01:07:56.281] Submitted transaction                    hash=0x4268406333fbd34ed483ede6e0a0f8bd7dc9cf70630c7a7ca929ac708cc1abf5 from=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A nonce=30  recipient=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A value=1,000,000,000,000
INFO [04-15|01:07:56.281] Chain head was updated                   number=36  hash=09a594..6ab172 root=b6b44a..5cbe72 elapsed="108.423µs"
INFO [04-15|01:07:56.282] Imported new potential chain segment     number=251 hash=66675f..bc1317 blocks=1  txs=1  mgas=0.021  elapsed=1.932ms      mgasps=10.868   triediffs=653.57KiB triedirty=110.48KiB
INFO [04-15|01:07:56.282] Chain head was updated                   number=251 hash=66675f..bc1317 root=d7e40c..00b7b0 elapsed="97.512µs"
INFO [04-15|01:07:56.283] Starting peer-to-peer node               instance=test-stack-name/linux-amd64/go1.25.8
WARN [04-15|01:07:56.283] P2P server will be useless, neither dialing nor listening
INFO [04-15|01:07:56.283] Starting work on payload                 id=0x0391773b7fc17ab9
INFO [04-15|01:07:56.284] Updated payload                          id=0x0391773b7fc17ab9 number=68  hash=3cf31d..c17a1e txs=1  withdrawals=0 gas=21000      fees=0.00209956952  root=e67768..f7445e elapsed=1.006ms
WARN [04-15|01:07:56.285] Getting file info                        dir= error="stat : no such file or directory"
--- FAIL: TestRetryableFilteringAutoRedeemCascadeDepth3_EventFilter (11.86s)

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

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.

1 participant