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

accounts-db: snapshot utils + hash verification #47

Merged
merged 5 commits into from
Dec 1, 2023

Conversation

0xNineteen
Copy link
Contributor

build.zig

  • make it easy to add new executables with all the required modules

src/cmd/snapshot_utils.zig

  • snapshot utils for:
    • dumping the accounts_db.bincode from the full bank metadata (the full bank metadata is quite large, and we only need the accounts_db fields to correctly parse the append_vecs)
    • dump accounts found in append vec into a .csv format (TODO: current approach contains duplicate accounts + not most recent -- will likely need to merge logic with account hash verification which does this sorting)

src/cmd/snapshot_verify.zig

  • logic for verifying the account hash of a snapshot matches the metadata
  • TODO: is currently slow relative to rust-impl -- should be able to optimize it

src/common/merkle_tree.zig

  • simple merkle tree hash calculation

src/core/account.zig

  • logic for hashing account

@0xNineteen 0xNineteen changed the title 19/snapshot utils snapshot utils + hash verification Nov 29, 2023
@0xNineteen 0xNineteen changed the base branch from main to 19/appendvec-index November 29, 2023 16:00
@0xNineteen 0xNineteen changed the base branch from 19/appendvec-index to 19/snapshot-appendvec November 29, 2023 16:01
@0xNineteen 0xNineteen changed the title snapshot utils + hash verification accounts-db: snapshot utils + hash verification Nov 29, 2023
@0xNineteen 0xNineteen merged commit e4f9f2a into 19/snapshot-appendvec Dec 1, 2023
@0xNineteen 0xNineteen deleted the 19/snapshot-utils branch December 1, 2023 21:32
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