Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make access list (address, keys) member of the state, not the VM #704

Open
2 tasks
enitrat opened this issue Jan 22, 2024 · 1 comment
Open
2 tasks
Labels
enhancement New feature or request

Comments

@enitrat
Copy link
Collaborator

enitrat commented Jan 22, 2024

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 and accessed_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)

  • Yes
  • No
@enitrat enitrat added enhancement New feature or request good first issue Good for newcomers labels Jan 22, 2024
@enitrat
Copy link
Collaborator Author

enitrat commented Jan 22, 2024

Locked until further notice (debating implementation internally)

@enitrat enitrat removed the good first issue Good for newcomers label Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🆕 Backlog
Development

No branches or pull requests

1 participant