Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Fixed the memory issue #509

Merged
merged 7 commits into from
Jun 12, 2023

Conversation

Rumata888
Copy link
Contributor

@Rumata888 Rumata888 commented Jun 6, 2023

Description

Fixed the issue we had with Ultra RAM and ROM after splitting, where check_circuit was confused by public inputs after circuit finalisation.
Also changed recursion to do the final check with check_circuit + an auxiliary function that check the recursive proof point pairing.

Checklist:

  • I have reviewed my diff in github, line by line.
  • Every change is related to the PR description.
  • I have linked this pull request to the issue(s) that it resolves.
  • There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • There are no circuit changes, OR specifications in /markdown/specs have been updated.
  • There are no circuit changes, OR a cryptographer has been assigned for review.
  • I've updated any terraform that needs updating (e.g. environment variables) for deployment.
  • The branch has been rebased against the head of its merge target.
  • I'm happy for the PR to be merged at the reviewer's next convenience.
  • 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.

@Rumata888 Rumata888 changed the title DRAFT: Fixed the memory issue fix: Fixed the memory issue Jun 6, 2023
@Rumata888 Rumata888 requested a review from codygunton June 6, 2023 20:19
@codygunton codygunton assigned Rumata888 and codygunton and unassigned codygunton Jun 9, 2023
Copy link
Collaborator

@codygunton codygunton left a comment

Choose a reason for hiding this comment

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

Looks just a small amount of cleanup left.

@@ -255,7 +297,7 @@ template <typename Arithmetization> class CircuitConstructorBase {
_failed = true;
set_err(msg);
}
};
}; // namespace proof_system
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is actually the end of the class definition, not the namespace.

@@ -291,6 +297,24 @@ std::shared_ptr<UltraHonkComposerHelper::Flavor::ProvingKey> UltraHonkComposerHe
proving_key->table_3 = poly_q_table_column_3;
proving_key->table_4 = poly_q_table_column_4;

// Copy memory read/write record data into proving key. Prover needs to know which gates contain a read/write
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since #520, this happens in compute_witness, right?

* recursive proof-specific public inputs, so we can't check the recursive proof fully in check_circuit. So we use
* this additional function to check that the recursive proof points work.
*
* @return true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Return documentation is funny.

@codygunton codygunton marked this pull request as ready for review June 12, 2023 16:23
@codygunton codygunton merged commit 107d438 into master Jun 12, 2023
@codygunton codygunton deleted the is/fixing_circuit_constructor_composer_disrepancy branch June 12, 2023 16:37
@codygunton codygunton linked an issue Jun 21, 2023 that may be closed by this pull request
ludamad pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jul 22, 2023
* Fixed the memory issue
* Switched recursion to use check_circuit (but still use composers)
* Low-impact fix of circular dependency

---------

Co-authored-by: codygunton <codygunton@gmail.com>
ludamad pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jul 24, 2023
* Fixed the memory issue
* Switched recursion to use check_circuit (but still use composers)
* Low-impact fix of circular dependency

---------

Co-authored-by: codygunton <codygunton@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

check_circuit should handle recursion
2 participants