-
Notifications
You must be signed in to change notification settings - Fork 80
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
refactor!: generalize ProverEvaluate::result_evaluate
and final_round_evaluate
to multiple tables
#272
Conversation
035e77e
to
48bfbe1
Compare
48bfbe1
to
a9b9aa8
Compare
alloc: &'a Bump, | ||
_accessor: &'a dyn DataAccessor<C::Scalar>, | ||
) -> Column<'a, C::Scalar> { | ||
let table_length = builder.table_length(); |
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.
Should we remove FinalRoundBuilder::table_length
since it no longer should be used?
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.
Yes. That's overdue. In fact we really need to have one FinalRoundBuilder
per ProofPlan
.
builder: &mut FinalRoundBuilder<'a, C::Scalar>, | ||
_alloc: &'a Bump, | ||
accessor: &'a dyn DataAccessor<C::Scalar>, | ||
) -> Column<'a, C::Scalar> { | ||
let column = accessor.get_column(self.column_ref); | ||
assert!(column.len() == table_length); |
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.
What guarantees this always occurs? Please add a comment explaining why this is safe.
NIT:
assert!(column.len() == table_length); | |
assert_eq!(column.len(), table_length); |
@@ -57,11 +57,11 @@ impl<C: Commitment> ProofExpr<C> for LiteralExpr<C::Scalar> { | |||
#[tracing::instrument(name = "LiteralExpr::prover_evaluate", level = "debug", skip_all)] | |||
fn prover_evaluate<'a>( | |||
&self, | |||
builder: &mut FinalRoundBuilder<'a, C::Scalar>, | |||
table_length: usize, |
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.
builder.mle_evaluations.input_one_evaluation
in verifier_evaluate
also depends on table length, so we should handle that with this change as well.
a9b9aa8
to
992adc2
Compare
…und_evaluate` to multiple tables - add `table_length` to `ProofExpr::prover_evaluate` - generalize `ProverEvaluate::result_evaluate` - generalize `ProverEvaluate::final_round_evaluate`
992adc2
to
c76910a
Compare
Closed in favor of #334 |
Please be sure to look over the pull request guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md#submit-pr.
Please go through the following checklist
!
is used if and only if at least one breaking change has been introduced.source scripts/run_ci_checks.sh
.Rationale for this change
In order to complete #121 and #122 we need to allow
ProofPlan
composition and multiple table support. In particular we have to allowProofExpr::prover_evaluate
to accepttable_length
s that are not identical toproof_builder.table_length
due toProofPlan
composition. This is the latest PR for this.What changes are included in this PR?
table_length
toProofExpr::prover_evaluate
.ProverEvaluate::result_evaluate
.ProverEvaluate::final_round_evaluate
.Are these changes tested?
Existing tests should pass.