state: Don't create state entries for precompiles in access_account#1606
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1606 +/- ##
=======================================
Coverage 97.41% 97.41%
=======================================
Files 164 164
Lines 14720 14730 +10
Branches 3391 3394 +3
=======================================
+ Hits 14339 14349 +10
Misses 280 280
Partials 101 101
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
chfast
force-pushed
the
state/access-precompile-warm
branch
4 times, most recently
from
July 22, 2026 16:32
d7b86d4 to
e611d99
Compare
There was a problem hiding this comment.
Pull request overview
This PR optimizes access-list warming behavior around precompiles by avoiding state mutations for precompile addresses (which are warm by definition) and by skipping access-list storage-key warming for precompiles.
Changes:
- Update
Host::access_account()to avoid inserting state entries for precompiles and to split the logic into find/precompile/insert paths. - Skip applying access-list storage-key warming for precompile addresses during state transition.
- Add a unit test covering an access list that targets a precompile with storage keys (ensuring intrinsic gas accounting remains correct).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/unittests/state_transition_tx_test.cpp | Adds a regression test for access lists that include a precompile plus storage keys. |
| test/state/state.cpp | Skips access-list storage warming for precompile addresses during transition. |
| test/state/host.cpp | Avoids creating state entries for precompiles in access_account() (precompiles treated as warm by default). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chfast
force-pushed
the
state/access-precompile-warm
branch
2 times, most recently
from
July 22, 2026 19:11
35954b6 to
61dc0f0
Compare
Don't insert new nodes to State just to mark a precompile as warm (they are warm by default). We also split access_account() into find-precompile-insert. This is double lookup in the worst case but overall performs better on Mainnet. We also ignore storage entries in access list targeting precompiles.
chfast
force-pushed
the
state/access-precompile-warm
branch
from
July 22, 2026 20:05
61dc0f0 to
3a750c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Don't insert new nodes to State just to mark a precompile as warm
(they are warm by default).
We also split access_account() into find-precompile-insert.
This is double lookup in the worst case but overall performs better
on Mainnet.
We also ignore storage entries in access list targeting precompiles.