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

ffiwrapper: Validate PC2 by calling C1 with random seeds #7710

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Nov 30, 2021

This lets lotus detect compute errors in PC1/PC2 early, before precomitting to sectors which can't be proven (and can't be recovered because the CommR on chain is bad)

Closes #7702

@magik6k magik6k requested a review from a team as a code owner November 30, 2021 00:35
@jennijuju jennijuju added this to the v1.13.2 milestone Nov 30, 2021
@jennijuju jennijuju added the P1 P1: Must be resolved label Nov 30, 2021
return nil, xerrors.Errorf("unmarshaling pc1 output: %w", err)
}

p1odec["_lotus_SealRandomness"] = ticket
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be a constant in this file or some such...also maybe rename it to indicate it's not real randomness, just for sanity-checking?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it is the real seal randomness (aka the ticket), we use this json thing to transport it into PC2 which doesn't have an easy way to get to it.

@magik6k magik6k merged commit 19e808f into master Nov 30, 2021
@magik6k magik6k deleted the feat/pc2-validation branch November 30, 2021 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 P1: Must be resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add checks after computing PC2
3 participants