-
Notifications
You must be signed in to change notification settings - Fork 10
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
Implement proof generation and verification #662
Merged
danlaine
merged 18 commits into
remove-shale-refactor-merkle
from
remove-shale-implement-proof
Jul 25, 2024
Merged
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
129a23e
first pass implementing proof
bdfaba1
appease clippy; remove unused error types
9f124d6
add randomized test; fix value digest creation bug
249a1ca
adhere to value_digest invariant
0583257
remove todo
c12a70f
genericize ValueDigest
beb704e
refactor value digest
4c2ac09
add to test
a3232f9
bound value digest value and hash to be AsRef<[u8]>
2eb810b
re-add Preimage trait; use associated type for Hashable
8a4ae63
constraint Hashable V and H to be bytes
db998d2
parameterize Preimage methods on borrowed self
2321356
remove associated type from ValueDigest
f6b73a1
address PR comments
0ab0bf3
use peekable to avoid indexing slice
e2b8b01
Merge branch 'remove-shale-refactor-merkle' into remove-shale-impleme…
2ccce36
nit change next_nibble signature
5dd9806
nit change is_prefix signature
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Removing this generic means each ProofNode can be of a different type, which isn't what we want I think. All ProofNodes within a proof should either be owned or borrowed (currently all of them are borrowed).
I'd rather see the generic here and have ProofNode use the type from it's parent.
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.
The generic is added back in https://github.com/ava-labs/firewood/pull/682/files. I could merge that PR into this one if you want.