-
Notifications
You must be signed in to change notification settings - Fork 265
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: Fix Translator composer test instability #4751
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,12 +49,23 @@ TEST_F(GoblinTranslatorComposerTests, Basic) | |
using Fr = fr; | ||
using Fq = fq; | ||
|
||
// And an element and scalar the accumulation of which leaves no Point-at-Infinity commitments | ||
const auto x = uint256_t(0xd3c208c16d87cfd3, 0xd97816a916871ca8, 0x9b85045b68181585, 0x30644e72e131a02); | ||
const auto y = uint256_t(0x3ce1cc9c7e645a83, 0x2edac647851e3ac5, 0xd0cbe61fced2bc53, 0x1a76dae6d3272396); | ||
auto padding_element = G1(x, y); | ||
auto padding_scalar = -Fr::one(); | ||
|
||
auto P1 = G1::random_element(); | ||
auto P2 = G1::random_element(); | ||
auto z = Fr::random_element(); | ||
|
||
// Add the same operations to the ECC op queue; the native computation is performed under the hood. | ||
auto op_queue = std::make_shared<bb::ECCOpQueue>(); | ||
|
||
// Accumulate padding for non-PI commitments | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why non-PI? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non point-at-inifinity. I'll elaborate in the code There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, PI abbreviation is confusing, maybe be explicit |
||
op_queue->mul_accumulate(padding_element, padding_scalar); | ||
|
||
// Push everything else | ||
for (size_t i = 0; i < 500; i++) { | ||
op_queue->add_accumulate(P1); | ||
op_queue->mul_accumulate(P2, z); | ||
|
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.
Typo: Add not and