Skip to content

Conversation

@MishkaRogachev
Copy link
Contributor

Fixes NIT-4068

This PR introduces the Multi-Dimensional Multi-Constraint pricer foundation, extending ArbOS gas pricing to support multiple resource dimensions per constraint.

  • Moved legacy GasConstraint implementation to arbos/constraints.
  • Added MultiGasConstraint type in arbos/constraints.
  • L2PricingState integration: added multigasConstraints vector alongside legacy gasConstraints.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
2161 4 2157 0
View the top 3 failed tests by shortest run time
TestMultigasStylus_StorageWrite/out_of_gas
Stack Traces | 0.200s run time
=== RUN   TestMultigasStylus_StorageWrite/out_of_gas
    multigas_stylus_program_test.go:380: 
        	Error Trace:	/home/runner/work/nitro/nitro/system_tests/multigas_stylus_program_test.go:380
        	Error:      	An error is expected but got nil.
        	Test:       	TestMultigasStylus_StorageWrite/out_of_gas
--- FAIL: TestMultigasStylus_StorageWrite/out_of_gas (0.20s)
TestVersion40
Stack Traces | 16.680s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
�[34;1mCalling the ArbosTest precompile (Rust => precompile)�[0;0m
    precompile_inclusion_test.go:90: goroutine 455318 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.3/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x40c6910, 0xc061b8f880}, {0x4084280, 0xc015af12f0}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc061b8f880, {0x4084280, 0xc015af12f0}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:1759 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc061b8f880, 0x28, {0xc1186afdf8, 0x5, 0x39?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:90 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion40(0xc061b8f880?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:71 +0x64b
        testing.tRunner(0xc061b8f880, 0x3d0c6e0)
        	/opt/hostedtoolcache/go/1.25.3/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.3/x64/src/testing/testing.go:1997 +0x465
        
    precompile_inclusion_test.go:90: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
�[38;5;48;1myay!! we validated block 11 in 99.38ms�[0;0m
--- FAIL: TestVersion40 (16.68s)
TestMultigasStylus_StorageWrite
Stack Traces | 19.980s run time
=== RUN   TestMultigasStylus_StorageWrite
INFO [11-13|10:12:01.265] New Key                                  name=Owner       Address=0x26E554a8acF9003b83495c7f45F06edCB803d4e3
INFO [11-13|10:12:01.265] New Key                                  name=Faucet      Address=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A
WARN [11-13|10:12:01.265] Sequencer ReadFromTxQueueTimeout is higher than MaxBlockSpeed ReadFromTxQueueTimeout=1s MaxBlockSpeed=10ms
WARN [11-13|10:12:01.265] Sequencer ReadFromTxQueueTimeout is higher than MaxBlockSpeed ReadFromTxQueueTimeout=1s MaxBlockSpeed=10ms
=== PAUSE TestMultigasStylus_StorageWrite
=== CONT  TestMultigasStylus_StorageWrite
ERROR[11-13|10:18:21.389] Dangling trie nodes after full cleanup
--- FAIL: TestMultigasStylus_StorageWrite (19.98s)

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

@MishkaRogachev MishkaRogachev force-pushed the arbos-storage-for-multi-dimensional-constraints branch 4 times, most recently from 85df79d to 294be68 Compare November 5, 2025 11:35
@gligneul gligneul assigned MishkaRogachev and unassigned gligneul Nov 5, 2025
@MishkaRogachev MishkaRogachev force-pushed the arbos-storage-for-multi-dimensional-constraints branch 2 times, most recently from c27ef7d to e211bdd Compare November 11, 2025 17:19
@MishkaRogachev MishkaRogachev force-pushed the arbos-storage-for-multi-dimensional-constraints branch from e211bdd to 4043da2 Compare November 11, 2025 18:24
@gligneul gligneul assigned MishkaRogachev and unassigned gligneul Nov 11, 2025
@MishkaRogachev MishkaRogachev force-pushed the arbos-storage-for-multi-dimensional-constraints branch from 4043da2 to a16f9f4 Compare November 12, 2025 10:24
@gligneul gligneul assigned eljobe and unassigned gligneul Nov 12, 2025
Copy link
Member

@eljobe eljobe left a comment

Choose a reason for hiding this comment

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

Looks very nice. Well-organized code. 👍

@eljobe eljobe enabled auto-merge November 13, 2025 10:23
@eljobe eljobe added this pull request to the merge queue Nov 13, 2025
Merged via the queue into master with commit df5940b Nov 13, 2025
25 checks passed
@eljobe eljobe deleted the arbos-storage-for-multi-dimensional-constraints branch November 13, 2025 10:48
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