-
Notifications
You must be signed in to change notification settings - Fork 4
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
Some security relevant comments #85
Conversation
@ZenGround0 But where are we changing the value to 150 ? Shouldn't this PR also change the deployment scripts to change it to 150 instead of 1 ? |
src/PDPVerifier.sol
Outdated
// and forking attacks are unrelated to biasability, hence challengeFinality = 1 is a safe value. | ||
// Given a small enough challengeFinality an SP can run several trials of challenge sampling and | ||
// fork around samples that don't suit them, grinding the challenge randomness. | ||
// For the filecoin L1, a safe value is 150. |
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.
// We are setting here this value at 150, as in the Filecoin L1 (epochs between PreCommit and ProveCommit for interactive PoRep Sectors)
// This deviation is bounded by leafCount / 2^256 given a 256 bit hash | ||
// Assuming a 1000EiB = 1 ZiB network size ~ 2^70 bytes of data or 2^65 leaves | ||
// This deviation is bounded by 2^65 / 2^256 = 2^-191 which is negligible. | ||
// If modifying this code to use a hash function with smaller output size |
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'd add a comment on which is the "standard solution" (i.e. rejection sampling). Best would be to have a quick note on why we are not implementing it
Yes good point |
@irenegia @lucaniz I think there were some more comments of this sort you wanted to include, could you refresh my memory ?
Closes #81