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

solana-trie: add support for witness account #387

Merged
merged 4 commits into from
Sep 5, 2024
Merged

solana-trie: add support for witness account #387

merged 4 commits into from
Sep 5, 2024

Conversation

mina86
Copy link
Collaborator

@mina86 mina86 commented Sep 1, 2024

This should be reviewed individually on commit level. I intend to rebase it rather than squashing.

@mina86 mina86 requested a review from dhruvja September 1, 2024 21:58
@mina86 mina86 force-pushed the mpn/e branch 3 times, most recently from c519bb9 to 6143565 Compare September 2, 2024 13:46
To help with bytemuck use of CryptoHash, make it Copy, Pod and Zeroable.

Most of the changes in this comit are made with `cargo clippy --fix`.
The only manual part is addition of Copy, bytemuck::Pod and
bytemuck::Zeroable derives to CryptoHash in common/lib/src/hash.rs.
Replace types::Hash type with lib::hash::CryptoHash.  Turns out, lack
of conversion between it and solana_program’s Hash types isn’t a big
deal at all.  And with CryptoHash now being bytemuck::Pod and Zeroable
there’s no longer need for this custom type.  Replace its uses with
CryptoHash.
Witness of the trie is an account which stores the trie’s hash.  Using
Solana’s account delta hash this allows us to construct a proof of the
root.
@mina86 mina86 merged commit 298e4bb into master Sep 5, 2024
4 checks passed
@mina86 mina86 deleted the mpn/e branch September 5, 2024 16:16
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.

2 participants