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

chore: Remove usage of ComposerHelper and use CircuitBuilder from the API #555

Merged
merged 26 commits into from
Jun 28, 2023

Conversation

codygunton
Copy link
Collaborator

@codygunton codygunton commented Jun 22, 2023

Description

#501 Got rid of the shell composer classes that forwarded function calls to circuit constructors and composer helpers. This PR focuses on renaming objects and moving files to clean up after that work.

Checklist:

  • I have reviewed my diff in github, line by line.
  • Every change is related to the PR description.
  • The branch has been merged with/rebased against the head of its merge target.
  • There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • There are no circuit changes, OR a cryptographer has been assigned for review.
  • New functions, classes, etc. have been documented according to the doxygen comment format. Classes and structs must have @brief describing the intended functionality.
  • If existing code has been modified, such documentation has been added or updated.
  • No superfluous include directives have been added.
  • I have linked to any issue(s) it resolves.
  • I'm happy for the PR to be merged at the reviewer's next convenience.

@codygunton codygunton force-pushed the cg/post-split-cleanup branch from 83a96e0 to b6f29d6 Compare June 22, 2023 18:27
@codygunton codygunton self-assigned this Jun 22, 2023
@kevaundray kevaundray changed the title chore: Post-split cleanup chore: Remove usage of ComposerHelper and use CircuitBuilder in the API Jun 26, 2023
@codygunton codygunton changed the title chore: Remove usage of ComposerHelper and use CircuitBuilder in the API chore: Remove usage of ComposerHelper and use CircuitBuilder from the API Jun 26, 2023
@codygunton codygunton marked this pull request as ready for review June 28, 2023 11:35
@@ -156,5 +156,6 @@
"-g"
],
"cmake.useCMakePresets": "auto",
"editor.inlayHints.enabled": "offUnlessPressed"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is an annoying default probably most people don't want.

@@ -202,7 +201,7 @@ std::shared_ptr<typename Flavor::ProvingKey> UltraHonkComposerHelper_<Flavor>::c
// Initialize proving_key
// TODO(#392)(Kesha): replace composer types.
proving_key = initialize_proving_key<Flavor>(
circuit_constructor, crs_factory_.get(), minimum_circuit_size, num_randomized_gates, ComposerType::PLOOKUP);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed the need to pass this argument in so many places. It's only currently needed for Plonk.

@@ -64,7 +62,7 @@ std::shared_ptr<plonk::proving_key> StandardPlonkComposerHelper::compute_proving
// Initialize circuit_proving_key
// TODO(#392)(Kesha): replace composer types.
circuit_proving_key = proof_system::initialize_proving_key<Flavor>(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably should just extract this CircuitType from flavor, or just move responsibility of encoding this information in vk to a responsibility outside of Bb.

@@ -56,19 +56,16 @@ class StandardCircuitConstructor : public CircuitConstructorBase<arithmetization
// m l r o c
create_poly_gate({ one_idx, one_idx, one_idx, 1, 1, 1, 1, -4 });
};
// This constructor is needed to simplify switching between circuit constructor and composer
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here Kesha is referring to the splitting work. This constructor shouldn't exist, and now it doesn't.

@suyash67 suyash67 merged commit bc0844b into master Jun 28, 2023
@suyash67 suyash67 deleted the cg/post-split-cleanup branch June 28, 2023 12:42
ludamad pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jul 22, 2023
ludamad pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jul 24, 2023
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