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

Introduce HashedPostStateProvider #11872

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

frisitano
Copy link
Contributor

@frisitano frisitano commented Oct 18, 2024

Dependencies

This PR builds on #11867 and should be reviewed after #11867 is merged.

Overview

This PR introduces the HashedPostStateProvider trait, adds it toStateProvider super trait, and implements it on StateProvider objects and parent objects. This allows for HashedPostState to be instantiated using the StateCommitment::KeyHasher type available in the providers via the following methods which have had the KH: KeyHasher generic added:

HashedPostState::from_bundle_state<'a, KH: KeyHasher>(state: impl IntoParallelIterator<Item = (&'a Address, &'a BundleAccount)>) -> Self;
HashedPostState::from_cache_state<'a, KH: KeyHasher>(state: impl IntoParallelIterator<Item = (&'a Address, &'a CacheAccount)>,) -> Self

supports: #11830

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 this pull request may close these issues.

1 participant