-
Notifications
You must be signed in to change notification settings - Fork 2
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
Hash as input #137
base: main
Are you sure you want to change the base?
Hash as input #137
Conversation
c7f3f3d
to
d32faa8
Compare
/// Numbers of retries done to find the proof | ||
pub retry_counter: u64, | ||
/// Index of the searched subtree to find the proof | ||
pub search_counter: u64, | ||
/// Sequence of elements from prover's set | ||
pub element_sequence: Vec<Element>, | ||
// Phantom type to link the tree with its hasher | ||
hasher: PhantomData<H>, |
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.
Alternatively, you can remove generics from this type and only introduce generics to the relevant methods.
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.
This was done similarly to Mithril code base to keep a link between a proof and the underlying hash function.
Of course, in practice this is 0 byte but it keeps the code safe when compiling.
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.
LGTM
Content
This PR aims at updating protocols to support different hashes, input by the user.
Pre-submit checklist
Comments
I have kept Blake2bVar when generating data, but changed to Sha256 in tests, benches and examples as it is faster on my machine.
I also fixed some old Clippy warnings.
Issue(s)
Relates to #36