Skip to content
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

Merged
merged 3 commits into from
Dec 12, 2024
Merged

Some security relevant comments #85

merged 3 commits into from
Dec 12, 2024

Conversation

ZenGround0
Copy link
Contributor

@ZenGround0 ZenGround0 commented Dec 11, 2024

@irenegia @lucaniz I think there were some more comments of this sort you wanted to include, could you refresh my memory ?

Closes #81

@aarshkshah1992
Copy link
Collaborator

@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 ?

// 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.
Copy link

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
Copy link

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

@ZenGround0
Copy link
Contributor Author

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 ?

Yes good point

@ZenGround0 ZenGround0 merged commit 6a098c7 into main Dec 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change in challengeFinality (value and naming)
3 participants