-
Notifications
You must be signed in to change notification settings - Fork 106
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
revert!: deprecate VDF crate #683
Conversation
vdf/src/hashchain.rs
Outdated
fn setup<R: ark_std::rand::CryptoRng + ark_std::rand::RngCore>( | ||
difficulty: u64, | ||
prng: Option<&mut R>, | ||
) -> Result<Self::PublicParameter, VDFError> { |
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.
Is it possible to make setup
and eval
infallible (not return a Result
)? It looks like they can't fail in either implementation
not really a big deal: we can of course always handle the failure in HotShot
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.
I prefer to keep it. Error may occur when we are implementing Verifiable DF.
vdf/src/hashchain.rs
Outdated
) -> Result<(Self::Output, Self::Proof), VDFError> { | ||
let mut output = *input; | ||
for _ in 0..pp.difficulty { | ||
output = sha3::Keccak256::digest(&input).into(); |
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.
maybe I'm not reading this right, but should this be digest(&output)
?
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.
stupid me! fixed in ffc603b
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.
- why are we keeping the minroot? afaik, no one, not even ourselves, is using it
- why sh3 hashchain? is it being used or planned anywhere?
No particular reason. Maybe we'll comeback to it sometime later (very not likely)
I just picked a random hash function. Do you have other suggestions or would you prefer a somewhat generic implementation cc @ss-es |
i suggest we completely remove this. it's confusing already when we call it on the other hand, if we only need a delay function, do we really need to incorporate in jellyfish? a trivial hashchain implemented downstream to start with seems like a fine solution. |
That's a good idea. Since we don't have verification anyway and it's simple enough. Shall we just completely remove this vdf crate? |
I'd agree. |
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.
I agree with the removal.
closes: #649
This PR:
Deprecates the VDF crate because the original implemented MinRoot is insecure. Also we didn't and won't implement the verification part.
This PR does not:
Key places to review:
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
CHANGELOG.md
of touched crates.Files changed
in the GitHub PR explorer