-
Notifications
You must be signed in to change notification settings - Fork 992
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
Removed MerkleValue type #846
Conversation
Yeah, this is a thorn in my side I would be happy to remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs fmt/clippy for new rust (note to myself)
shared/src/ledger/storage/mod.rs
Outdated
@@ -625,7 +625,7 @@ where | |||
pub fn get_existence_proof( | |||
&self, | |||
key: &Key, | |||
value: MerkleValue, | |||
value: Vec<u8>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not &[u8]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure thing
i think test-wasm was broken by me, ignore for now |
pls update wasm |
- remove `MerkleValue` from storage/mod moved to core crate * bat/remove-merkle-values: [fix]: Changed Vec<u8> to &[u8] for getting merkle proofs [feat]: Removed MerkleValue type
* bat/remove-merkle-values: changelog: add #846 [fix]: Changed Vec<u8> to &[u8] for getting merkle proofs [feat]: Removed MerkleValue type
The design of the merkle tree is that each subtree should handle it's own particulars and the top level storage should be unaware of these details. The MerkleValue type violated this principal by requiring top level storage to correctly cast values to the right type which would then be checked by the sub-trees. This caused bugs and made strained the storage API. This PR removes this type.