-
Notifications
You must be signed in to change notification settings - Fork 94
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
Expr.rs can be parametrized by challenge #2566
Conversation
8c2afd1
to
5568762
Compare
Note: it is related to the issue: MinaProtocol/mina#15287 |
And #2556 |
// TODO generalize with generic Column/challengeterm | ||
// We need to create a trait for berkeley_columns::Environment | ||
impl<F> ExprOps<F, BerkeleyChallengeTerm> | ||
for Expr<ConstantExpr<F, BerkeleyChallengeTerm>, berkeley_columns::Column> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Methods seem to be specific to Berkeley, for now. I would use BerkeleyExpr
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to keep it, we can simply implement it generically above, around line 1838.
@@ -3152,13 +3258,13 @@ pub mod constraints { | |||
/// This trait defines a common arithmetic operations interface | |||
/// that can be used by constraints. It allows us to reuse | |||
/// constraint code for witness computation. | |||
pub trait ExprOps<F>: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would simply rename this in BerkeleyExprOps, no? I do not understand the goal of the existing aliases also. Not sure if it is very useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. It is used for Keccak and FF arithmetic in Kimchi. I would definitely specialized it only for Berkeley for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want to have a general interface which exposes the basic constraints ?
5568762
to
49453bd
Compare
The expression Framework harcoded the plonk + plookup challenges.
This MR allows an expression to be parametrised by different challenges.
The old harcoded challenges are renamed BerkeleyChallenges/BerkeleyChallengterm, and are used in pre-existing code.
This MR is usefull for Arriabatta, to add the folding challenge in expressions.