Skip to content

Split resource kind storage access#4504

Merged
MishkaRogachev merged 8 commits intomasterfrom
split-resource-kind-storage-access
Mar 18, 2026
Merged

Split resource kind storage access#4504
MishkaRogachev merged 8 commits intomasterfrom
split-resource-kind-storage-access

Conversation

@MishkaRogachev
Copy link
Copy Markdown
Contributor

@MishkaRogachev MishkaRogachev commented Mar 13, 2026

Close NIT-4654
Pulls in OffchainLabs/go-ethereum#636
Pulls in OffchainLabs/nitro-precompile-interfaces#35
Pulls in OffchainLabs/nitro-testnode#182 (which pulls in OffchainLabs/blockscout#209)

  • Split ResourceKindStorageAccess into ResourceKindStorageAccessRead and ResourceKindStorageAccessWrite
    across nitro codebase to match geth-side split
  • Reads: storage.Get, GetCodeHash, StorageSlot.Get, ArbInfo.GetCode, program cache loading
  • Writes: storage.Set, StorageSlot.Set, ArbRetryableTx.Redeem/Keepalive, ArbNativeTokenManager.Mint/Burn
  • Updated l2pricing constraints, simulator defaults, and all tests for the new 9th dimension

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 20.00000% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.77%. Comparing base (ef87792) to head (c855d4e).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4504      +/-   ##
==========================================
- Coverage   34.54%   32.77%   -1.78%     
==========================================
  Files         497      497              
  Lines       58813    58816       +3     
==========================================
- Hits        20318    19277    -1041     
- Misses      34887    36138    +1251     
+ Partials     3608     3401     -207     

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 13, 2026

❌ 8 Tests Failed:

Tests completed Failed Passed Skipped
4468 8 4460 0
View the top 3 failed tests by shortest run time
TestVersion30
Stack Traces | 8.740s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
        github.com/offchainlabs/nitro/system_tests.Require(0xc0a1efc000, {0x40fcb00, 0xc13dcff290}, {0x0, 0x0, 0x0})
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:2086 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc0a1efc000, 0x1e, {0xc0c19e7db0, 0x6, 0x3?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:94 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion30(0xc0a1efc000?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:67 +0x798
        testing.tRunner(0xc0a1efc000, 0x3d706b8)
        	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1997 +0x465
        
    precompile_inclusion_test.go:94: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
INFO [03-18|12:07:40.049] Writing cached state to disk             block=1   hash=73da48..7ca000 root=8448b4..050cee
INFO [03-18|12:07:40.049] Persisted trie from memory database      nodes=20   flushnodes=0 size=3.26KiB   flushsize=0.00B time="109.573µs"  flushtime=0s gcnodes=0 gcsize=0.00B gctime="1.793µs"  livenodes=0    livesize=0.00B
INFO [03-18|12:07:40.049] Writing cached state to disk             block=1   hash=73da48..7ca000 root=8448b4..050cee
INFO [03-18|12:07:40.049] Persisted trie from memory database      nodes=0    flushnodes=0 size=0.00B     flushsize=0.00B time=982ns        flushtime=0s gcnodes=0 gcsize=0.00B gctime=0s         livenodes=0    livesize=0.00B
INFO [03-18|12:07:40.049] Writing snapshot state to disk           root=6b754c..7398ca
INFO [03-18|12:07:40.049] Persisted trie from memory database      nodes=0    flushnodes=0 size=0.00B     flushsize=0.00B time="29.504µs"   flushtime=0s gcnodes=0 gcsize=0.00B gctime=0s         livenodes=0    livesize=0.00B
INFO [03-18|12:07:40.049] Blockchain stopped
--- FAIL: TestVersion30 (8.74s)
TestSequencerInboxReader
Stack Traces | 8.920s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
DEBUG[03-18|12:03:24.386] Journaled pathdb diff layer              root=7d5f05..8cc1dd parent=8dda95..8a21dc id=93                 block=92
DEBUG[03-18|12:03:24.387] Journaled pathdb diff layer              root=287cad..51efcb parent=7d5f05..8cc1dd id=94                 block=93
DEBUG[03-18|12:03:24.387] Journaled pathdb diff layer              root=a5352c..ce0a02 parent=287cad..51efcb id=95                 block=94
DEBUG[03-18|12:03:24.387] Journaled pathdb diff layer              root=f37f52..0cc416 parent=a5352c..ce0a02 id=96                 block=95
DEBUG[03-18|12:03:24.387] Journaled pathdb diff layer              root=571035..de11bd parent=f37f52..0cc416 id=97                 block=96
DEBUG[03-18|12:03:24.387] Journaled pathdb diff layer              root=53548d..9e1ee7 parent=571035..de11bd id=98                 block=97
DEBUG[03-18|12:03:24.387] Journaled pathdb diff layer              root=726c93..bacd75 parent=53548d..9e1ee7 id=99                 block=98
DEBUG[03-18|12:03:24.387] Journaled pathdb diff layer              root=c95546..0e40e1 parent=726c93..bacd75 id=100                block=99
DEBUG[03-18|12:03:24.387] Journaled pathdb diff layer              root=f52d7a..db81a0 parent=c95546..0e40e1 id=101                block=100
DEBUG[03-18|12:03:24.387] Journaled pathdb diff layer              root=5dd00c..de922f parent=f52d7a..db81a0 id=102                block=101
DEBUG[03-18|12:03:24.387] Journaled pathdb diff layer              root=f6a0ed..9fa87d parent=5dd00c..de922f id=103                block=102
DEBUG[03-18|12:03:24.387] Journaled pathdb diff layer              root=b5d10c..bb8b25 parent=f6a0ed..9fa87d id=104                block=103
DEBUG[03-18|12:03:24.388] Journaled pathdb diff layer              root=8ab686..b4fd93 parent=b5d10c..bb8b25 id=105                block=104
DEBUG[03-18|12:03:24.388] Journaled pathdb diff layer              root=251970..dea24e parent=8ab686..b4fd93 id=106                block=105
DEBUG[03-18|12:03:24.388] Journaled pathdb diff layer              root=0fae43..61bd37 parent=251970..dea24e id=107                block=106
DEBUG[03-18|12:03:24.388] Journaled pathdb diff layer              root=c0e43d..df1123 parent=0fae43..61bd37 id=108                block=107
INFO [03-18|12:03:24.388] Persisted dirty state to disk            size=492.01KiB elapsed=11.457ms
INFO [03-18|12:03:24.389] Blockchain stopped
TRACE[03-18|12:03:24.389] P2P networking is spinning down
--- FAIL: TestSequencerInboxReader (8.92s)
TestVersion40
Stack Traces | 8.950s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
        	/home/runner/work/nitro/nitro/system_tests/common_test.go:2086 +0x5d
        github.com/offchainlabs/nitro/system_tests.testPrecompiles(0xc0a1efc1c0, 0x28, {0xc0c7f1fdf8, 0x5, 0x39?})
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:94 +0x371
        github.com/offchainlabs/nitro/system_tests.TestVersion40(0xc0a1efc1c0?)
        	/home/runner/work/nitro/nitro/system_tests/precompile_inclusion_test.go:71 +0x64b
        testing.tRunner(0xc0a1efc1c0, 0x3d706c0)
        	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1934 +0xea
        created by testing.(*T).Run in goroutine 1
        	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1997 +0x465
        
    precompile_inclusion_test.go:94: �[31;1m [] execution aborted (timeout = 5s) �[0;0m
INFO [03-18|12:07:40.047] Writing cached state to disk             block=1   hash=c06e59..4c6ea6 root=d45d64..4e7811
INFO [03-18|12:07:40.047] Persisted trie from memory database      nodes=23   flushnodes=0 size=3.61KiB   flushsize=0.00B time="122.587µs"  flushtime=0s gcnodes=0 gcsize=0.00B gctime="1.593µs"  livenodes=0    livesize=0.00B
INFO [03-18|12:07:40.047] Writing cached state to disk             block=1   hash=c06e59..4c6ea6 root=d45d64..4e7811
INFO [03-18|12:07:40.047] Persisted trie from memory database      nodes=0    flushnodes=0 size=0.00B     flushsize=0.00B time=781ns        flushtime=0s gcnodes=0 gcsize=0.00B gctime=0s         livenodes=0    livesize=0.00B
INFO [03-18|12:07:40.047] Writing snapshot state to disk           root=28fb26..40a768
INFO [03-18|12:07:40.047] Persisted trie from memory database      nodes=0    flushnodes=0 size=0.00B     flushsize=0.00B time=421ns        flushtime=0s gcnodes=0 gcsize=0.00B gctime=0s         livenodes=0    livesize=0.00B
INFO [03-18|12:07:40.048] Blockchain stopped
WARN [03-18|12:07:40.048] Served eth_call                          reqid=12    duration=8.650240866s  err="execution aborted (timeout = 5s)"
--- FAIL: TestVersion40 (8.95s)

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

@MishkaRogachev MishkaRogachev marked this pull request as ready for review March 13, 2026 13:29
@gligneul gligneul assigned MishkaRogachev and unassigned gligneul Mar 13, 2026
@gligneul
Copy link
Copy Markdown
Contributor

Conflicts here as well.

gligneul
gligneul previously approved these changes Mar 13, 2026
gligneul
gligneul previously approved these changes Mar 16, 2026
Copy link
Copy Markdown
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.

Can you also update: docs/decisions/0002-multi-dimensional-gas-metering.md to have the new, correct list of resource types?

t.Errorf("unexpected storage-growth exponent: got %v, want %v", got, want)
}

// All other kinds should be zero
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should also check that StorageAccessWrite is 0, right?

eljobe
eljobe previously approved these changes Mar 17, 2026
@MishkaRogachev MishkaRogachev added this pull request to the merge queue Mar 18, 2026
Merged via the queue into master with commit 162fb08 Mar 18, 2026
53 of 57 checks passed
@MishkaRogachev MishkaRogachev deleted the split-resource-kind-storage-access branch March 18, 2026 14:35
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