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

Non-consuming conversion from BundleState to StateChangeset #1777

Closed
prestwich opened this issue Sep 16, 2024 · 0 comments · Fixed by #1778
Closed

Non-consuming conversion from BundleState to StateChangeset #1777

prestwich opened this issue Sep 16, 2024 · 0 comments · Fixed by #1778

Comments

@prestwich
Copy link
Contributor

prestwich commented Sep 16, 2024

Currently the API is pub fn into_plain_state(self, is_value_known: OriginalValuesKnown) -> StateChangeset. This means that reth DB interfaces must consume the bundlestate in order to write plain state to DB.

Given that all information in the BundleState is efficiently memcopy-able, we could make pub fn to_plain_state(&self, is_value_known: OriginalValuesKnown) -> StateChangeset with relatively little overhead (deref-and-copy instead of copy-to-stack-and-copy). This version would copy AccountInfo and rely on bytes::Bytes internal efficient Clone for contracts.

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 a pull request may close this issue.

1 participant