Skip to content

Conversation

MishkaRogachev
Copy link
Contributor

@MishkaRogachev MishkaRogachev commented Oct 9, 2025

Closes NIT-3963, closes NIT-3978 and closes NIT-3488

Depends on:

Implemented:

  • Add weights to resource constraints with corresponding tests
  • RLP Encode/decode for resource constraints
  • Add resource constraints to arbos storage
  • Add ArbOwner precompiles for resource constraints
  • Add a system test for resource constraints precompiles

Copy link

github-actions bot commented Oct 9, 2025

❌ 7 Tests Failed:

Tests completed Failed Passed Skipped
2156 7 2149 0
View the top 3 failed tests by shortest run time
TestMultipleResourceConstraintsPrecompiles
Stack Traces | 0.820s run time
=== RUN   TestMultipleResourceConstraintsPrecompiles
DEBUG[10-15|15:00:12.143] Dereferenced trie from memory database   nodes=217 size=29.93KiB   time="225.513µs"  gcnodes=2015 gcsize=384.19KiB  gctime=1.661673ms  livenodes=0    livesize=0.00B
INFO [10-15|15:00:12.143] New Key                                  name=Owner         Address=0x26E554a8acF9003b83495c7f45F06edCB803d4e3
INFO [10-15|15:00:12.143] New Key                                  name=Faucet        Address=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A
WARN [10-15|15:00:12.143] Sequencer ReadFromTxQueueTimeout is higher than MaxBlockSpeed ReadFromTxQueueTimeout=1s MaxBlockSpeed=10ms
WARN [10-15|15:00:12.143] Sequencer ReadFromTxQueueTimeout is higher than MaxBlockSpeed ReadFromTxQueueTimeout=1s MaxBlockSpeed=10ms
=== PAUSE TestMultipleResourceConstraintsPrecompiles
=== CONT  TestMultipleResourceConstraintsPrecompiles
�[38;5;48;1myay!! we validated block 3 in 392.92ms�[0;0m
INFO [10-15|15:05:56.183] HTTP server stopped                      endpoint=127.0.0.1:38507
TRACE[10-15|15:05:56.183] P2P networking is spinning down
    resource_constraints_test.go:130: expected periodSecs=12 got 30
--- FAIL: TestMultipleResourceConstraintsPrecompiles (0.82s)
TestRedisProduceComplex/one_producer,_all_consumers_are_active
Stack Traces | 1.280s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
�[36mDEBUG�[0m[10-15|14:56:45.313] checkResponses                           �[36mresponded�[0m=50 �[36merrored�[0m=0 �[36mchecked�[0m=100
�[36mDEBUG�[0m[10-15|14:56:45.319] redis producer: check responses starting
�[36mDEBUG�[0m[10-15|14:56:45.364] checkResponses                           �[36mresponded�[0m=50 �[36merrored�[0m=0 �[36mchecked�[0m=50
�[31mERROR�[0m[10-15|14:56:45.369] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpenindlen�[0m=0
�[36mDEBUG�[0m[10-15|14:56:45.370] redis producer: check responses starting
�[36mDEBUG�[0m[10-15|14:56:45.370] checkResponses                           �[36mresponded�[0m=0  �[36merrored�[0m=0 �[36mchecked�[0m=0
�[31mERROR�[0m[10-15|14:56:45.372] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpenindlen�[0m=0
�[31mERROR�[0m[10-15|14:56:45.374] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpenindlen�[0m=0
�[36mDEBUG�[0m[10-15|14:56:45.375] redis producer: check responses starting
�[36mDEBUG�[0m[10-15|14:56:45.375] checkResponses                           �[36mresponded�[0m=0  �[36merrored�[0m=0 �[36mchecked�[0m=0
�[31mERROR�[0m[10-15|14:56:45.375] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpenindlen�[0m=0
�[31mERROR�[0m[10-15|14:56:45.378] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpenindlen�[0m=0
�[31mERROR�[0m[10-15|14:56:45.378] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpenindlen�[0m=0
�[31mERROR�[0m[10-15|14:56:45.379] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpenindlen�[0m=0
�[36mDEBUG�[0m[10-15|14:56:45.381] redis producer: check responses starting
�[36mDEBUG�[0m[10-15|14:56:45.381] checkResponses                           �[36mresponded�[0m=0  �[36merrored�[0m=0 �[36mchecked�[0m=0
�[31mERROR�[0m[10-15|14:56:45.381] Error from XpendingExt in getting PEL for auto claim �[31merr�[0m="context canceled" �[31mpenindlen�[0m=0
    pubsub_test.go:331: mergeMaps() unexpected error: duplicate key: 1760540204175-1
�[36mDEBUG�[0m[10-15|14:56:45.449] Error destroying a stream group          �[36merror�[0m="dial tcp 127.0.0.1:36463: connect: connection refused"
--- FAIL: TestRedisProduceComplex/one_producer,_all_consumers_are_active (1.28s)
TestValidationInputsAtWithWasmTarget
Stack Traces | 2.860s run time
=== RUN   TestValidationInputsAtWithWasmTarget
=== PAUSE TestValidationInputsAtWithWasmTarget
=== CONT  TestValidationInputsAtWithWasmTarget
    validation_inputs_at_test.go:70: goroutine 1490853 [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({0x408b3f0, 0xc074fc0a80}, {0x4049180, 0xc0a90e5980}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/util/testhelpers/testhelpers.go:29 +0x55
        github.com/offchainlabs/nitro/system_tests.Require(0xc074fc0a80, {0x4049180, 0xc0a90e5980}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:1723 +0x5d
        github.com/offchainlabs/nitro/system_tests.TestValidationInputsAtWithWasmTarget(0xc074fc0a80)
        	/home/runner/work/nitro/nitro/system_tests/validation_inputs_at_test.go:70 +0x970
        testing.tRunner(0xc074fc0a80, 0x3cd3168)
        	/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
        
    validation_inputs_at_test.go:70: �[31;1m [] failed calculating position for validation: batch not found on L1 yet �[0;0m
--- FAIL: TestValidationInputsAtWithWasmTarget (2.86s)

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

@MishkaRogachev MishkaRogachev force-pushed the add-resource-constraints-to-arbos-storage branch from 5d85d4f to 534792d Compare October 10, 2025 11:03

// Load decodes ResourceConstraints from storage using RLP.
// If storage is empty, returns an empty ResourceConstraints.
func (src *StorageResourceConstraints) Load() (*ResourceConstraints, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should add a field with a version number, in case we want to change this in the future.

@MishkaRogachev MishkaRogachev changed the title Add resource constraints to arbos storage Add resource constraints to arbos storage and ArbOwner precompiles for resource constraints Oct 10, 2025
@MishkaRogachev MishkaRogachev force-pushed the add-resource-constraints-to-arbos-storage branch from 89cca35 to dfaec7c Compare October 13, 2025 09:36
@MishkaRogachev MishkaRogachev force-pushed the add-resource-constraints-to-arbos-storage branch from dfaec7c to 11dc0da Compare October 14, 2025 12:45
@MishkaRogachev MishkaRogachev changed the title Add resource constraints to arbos storage and ArbOwner precompiles for resource constraints Add resource constraints to arbos storage and precompiles for resource constraints Oct 14, 2025
@MishkaRogachev MishkaRogachev force-pushed the add-resource-constraints-to-arbos-storage branch 2 times, most recently from 7fe4a4d to 83e865f Compare October 14, 2025 17:13
@MishkaRogachev MishkaRogachev force-pushed the add-resource-constraints-to-arbos-storage branch from 53edd6f to e1d876d Compare October 15, 2025 11:46
@MishkaRogachev MishkaRogachev force-pushed the add-resource-constraints-to-arbos-storage branch from e1d876d to e2bfb52 Compare October 15, 2025 12:15
@MishkaRogachev MishkaRogachev marked this pull request as ready for review October 15, 2025 14:51
@MishkaRogachev MishkaRogachev requested a review from eljobe October 15, 2025 15:32
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