plonk icon indicating copy to clipboard operation
plonk copied to clipboard

Error handling for InvalidEvalDomain improvement

Open CPerezz opened this issue 3 years ago • 1 comments

We should do something like:

.ok_or(Error::InvalidEvalDomainSize {
                log_size_of_group: plonk_verifier_key.n.trailing_zeros(),
                adacity: <F as FftField>::FftParams::TWO_ADACITY,
            })?

instead of unwrap() but I'm having some issues implementing this. I could just remove the parameters from InvalidEvalDomainSize or something quick, or leave it as unwrap and open another issue/PR for this case (since it's rather independent)

Originally posted by @joebebel in https://github.com/ZK-Garage/plonk/pull/61#discussion_r781776889

CPerezz avatar Jan 11 '22 09:01 CPerezz

I eventually added some workaround, but I think it could use some additional work. Maybe the GeneralEvaluationDomain can be constructed in one place instead of the several places it is now.

Also it might be better if GeneralEvaluationDomain::new returns a Result instead of an Option, not sure about that.

joebebel avatar Jan 11 '22 10:01 joebebel