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

Expr.rs can be parametrized by challenge #2566

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

marcbeunardeau88
Copy link
Contributor

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.

@marcbeunardeau88 marcbeunardeau88 force-pushed the marc@generic_challenges_expr branch 2 times, most recently from 8c2afd1 to 5568762 Compare September 18, 2024 07:53
@dannywillems
Copy link
Member

Note: it is related to the issue: MinaProtocol/mina#15287

@dannywillems
Copy link
Member

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>
Copy link
Member

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?

Copy link
Member

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>:
Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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 ?

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