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

feat: Kernel fix & test improvements/refactoring #239

Merged
merged 13 commits into from
Apr 13, 2023

Conversation

dbanks12
Copy link
Contributor

@dbanks12 dbanks12 commented Apr 13, 2023

Description

Status

Contents

  • Kernel tests have been refactored to use helper functions.
  • Hash/tree functions have been moved into helpers in hash.hpp (for kernel at least).
  • Fixed native kernel circuit which was not calling any contract logic.
  • Changed the way args are passed to private circuit calls so that we can use a std::function type to write functions that accept any circuit function as input.

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 /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.

Note
If you are updating the submodule, please make sure you do it in its own special PR and avoid making changes to the submodule as a part of other PRs.
To update a submodule, you can run the following commands:

$ git submodule update --recursive

Alternatively, you can select a particular commit in barretenberg/aztec3 that you wish to point to:

$ cd barretenberg
$ git pull origin aztec3        # This will point to the latest commit in `barretenberg/aztec3`
$ git checkout <commit_hash>    # Use this if you wish to point to a particular commit.
$ cd ..
$ git add . && git commit -m <commit_msg>
$ git push

@dbanks12 dbanks12 changed the base branch from db/zero_init_structs_arrays to master April 13, 2023 00:49
@dbanks12 dbanks12 marked this pull request as ready for review April 13, 2023 17:50
Comment on lines 96 to 97
// TODO: this fails intermittently, with:
// bigfield multiply range check failed
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this TODO has been fixed, so this comment can be removed.

@@ -409,20 +364,15 @@ TEST(private_kernel_tests, test_native_deposit)

Prover mock_kernel_prover = mock_kernel_composer.create_prover();
NT::Proof mock_kernel_proof = mock_kernel_prover.construct_proof();
// info("\nmock_kernel_proof: ", mock_kernel_proof.proof_data);

std::shared_ptr<NT::VK> mock_kernel_vk = mock_kernel_composer.compute_verification_key();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iAmMichaelConnor this is the big chunk we should be able to remove once we have the special kernel version for the initial iteration. Won't need to compute the mock kernel anymore.

@dbanks12 dbanks12 merged commit 5ae96a0 into master Apr 13, 2023
@dbanks12 dbanks12 deleted the db/refactor_pkernel_tests_fix_native_pkernel branch April 13, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants