forked from spaceandtimelabs/sxt-proof-of-sql
-
Notifications
You must be signed in to change notification settings - Fork 0
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 posqltime #14
Open
varshith257
wants to merge
48
commits into
main
Choose a base branch
from
refactor-posqltime
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varshith257
force-pushed
the
refactor-posqltime
branch
2 times, most recently
from
January 4, 2025 11:52
b667064
to
eb75d22
Compare
varshith257
force-pushed
the
refactor-posqltime
branch
7 times, most recently
from
January 13, 2025 18:31
b9cd336
to
04a1c60
Compare
varshith257
force-pushed
the
refactor-posqltime
branch
3 times, most recently
from
January 14, 2025 02:23
7621c97
to
18a1d81
Compare
…ipt_bytes` (spaceandtimelabs#471) # Rationale for this change We will want to serialize commitments in a manner compatible with the transcript. This facilitates doing this without duplicating code. # What changes are included in this PR? `Commitment::append_to_transcript` is removed and `to_transcript_bytes` is added instead. Usage is replaced as well. # Are these changes tested? Yes.
# Rationale for this change The current mechanism for drawing a challenge is a bit opaque. This simplifies it. # What changes are included in this PR? When drawing a challenge from the transcript, it is 32 bytes long. Instead of using `[u64; 4]` to coerce it into a `Scalar`, it is more straightforward to simply drop the first few bits. This can be accomplished by masking the challenged by a `CHALLENGE_MASK` before converting to a `Scalar`. Additionally, this PR updates the `Scalar` implementations so that we have a blanket implementation of `impl<T> Scalar for MontScalar<T>`. This removes the need to manually figure out the constants for each Scalar type. # Are these changes tested? Yes.
spaceandtimelabs#476) # Rationale for this change The source of the data/commitments for referenced columns is different from final round mles. They are also handle very differently. So, they should be separated in the proof as well. # What changes are included in this PR? See rationale and title. # Are these changes tested? Yes, by existing tests.
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 - [x] The PR title and commit messages adhere to guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md. In particular `!` is used if and only if at least one breaking change has been introduced. - [x] I have run the ci check script with `source scripts/run_ci_checks.sh`. - The following upstream PRs have been reviewed and merged: - [x] spaceandtimelabs#417 # Rationale for this change The membership check gadget is a crucial component of joins. Hence we need to add it. <!-- Why are you proposing this change? If this is already explained clearly in the linked issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. Example: Add `NestedLoopJoinExec`. Closes spaceandtimelabs#345. Since we added `HashJoinExec` in spaceandtimelabs#323 it has been possible to do provable inner joins. However performance is not satisfactory in some cases. Hence we need to fix the problem by implement `NestedLoopJoinExec` and speed up the code for `HashJoinExec`. --> # What changes are included in this PR? - add membership check gadget and a related test. <!-- There is no need to duplicate the description in the ticket here but it is sometimes worth providing a summary of the individual changes in this PR. Example: - Add `NestedLoopJoinExec`. - Speed up `HashJoinExec`. - Route joins to `NestedLoopJoinExec` if the outer input is sufficiently small. --> # Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? Example: Yes. --> Yes.
varshith257
force-pushed
the
refactor-posqltime
branch
from
January 15, 2025 15:37
18a1d81
to
ab4eca9
Compare
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 - [x] The PR title and commit messages adhere to guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md. In particular `!` is used if and only if at least one breaking change has been introduced. - [x] I have run the ci check script with `source scripts/run_ci_checks.sh`. # Rationale for this change For joins it is necessary to have not only one evaluations but also evaluations of rho = (0, 1, 2, \cdots, n-1) vectors. Hence we need to add them to our proofs. <!-- Why are you proposing this change? If this is already explained clearly in the linked issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. Example: Add `NestedLoopJoinExec`. Closes spaceandtimelabs#345. Since we added `HashJoinExec` in spaceandtimelabs#323 it has been possible to do provable inner joins. However performance is not satisfactory in some cases. Hence we need to fix the problem by implement `NestedLoopJoinExec` and speed up the code for `HashJoinExec`. --> # What changes are included in this PR? - an algorithm to compute rho evaluations <!-- There is no need to duplicate the description in the ticket here but it is sometimes worth providing a summary of the individual changes in this PR. Example: - Add `NestedLoopJoinExec`. - Speed up `HashJoinExec`. - Route joins to `NestedLoopJoinExec` if the outer input is sufficiently small. --> # Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? Example: Yes. --> Yes.
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 - [x] The PR title and commit messages adhere to guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md. In particular `!` is used if and only if at least one breaking change has been introduced. - [ ] I have run the ci check script with `source scripts/run_ci_checks.sh`. # Rationale for this change Hope helps! Since we added `HashJoinExec` in spaceandtimelabs#323 it has been possible to do provable inner joins. However performance is not satisfactory in some cases. Hence we need to fix the problem by implement `NestedLoopJoinExec` and speed up the code for `HashJoinExec`. --> # What changes are included in this PR? While reviewing the docs found errors in the comments to the code. Example: - Add `NestedLoopJoinExec`. - Speed up `HashJoinExec`. - Route joins to `NestedLoopJoinExec` if the outer input is sufficiently small. --> # Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? Example: Yes. -->
varshith257
force-pushed
the
refactor-posqltime
branch
from
January 16, 2025 03:54
ab4eca9
to
e8ee899
Compare
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 - [x] The PR title and commit messages adhere to guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md. In particular `!` is used if and only if at least one breaking change has been introduced. - [ ] I have run the ci check script with `source scripts/run_ci_checks.sh`.
…rificationBuilder`
…erificationBuilder` (spaceandtimelabs#484) 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 - [ ] The PR title and commit messages adhere to guidelines here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/main/CONTRIBUTING.md. In particular `!` is used if and only if at least one breaking change has been introduced. - [ ] I have run the ci check script with `source scripts/run_ci_checks.sh`. # Rationale for this change These changes are beneficial since we shouldn't panic in `VerificationBuilder`. <!-- Why are you proposing this change? If this is already explained clearly in the linked issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. Example: Add `NestedLoopJoinExec`. Closes spaceandtimelabs#345. Since we added `HashJoinExec` in spaceandtimelabs#323 it has been possible to do provable inner joins. However performance is not satisfactory in some cases. Hence we need to fix the problem by implement `NestedLoopJoinExec` and speed up the code for `HashJoinExec`. --> # What changes are included in this PR? See title. <!-- There is no need to duplicate the description in the ticket here but it is sometimes worth providing a summary of the individual changes in this PR. Example: - Add `NestedLoopJoinExec`. - Speed up `HashJoinExec`. - Route joins to `NestedLoopJoinExec` if the outer input is sufficiently small. --> # Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? Example: Yes. --> Existing tests do pass.
# Rationale for this change Currently, it is possible to argue the correct ranges of scalars up to the word value size, but anything below or beyond this value (currently 256 for byte sized words) will fail to verify. This PR expands range check on a scalar column to arbitrary lengths. # What changes are included in this PR? - [x] arbitrary lengths beyond maximum word value - [x] arbitrary lengths below maximum word value - benches were carried out in criterion and jaeger - refactored inner functions to make the loops more readable, will move back to idiomatic representations before marking this ready for merge # Are these changes tested? - [x] test can range check up to 2^248 boundary - [x] test cannot range check past 2^ 248 boundary - [x] test cannot range check below 0 - [x] test can range check below the maximum word size value - [x] range check with dory - [x] range check with ipa - currently failing as certain column lengths for unknown reason, see spaceandtimelabs#464
varshith257
force-pushed
the
refactor-posqltime
branch
from
January 17, 2025 05:55
e8ee899
to
c7af361
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
What changes are included in this PR?
Are these changes tested?