We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey! I've been with the ark-poly-commit library. And I have my Error enum where inside I have an ArkPolyCommit error variant.
ark-poly-commit
Error
ArkPolyCommit
The issue is that seems I can't do:
pub fn universal_setup<R: RngCore>( max_degree: usize, rng: &mut R, ) -> Result<UniversalSRS<F, PC>, MyError> { PC::setup(max_degree, None, rng) .map_err(|err| ark_poly_commit::Error::from)? }
Nor
pub fn universal_setup<R: RngCore>( max_degree: usize, rng: &mut R, ) -> Result<UniversalSRS<F, PC>, MyError> { PC::setup(max_degree, None, rng)? }
And I have the From<ark-poly-commit-error> for MyError ofc.
From<ark-poly-commit-error> for MyError
The issue I see is that PolynomialCommitment has an associated Error type. And although the associated trait bounds seem correct. I can't make it work as requires me to add generics in all my errors where this should not be necessary. See: https://github.com/arkworks-rs/poly-commit/blob/master/src/lib.rs#L174
PolynomialCommitment
Wondering how does people sort this out without ugly solutions like https://github.com/ZK-Garage/plonk/blob/master/plonk-core/src/error.rs#L96-L107.
Ideally, can't we remove the Error type from the trait and just leave the regular error? This would make integration within enums much easier.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey!
I've been with the
ark-poly-commit
library.And I have my
Error
enum where inside I have anArkPolyCommit
error variant.The issue is that seems I can't do:
Nor
And I have the
From<ark-poly-commit-error> for MyError
ofc.The issue I see is that
PolynomialCommitment
has an associated Error type. And although the associated trait bounds seem correct. I can't make it work as requires me to add generics in all my errors where this should not be necessary.See: https://github.com/arkworks-rs/poly-commit/blob/master/src/lib.rs#L174
Wondering how does people sort this out without ugly solutions like https://github.com/ZK-Garage/plonk/blob/master/plonk-core/src/error.rs#L96-L107.
Ideally, can't we remove the
Error
type from the trait and just leave the regular error? This would make integration within enums much easier.The text was updated successfully, but these errors were encountered: