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

refactor!: move table_length to FirstRoundBuilder #380

Merged
merged 3 commits into from
Nov 22, 2024
Merged

Conversation

iajoiner
Copy link
Contributor

@iajoiner iajoiner commented Nov 19, 2024

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

Rationale for this change

Currently there are still places where FinalRoundBuilder::table_length is used in ProofExpr which is wrong when we start composing ProofPlans. Moreover in cases where a ProofPlan causes its output table to be longer than any of the input tables (e.g. joins and unions) we need to bump the max_row_num.

What changes are included in this PR?

  • remove table_length from FinalRoundBuilder
  • add range_length to FirstRoundBuilder to track the max table length in a query (updates are NOT to be applied to any ProofPlan that can not cause its output table to have more rows than any of its inputs such as filter and projection)
  • update range_length after FirstRoundBuilder goes through the AST
  • store min_row_num and max_row_num in QueryProof for the verifier
  • remove FirstRoundBuilder from exclusively result_evaluate tests

Are these changes tested?

Existing tests should pass.

@iajoiner iajoiner marked this pull request as ready for review November 19, 2024 17:01
@iajoiner iajoiner force-pushed the refactor/table-len branch 3 times, most recently from 2d48032 to c9eff76 Compare November 19, 2024 19:06
@iajoiner iajoiner enabled auto-merge November 19, 2024 19:07
@iajoiner iajoiner merged commit 0d55303 into main Nov 22, 2024
11 checks passed
Copy link

🎉 This PR is included in version 0.49.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@iajoiner iajoiner deleted the refactor/table-len branch November 22, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants