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

unwarp Results #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

unwarp Results #46

wants to merge 2 commits into from

Conversation

swasilyev
Copy link
Collaborator

As far as i remember, the only Err possible is if the polynomial being committed is inconsistent with the SRS (e.g. for the KZG case, the poly degree is >> the SRS size). So i find it reasonable just to unwrap the Errs.

@swasilyev swasilyev requested review from davxy and drskalman December 4, 2024 20:54
Copy link
Collaborator

@davxy davxy left a comment

Choose a reason for hiding this comment

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

As far as i remember, the only Err possible is if the polynomial being committed is inconsistent with the SRS (e.g. for the KZG case, the poly degree is >> the SRS size). So i find it reasonable just to unwrap the Errs.

Well, this is correct as far as the code assumes to know what PCS implementation the user decided to use. If he plugs a PCS that fails for other reasons that this unwrap may just panic.

IMHO it is also not ideal to return a Result from methods like PlonkProver::prove.
So maybe we can at least be explicit in the method docs that these methods panics if PCS::commit fails

@@ -11,5 +11,5 @@ ark-ff = { version = "0.5", default-features = false }
ark-ec = { version = "0.5", default-features = false }
ark-poly = { version = "0.5", default-features = false }
ark-serialize = { version = "0.5", default-features = false, features = ["derive"] }
fflonk = { git = "https://github.com/w3f/fflonk", default-features = false }
fflonk = { git = "https://github.com/w3f/fflonk", branch="return-result", default-features = false }
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess you can merge fflonk return-result branch already? So you don't need to target this branch here

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.

2 participants