-
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
fix: Remove inner product types from generic test. #264
fix: Remove inner product types from generic test. #264
Conversation
ci failing on@JayWhite2357 @stuarttimwhite @iajoiner What can we do in this matter, as the methods are not implemented for the TestEvaluationProof |
@JayWhite2357 Need help on this 😶 |
@Abiji-2020 Sorry for the delay, I was out of office the first half of the week and I'm playing catchup 😬. |
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.
Looks excellent. Breaking this down into these commits was super helpful.
Two changes that are easy to make because of your clean commit history:
You can just drop this commit: 3eb4eb8
For da37c77,
I would actually ask that you rename the tests and still use TestScalar
instead of reverting back to Curve25519Scalar
.
(Additionally, it would be nice, but not necessary, if you could use git rebase --interactive
or similar to edit the commits to fix the typos wherever they originated rather than putting it in a separate commit.)
Finally, I would prefer, but not require a rebase rather than a merge: c28f27e. That way we can merge all of your commits rather than doing a squash merge.
c28f27e
to
71b680b
Compare
Currently all the modifications are done in the files named as test. Will update the tests in other files within the directory and update. Untill marking the PR as draft. |
8533fa9
to
f0a357b
Compare
c1cb096
to
d8c75c7
Compare
@JayWhite2357 sorry for this much commit, after rebasing with the main branch, this commit was messed up heavily. I tried to make it clean as possible . |
e453d14
to
024eb55
Compare
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've done a thorough review. If you do these changes and resolve the conflicts with main, this should be ready to go.
scripts/run_ci_checks.sh
Outdated
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.
This file does not appear to be changed. Please be sure it is not included in the git diff.
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 had tried to not include it in the git diff but it is still showing in the git diff
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.
Do something like git checkout main scripts/run_ci_checks.sh
. Then commit that version of the file. My guess is that there is some issue with line endings.
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.
@JayWhite2357 yes now it was removed from the git diff. I downloaded the file from the main branch and replaced in the current branch.
CommittableColumn::BigInt(&front_emptied_column_a), | ||
CommittableColumn::VarChar( | ||
front_emptied_column_b | ||
.iter() | ||
.map(Into::<TestScalar>::into) | ||
.map(Into::<[u64; 4]>::into) | ||
.collect(), | ||
), | ||
]; | ||
|
||
let expected_commitments = | ||
NaiveCommitment::compute_commitments(&committable_columns, 0, &()); |
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.
Something like this is better.
CommittableColumn::BigInt(&front_emptied_column_a), | |
CommittableColumn::VarChar( | |
front_emptied_column_b | |
.iter() | |
.map(Into::<TestScalar>::into) | |
.map(Into::<[u64; 4]>::into) | |
.collect(), | |
), | |
]; | |
let expected_commitments = | |
NaiveCommitment::compute_commitments(&committable_columns, 0, &()); | |
CommittableColumn::BigInt(&column_a[3..]), | |
CommittableColumn::VarChar( | |
column_b[3..] | |
.iter() | |
.map(Into::<TestScalar>::into) | |
.map(Into::<[u64; 4]>::into) | |
.collect(), | |
), | |
]; | |
let expected_commitments = | |
NaiveCommitment::compute_commitments(&committable_columns, 3, &()); |
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.
Modified it
@@ -91,9 +92,11 @@ pub trait ArrayRefExt { | |||
impl ArrayRefExt for ArrayRef { | |||
#[cfg(any(test, feature = "test"))] | |||
#[cfg(feature = "blitzar")] | |||
fn to_curve25519_scalars( | |||
#[cfg(test)] | |||
fn to_test_scalars( |
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.
This is dead code. Let's just remove this and all the tests in this file that are testing it.
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.
Removed the code and its tests
@@ -41,7 +41,7 @@ pub enum Column<'a, S: Scalar> { | |||
/// i128 columns | |||
Int128(&'a [i128]), | |||
/// Decimal columns with a max width of 252 bits | |||
/// - the backing store maps to the type [`crate::base::scalar::Curve25519Scalar`] | |||
/// - the backing store maps to the type [`crate::base::scalar::test_scalar::TestScalar`] |
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.
/// - the backing store maps to the type [`crate::base::scalar::test_scalar::TestScalar`] | |
/// - the backing store maps to the type `S` |
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.
Modified
@@ -263,7 +263,7 @@ pub enum ColumnType { | |||
/// Mapped to i64 | |||
#[serde(alias = "TIMESTAMP", alias = "timestamp")] | |||
TimestampTZ(PoSQLTimeUnit, PoSQLTimeZone), | |||
/// Mapped to [`Curve25519Scalar`](crate::base::scalar::Curve25519Scalar) | |||
/// Mapped to [`TestScalar`](crate::base::scalar::test_scalar::TestScalar) |
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.
/// Mapped to [`TestScalar`](crate::base::scalar::test_scalar::TestScalar) | |
/// Mapped to `S` |
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.
Modified
7b9a784
to
4791e85
Compare
6be62ce
to
c28ad44
Compare
@JayWhite2357 any updates on this? |
a44f61b
to
d04e6f7
Compare
@JayWhite2357 now you can check it |
5d8696b
to
ca6e336
Compare
@JayWhite2357 could you merge it, as the auto merge was cancelled, when the main repo was updated. Only done rebaseing with the main after the approval . |
0d3f5ae
to
239348d
Compare
@JayWhite2357 could you merge this PR |
ccc1195
to
60b0b0e
Compare
Signed-off-by: Abinand P <[email protected]>
Signed-off-by: Abinand P <[email protected]>
Signed-off-by: Abinand P <[email protected]>
Signed-off-by: Abinand P <[email protected]>
Signed-off-by: Abinand P <[email protected]>
…nt directory Signed-off-by: Abinand P <[email protected]>
Signed-off-by: Abinand P <[email protected]>
Signed-off-by: Abinand P <[email protected]>
Signed-off-by: Abinand P <[email protected]>
Signed-off-by: Abinand P <[email protected]>
60b0b0e
to
cebd80c
Compare
@Abiji-2020 hmmm. I missed this one. I'll merge it. |
Thanks @JayWhite2357, I was rebasing it for the past week. Hoping it to merge daily. |
🎉 This PR is included in version 0.36.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
The tests in the
base
directory was all modified with the updated fromCurve25519Scalar -> TestScalar
RistrettoPoint -> NaiveCommitment
InnerProductProof -> TestEvaluationProof
Notes
During the previous commit , I accidentally modified the function which needs to be done in Curve25519Scalar , which was modified in the latest commit
closes #230
/claim #230
What changes are included in this PR?
all the test files, (unit tests) are modified.
Are these changes tested?
yes