Skip to content

Conversation

MishkaRogachev
Copy link
Contributor

@MishkaRogachev MishkaRogachev commented Oct 16, 2025

Fixes NIT-4021
Depends on OffchainLabs/nitro-precompile-interfaces#19

  • Update contracts-local/src on "Add precompile interfaces for Multi-Constraint Pricer"
  • Implement Multi-Constraint Pricer precompiles
  • Add precompiles unit test for constraints management

Copy link

github-actions bot commented Oct 16, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
2146 2 2144 0
View the top 2 failed tests by shortest run time
TestVersion30
Stack Traces | 17.170s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
    precompile_inclusion_test.go:90: goroutine 454977 [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({0x4086470, 0xc08a057340}, {0x40446a0, 0xc144e52810}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc08a057340, {0x40446a0, 0xc144e52810}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:1723 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc08a057340, 0x1e, {0xc049c43db0, 0x6, 0x3?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:90 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion30(0xc08a057340?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:67 +0x798
        testing.tRunner(0xc08a057340, 0x3cce5f8)
        	/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
INFO [10-17|18:40:54.980] HTTP server stopped                      endpoint=127.0.0.1:42761
TRACE[10-17|18:40:54.980] P2P networking is spinning down
--- FAIL: TestVersion30 (17.17s)
TestEthSyncing
Stack Traces | 24.030s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
DEBUG[10-17|18:34:13.931] Served eth_call                          reqid=288  duration="312.976µs"
TRACE[10-17|18:34:13.931] Handled RPC response                     reqid=288  duration="2.584µs"
TRACE[10-17|18:34:13.931] Handled RPC response                     reqid=1964 duration="2.234µs"
TRACE[10-17|18:34:13.931] Handled RPC response                     reqid=1966 duration="7.423µs"
INFO [10-17|18:34:13.931] Starting work on payload                 id=0x03e59c7c1c5179b3
TRACE[10-17|18:34:13.931] Engine API request received              method=GetPayload                    id=0x03e59c7c1c5179b3
DEBUG[10-17|18:34:13.932] Executing EVM call finished              runtime="376.284µs"
DEBUG[10-17|18:34:13.932] Served eth_getBlockByNumber              reqid=1101 duration="106.82µs"
DEBUG[10-17|18:34:13.932] Executing EVM call finished              runtime="364.363µs"
DEBUG[10-17|18:34:13.932] Served eth_call                          reqid=1967 duration="413.875µs"
TRACE[10-17|18:34:13.932] Handled RPC response                     reqid=1967 duration="2.445µs"
TRACE[10-17|18:34:13.932] Handled RPC response                     reqid=1101 duration=842ns
DEBUG[10-17|18:34:13.932] Served eth_call                          reqid=289  duration="446.045µs"
TRACE[10-17|18:34:13.932] Handled RPC response                     reqid=289  duration="2.634µs"
DEBUG[10-17|18:34:13.932] Served eth_getBlockByNumber              reqid=1031 duration="95.83µs"
DEBUG[10-17|18:34:13.932] Served eth_getBlockByNumber              reqid=92   duration="104.897µs"
DEBUG[10-17|18:34:13.932] Served eth_getBlockByNumber              reqid=988  duration="119.925µs"
TRACE[10-17|18:34:13.932] Handled RPC response                     reqid=1031 duration="2.445µs"
TRACE[10-17|18:34:13.932] Handled RPC response                     reqid=92   duration="1.884µs"
--- FAIL: TestEthSyncing (24.03s)

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

@MishkaRogachev MishkaRogachev force-pushed the add-precompiles-for-multi-constraint-pricer branch 2 times, most recently from 6ab7990 to 60168e0 Compare October 17, 2025 18:11
@MishkaRogachev MishkaRogachev changed the title Add precompiles for Multi-Constraint Pricer (stubs) Add precompiles for Multi-Constraint Pricer Oct 17, 2025
@MishkaRogachev MishkaRogachev force-pushed the add-precompiles-for-multi-constraint-pricer branch from 60168e0 to 708fcd3 Compare October 17, 2025 18:19
@MishkaRogachev MishkaRogachev marked this pull request as ready for review October 17, 2025 18:19
// contracts should be counted.
expectedNewEntriesPerArbosVersion := map[uint64]int{
0: 99,
0: 101,
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add those two precompiles to ArbosVersion_50. See https://github.com/OffchainLabs/nitro/blob/708fcd36ca/precompiles/precompile.go#L537

@gligneul gligneul assigned MishkaRogachev and unassigned gligneul Oct 17, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

About GetGasAccountingParams being deprecated, I think this makes sense, but we should also create another method that returns just the block gas limit. This is not used directly by the L2 gas pricing model, but it is used in other places, so it is a good opportunity to clean this up. See #3545

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