Skip to content

Conversation

Peponks9
Copy link
Contributor

@Peponks9 Peponks9 commented Oct 9, 2025

Changes:

  • HashedPostStateSorted structures: updated HashedAccountsSorted and HashedStorageSortedto use a singleVec<(B256, Option<...>)>` for accounts/storage, with sorted vectors and lookup via binary search algo.
  • cursor refactors: modified HashedPostStateAccountCursor and HashedPostStateStorageCursor to iterate over the vectors, eliminating HashSet deps

Closes #18848

- Modify HashedPostStateAccountCursor and HashedPostStateStorageCursor to use the new sorted vectors.
- Replace HashSet lookups with binary search on sorted Vecs.
- Adjust seek_inner, next_inner, and helper methods for Option-based handling.
@mediocregopher
Copy link
Collaborator

Hey @Peponks9 , thanks for the PR. This doesn't quite do what the issue asks for, we are looking to get rid of the destroyed_accounts and zero_valued_slots fields completely. You can check out this PR #18479 which did basically exactly this but for trie updates; the changes required are going to be a mirror image of these more or less.

Copy link
Contributor Author

@Peponks9 Peponks9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

howdy @mediocregopher thanks for the feedback, will take a closer look at the pr and continue to work towards this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Use Vec<(B256, Option<...>)> in HashedPostStateCursors

2 participants