This repository was archived by the owner on Jan 8, 2025. It is now read-only.
feat: make access list (address, keys) member of the state, not the VM #704
Labels
enhancement
New feature or request
Feature Request
Describe the Feature Request
Access list transactions are a mechanism that intends to decrease overall transaction gas costs by supplying the set of accessed addresses and storage keys accessed during a transaction.
When a VM spawns a child for a create or a call operation, the access list of the child is instanciated with the values of the parent.
All newly accessed addresses in this child context are appended to its own access list - and upon merging the return of a child VM on success, we merge the newly accessed addresses in the parent VM.
From the description of this mechanism, we can deduce that a more logical place to put the access list is in the State. Indeed, before spawning a child VM, a snapshot of the state is taken - and if the execution of the child fails, we revert to this previous snapshot.
Describe Preferred Solution
Remove the
accessed_x
fields from the VM struct. Remove manual merge of the access lists.Add
accessed_addresses
andaccessed_storage_keys
to the State. Modify all places where they're called from the VM to be called from the state instead.Related Code
Additional Context
If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)
The text was updated successfully, but these errors were encountered: