Skip to content

Conversation

@pmikolajczyk41
Copy link
Member

@pmikolajczyk41 pmikolajczyk41 commented Nov 3, 2025

We extend (Arbitrum) chain config with a new field describing limit on the uncompressed batch size (previously hardcoded to 16MB).

Note

Design decision: Instead of propagating individual limit values as bare integers between components, we pass the entire params.ChainConfig struct. This architectural decision is crucial for maintaining chain configuration integrity. By requiring access to the specific limit field only via the full parameters object, we explicitly guarantee that the value used is always sourced directly from the authoritative chain configuration. This mitigates the risk of developers accidentally (or intentionally) passing arbitrary values that are incompatible with the chain's agreed-upon settings.

This limit value is used in two places:

  1. Batch posting: we use it to know when to stop appending data to the batch. This PR extends BatchPosterOpts and BatchPoster structs.
  2. Inbox reading: we use it to allocate enough space before decompressing sequencer message. This PR adds a new argument to the ParseSequencerMessage.

Related changes:

  • use ArbitrumDevTestChainConfig in inbox fuzzing tests
  • adapt function signatures for MEL
  • extend MessageExtractor with chain params (I preferred to do this instead of extending MEL state as suggested in the Linear ticket)

pulls in OffchainLabs/go-ethereum#571
closes NIT-3121

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
4446 5 4441 0
View the top 3 failed tests by shortest run time
TestDataStreaming_ServerHaltsProtocolWhenObservesInconsistency
Stack Traces | 0.000s run time
=== RUN   TestDataStreaming_ServerHaltsProtocolWhenObservesInconsistency
WARN [12-18|16:47:15.000] Served datastreaming_start               conn=127.0.0.1:42464 reqid=1 duration="131.556µs" err="too much time has elapsed since request was signed"
INFO [12-18|16:47:15.000] rpc response                             method=datastreaming_start logId=1 err="too much time has elapsed since request was signed" result={} attempt=0 args="[\"0x69443012\", \"0x5\", \"0xd9\", \"0x400\", \"0xa\", \"0x2000bf304ac12edabbb9abb7c8dbb4c8f8647485f5e2c1e4fa708ee2c250494e3017d4af8e4d0fd9ac47b7ae767c850f9dfc4a2e9c72c682879a48f011d1b81f00\"]" errorData=null
    protocol_test.go:109: goroutine 3993 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.5/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x161eed0, 0xc000d90540}, {0x1605720, 0xc000dbd8f0}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x9f
        github.com/offchainlabs/nitro/daprovider/data_streaming.TestDataStreaming_ServerHaltsProtocolWhenObservesInconsistency(0xc000d90540)
        	/home/runner/work/nitro/nitro/daprovider/data_streaming/protocol_test.go:109 +0x125
        testing.tRunner(0xc000d90540, 0x14b02a0)
        	/opt/hostedtoolcache/go/1.25.5/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.5/x64/src/testing/testing.go:1997 +0x465
        
    protocol_test.go:109: �[31;1m [] too much time has elapsed since request was signed �[0;0m
--- FAIL: TestDataStreaming_ServerHaltsProtocolWhenObservesInconsistency (0.00s)
TestVersion30
Stack Traces | 6.790s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
INFO [12-18|16:57:42.436] HTTP server stopped                      endpoint=127.0.0.1:45307
TRACE[12-18|16:57:42.437] P2P networking is spinning down
    precompile_inclusion_test.go:94: goroutine 610211 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.5/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x40f2d10, 0xc0b0992e00}, {0x40b0440, 0xc1042ee900}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc0b0992e00, {0x40b0440, 0xc1042ee900}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:2003 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc0b0992e00, 0x1e, {0xc26cde3db0, 0x6, 0x4f5de9?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:94 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion30(0xc0b0992e00?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:67 +0x798
        testing.tRunner(0xc0b0992e00, 0x3d326f0)
        	/opt/hostedtoolcache/go/1.25.5/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.5/x64/src/testing/testing.go:1997 +0x465
        
    precompile_inclusion_test.go:94: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
--- FAIL: TestVersion30 (6.79s)
TestVersion40
Stack Traces | 7.020s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
�[90mreturn_data_size: deployed to 0xA02062aa4Cb0872315ACA3eA6dBF077d90B2DAC1�[0;0m
�[38;5;48;1myay!! we validated block 6 in 244.88ms�[0;0m
    precompile_inclusion_test.go:94: goroutine 610212 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.5/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x40f2d10, 0xc0b0992fc0}, {0x40b0440, 0xc12e6678f0}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc0b0992fc0, {0x40b0440, 0xc12e6678f0}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:2003 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc0b0992fc0, 0x28, {0xc0b3655df8, 0x5, 0x39?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:94 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion40(0xc0b0992fc0?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:71 +0x64b
        testing.tRunner(0xc0b0992fc0, 0x3d326f8)
        	/opt/hostedtoolcache/go/1.25.5/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.5/x64/src/testing/testing.go:1997 +0x465
        
    precompile_inclusion_test.go:94: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
--- FAIL: TestVersion40 (7.02s)

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

Copy link
Member

@Tristan-Wilson Tristan-Wilson left a comment

Choose a reason for hiding this comment

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

PR looks good but I had a comment on the geth PR which will probably change this one due to how to access the new decompression limit setting, so marking request changes.

Tristan-Wilson
Tristan-Wilson previously approved these changes Nov 12, 2025
Copy link
Contributor

@tsahee tsahee left a comment

Choose a reason for hiding this comment

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

sorry for the long delay. generally seems great

tsahee
tsahee previously requested changes Dec 18, 2025

tx, err := seqInbox.AddSequencerL2BatchFromOrigin8f111f3c(&sequencer, seqNum, batch, big.NewInt(1), common.Address{}, big.NewInt(0), big.NewInt(0))
Require(t, err)
_, err = EnsureTxSucceeded(ctx, builder.L1.Client, tx)
Copy link
Contributor

Choose a reason for hiding this comment

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

here, you can look at the receipt, search for the event SequencerBatchDelivered and extract from it seqMessageIndex. Then you can wait for this specific batch to be received instead of waiting for a new batch to be received

Copy link
Member Author

Choose a reason for hiding this comment

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

done ✅

…-uncompressed-batch-size-limit

# Conflicts:
#	arbnode/mel/extraction/message_extraction_function.go
#	arbnode/mel/extraction/message_extraction_function_test.go
#	arbnode/mel/runner/mel.go
#	cmd/pruning/pruning.go
…-uncompressed-batch-size-limit

# Conflicts:
#	cmd/replay/main.go
@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.47%. Comparing base (5b59a1a) to head (29815a8).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3947      +/-   ##
==========================================
+ Coverage   33.35%   33.47%   +0.11%     
==========================================
  Files         453      453              
  Lines       55536    55556      +20     
==========================================
+ Hits        18524    18596      +72     
+ Misses      33774    33729      -45     
+ Partials     3238     3231       -7     

@tsahee tsahee assigned tsahee and unassigned Tristan-Wilson Dec 19, 2025
@pmikolajczyk41 pmikolajczyk41 dismissed tsahee’s stale review December 19, 2025 17:13

Offline, Tsahi wrote:

I added a comment about testing. It's small but I think it's exactly the sort of thing we should start to do more to make our tests less flaky. I left the design-approved comment. After it's solved, you can let anyone approve it, dismiss my review and merge.

The issue has been solved, thus dismissing.

@pmikolajczyk41 pmikolajczyk41 added this pull request to the merge queue Dec 19, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 19, 2025
@pmikolajczyk41 pmikolajczyk41 added this pull request to the merge queue Dec 19, 2025
Merged via the queue into master with commit 64e2135 Dec 19, 2025
25 of 26 checks passed
@pmikolajczyk41 pmikolajczyk41 deleted the pmikolajczyk/nit-3121-uncompressed-batch-size-limit branch December 19, 2025 21:32
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