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

Arkworks 0.4.2: fix test vectors serialization issue #2594

Merged

Conversation

volhovm
Copy link
Member

@volhovm volhovm commented Sep 23, 2024

Problem: in export_test_vectors instead of (f_elem.into_repr() -> f_elem.into_bigint()) the renaming during the arkworks upgrade was mistakenly (f_elem.into_repr() -> f_elem.0), which also returns a bigint, but it's a different bigint!

I also scanned for all into_repr() renamings in the original arkworks PR diff and only found another similar issue in field_helpers, but there it's immaterial (fixed anyway).

Regression test confirmed to work on 1494cf973d40fb276465929eb7db1952c5de7bdc (last commit on develop before arkworks 0.4.2).

@volhovm volhovm force-pushed the volhovm/arkworks042-develop-fix-export-test-vectors branch from 8d33f7a to c271f38 Compare September 23, 2024 21:30
@volhovm volhovm force-pushed the volhovm/arkworks042-develop-fix-export-test-vectors branch from c271f38 to 18a63c3 Compare September 23, 2024 21:42
205, 238, 73, 116, 220, 196, 21, 134, 120, 39, 171, 177, 119, 25,
],
];

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the commit the values have been generated with? It is a good practice when adding regression tests. In particular, the commit should be one before the test has been written.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to do it in a follow-up.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Member

@dannywillems dannywillems left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modulo the comment. I approve based on the hypothesis the regression test has been generated before the change in the codebase.

@volhovm
Copy link
Member Author

volhovm commented Sep 23, 2024

@dannywillems thanks! Yes, I did checkout the older commit and generated values at that point.

@volhovm volhovm force-pushed the volhovm/arkworks042-develop-fix-export-test-vectors branch from 18a63c3 to 3e2e36f Compare September 23, 2024 22:27
@volhovm volhovm merged commit 4b11acf into develop Sep 24, 2024
6 checks passed
@volhovm volhovm deleted the volhovm/arkworks042-develop-fix-export-test-vectors branch September 24, 2024 08:25
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