Skip to content

Add multi dimensional multi constraint pricer algorithm - #4012

Merged
eljobe merged 13 commits into
masterfrom
add-multi-dimensional-multi-constraint-pricer-algorithm
Dec 4, 2025
Merged

eljobe merged 13 commits into
masterfrom
add-multi-dimensional-multi-constraint-pricer-algorithm

Conversation

@MishkaRogachev

@MishkaRogachev MishkaRogachev commented Nov 14, 2025 •

Copy link
Copy Markdown
Contributor

Fixes NIT-4069
(Temporary includes #3995)

Depends on:

Changes:

  • Implement multi-gas pricing constraints model
  • Modify AddToGasPool to accept multigas
  • Implement GasModelToUse to select a model depending on the configuration
  • Migrating gas constraints from single-dimensional to multi-dimensional model (open question)

@MishkaRogachev
MishkaRogachev force-pushed the add-multi-dimensional-multi-constraint-pricer-algorithm branch from a3cb346 to 5dc32f7 Compare November 17, 2025 10:00
@MishkaRogachev
MishkaRogachev force-pushed the add-multi-dimensional-multi-constraint-pricer-algorithm branch from 5dc32f7 to a7acb86 Compare November 17, 2025 11:21
@github-actions

github-actions Bot commented Nov 17, 2025 •

Copy link
Copy Markdown
Contributor

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
2183 2 2181 0
View the top 2 failed tests by shortest run time
TestVersion40
Stack Traces | 5.260s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
=== CONT  TestVersion40
    precompile_inclusion_test.go:94: goroutine 491853 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.4/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x40ec750, 0xc01eba5dc0}, {0x40a9e80, 0xc0fde49680}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc01eba5dc0, {0x40a9e80, 0xc0fde49680}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:1901 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc01eba5dc0, 0x28, {0xc04fb49df8, 0x5, 0x39?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:94 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion40(0xc01eba5dc0?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:71 +0x64b
        testing.tRunner(0xc01eba5dc0, 0x3d2e680)
        	/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x465
        
    precompile_inclusion_test.go:94: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
ERROR[12-04|15:33:39.133] Error pushing sync data from consensus to execution err="context canceled"
--- FAIL: TestVersion40 (5.26s)
TestOutOfGasInStorageCacheFlush
Stack Traces | 37.540s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.25.4/x64/src/runtime/debug/stack.go:26 +0x5e
        github.com/offchainlabs/nitro/util/testhelpers.RequireImpl({0x40ec750, 0xc0499a68c0}, {0x40a9a00, 0xc2687b0e60}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc0499a68c0, {0x40a9a00, 0xc2687b0e60}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:1901 +0x5d
        github.com/offchainlabs/nitro/system_tests.TestOutOfGasInStorageCacheFlush(0xc0499a68c0)
        	/home/runner/work/nitro/nitro/system_tests/program_test.go:2832 +0x1006
        testing.tRunner(0xc0499a68c0, 0x3d2e198)
        	/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x465
        
    program_test.go:2832: �[31;1m [] failed calculating position for validation: batch not found on L1 yet �[0;0m
�[90mposted new batch 92�[0;0m
INFO [12-04|15:35:16.440] HTTP server stopped                      endpoint=127.0.0.1:36803
TRACE[12-04|15:35:16.440] P2P networking is spinning down
--- FAIL: TestOutOfGasInStorageCacheFlush (37.54s)
�[90mkeccak: len 7.02K vs 18.02K�[0;0m
�[34;1mestimate: 21227�[0;0m

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

@MishkaRogachev
MishkaRogachev force-pushed the add-multi-dimensional-multi-constraint-pricer-algorithm branch 2 times, most recently from 454b599 to 28a7a5f Compare November 18, 2025 13:44
@MishkaRogachev
MishkaRogachev marked this pull request as ready for review November 19, 2025 15:04
@MishkaRogachev
MishkaRogachev force-pushed the add-multi-dimensional-multi-constraint-pricer-algorithm branch from fa8781a to 4f2c34e Compare November 21, 2025 12:04
@MishkaRogachev
MishkaRogachev force-pushed the add-multi-dimensional-multi-constraint-pricer-algorithm branch from 8ec77cd to 0611789 Compare November 21, 2025 14:03
@MishkaRogachev MishkaRogachev assigned gligneul and unassigned gligneul Nov 21, 2025
@MishkaRogachev
MishkaRogachev force-pushed the add-multi-dimensional-multi-constraint-pricer-algorithm branch 2 times, most recently from b14c464 to 46e002a Compare November 24, 2025 10:55
Comment thread arbos/constraints/multi_dimensional.go Outdated
Comment thread arbos/l2pricing/l2pricing.go Outdated
Comment thread arbos/l2pricing/l2pricing.go Outdated
Comment thread arbos/l2pricing/model.go Outdated
Comment thread arbos/l2pricing/model.go Outdated
@gligneul gligneul assigned MishkaRogachev and unassigned gligneul Nov 24, 2025
@MishkaRogachev
MishkaRogachev force-pushed the add-multi-dimensional-multi-constraint-pricer-algorithm branch 5 times, most recently from fd0e681 to 752c710 Compare November 26, 2025 15:43
@MishkaRogachev
MishkaRogachev force-pushed the add-multi-dimensional-multi-constraint-pricer-algorithm branch from f68c58c to 7b28238 Compare December 2, 2025 10:12
@MishkaRogachev
MishkaRogachev marked this pull request as draft December 2, 2025 12:10
@MishkaRogachev
MishkaRogachev force-pushed the add-multi-dimensional-multi-constraint-pricer-algorithm branch from 7b28238 to 5bd8abd Compare December 4, 2025 10:49
@MishkaRogachev
MishkaRogachev marked this pull request as ready for review December 4, 2025 10:53
@eljobe eljobe assigned MishkaRogachev and unassigned eljobe Dec 4, 2025
@eljobe
eljobe enabled auto-merge December 4, 2025 16:59
@eljobe
eljobe added this pull request to the merge queue Dec 4, 2025
Merged via the queue into master with commit 9d53231 Dec 4, 2025
25 checks passed
@eljobe
eljobe deleted the add-multi-dimensional-multi-constraint-pricer-algorithm branch December 4, 2025 17:34
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.

3 participants