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

[TEST] feat: Sync from aztec-packages #4304

Closed
wants to merge 112 commits into from
Closed

[TEST] feat: Sync from aztec-packages #4304

wants to merge 112 commits into from

Conversation

AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Feb 8, 2024

BEGIN_COMMIT_OVERRIDE
Example
refactor: cleanup of abi.nr in aztec-nr (AztecProtocol/aztec-packages#4473)
feat: Allow nested arrays and vectors in Brillig foreign calls (AztecProtocol/aztec-packages#4478)
feat: allow brillig to read arrays directly from memory (AztecProtocol/aztec-packages#4460)
feat(avm): back in avm context with macro - refactor context (AztecProtocol/aztec-packages#4438)
chore!: rename bigint_neg into bigint_sub (AztecProtocol/aztec-packages#4420)
chore: add bigint solver in ACVM and add a unit test for bigints in Noir (AztecProtocol/aztec-packages#4415)
feat!: Add expression width into acir (AztecProtocol/aztec-packages#4014)
feat: Add bit size to const opcode (AztecProtocol/aztec-packages#4385)
feat(aztec-nr): initial work for aztec public vm macro (AztecProtocol/aztec-packages#4400)
chore: surpress chained macro warning (AztecProtocol/aztec-packages#4396)
feat!: init storage macro (AztecProtocol/aztec-packages#4200)
chore(acir)!: Move is_recursive flag to be part of the circuit definition (AztecProtocol/aztec-packages#4221)
END_COMMIT_OVERRIDE

ludamad and others added 30 commits November 28, 2023 00:36
This is a dual-list commit in both Noir and aztec repo. In this PR,
Aztec gets the code to make a mirror, and the mirror action pushes to
our `aztec` branch in Noir. The `aztec` branch features this as the
first commit, to then be pushed one by one from master as Noir changes
come in.

---------

Co-authored-by: ludamad <adam@aztecprotocol.com>
This PR updates aztec-packages to use latest noir.

- Regarding noir_wasm, providing the solved sources directly to
`node_wasm` eliminates the need for `source-resolver`, which has been
completely removed from the repository.
 - Added required pub in return values
 - Updated return_type
 - Pulled latest noir
This is a recreation of this PR
(AztecProtocol/aztec-packages#3528) to handle PR
AztecProtocol/aztec-packages#3729

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).

---------

Co-authored-by: kevaundray <kevtheappdev@gmail.com>
Ok. Don't be scared. 262 files sounds horrific but it's mostly path
updates and that kind of nonsense. The `noir-contracts` and
`noir-compiler` changes are probably what to focus on.

* We update boxes to use our build of nargo, and the modified
code-generator.
* We update paths in docs, as noir-contracts/src/contracts moved to
noir-contracts/contracts, as src is now pure codegen output.
* Contracts are now imported e.g. `import { ChildContractArtifact } from
'@aztec/noir-contracts/Child';`. You can still just import from top
level index, but it's pretty cruel to ask the runtime to parse all the
artifacts just to get one, they are huge.
* Contract files are now just named as per the name of the contract
(i.e. not snake case). Less moving parts is better here. Given it's
codegen output it's acceptable to allow the output names to be
inconsistent.
* aztec.js is now responsible for copying the account contracts into
itself, as opposed to have some other random module push code into it.
But we just need to get rid of this baked account stuff at some point
anyway.
* Got rid of lodash.zip in one place, and then restrained myself to not
go further. But think we should remove the "trivial" lodash cases at
some point.
* Tidied up yp/bootstrap a bit, it's basically in line with the
dockerfile at this point. Will prob make dockerfile just call bootstrap
as part of some other docker cleanup I'll do later.
* `source-map-support` in cli.
* Remove compile command from cli. We are just going to promote use of
aztec-nargo.
* The ts and noir generators now expect nargo output as input, rather
than our transformed abi. The ts generator outputs the transformed abi
as part of it's generation.
* Delete all the script stuff from `noir-contracts`. src folder is now
just the codegen output, and the codegen is done with a trivial script
to call compile and the ts generator in noir-compiler.
* Added an unused script called `transform_json_abi.sh` that uses a tiny
bit of jq to perform the transform. Probably to be deleted, especially
if we just stop transforming the noir output and use it directly, but it
served me as a useful tool at one point.
Needed a bit of a graft here:
- Looked at current commit on noir/.gitrepo, it pointed to 'just nargo
compile' commit, fixed that to actual commit in aztec-packages branch of
noir
- Fixed parent commit
- did git subrepo noir pull and fixed merge conflicts per instructions
- this PR resulted
This removes the aggregation objects which are currently unused in the
RecursionConstraint implementation. Next we will update the ACVM opcode
to no longer use the aggregation object fields and update the
serialization.

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).

---------

Co-authored-by: kevaundray <kevtheappdev@gmail.com>
TomAFrench and others added 20 commits January 29, 2024 12:51
subrepo:
  subdir:   "noir"
  merged:   "ab74cff2b"
upstream:
  origin:   "https://github.com/noir-lang/noir"
  branch:   "aztec-packages"
  commit:   "2badd023e"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "110b9eb"

Please read [contributing guidelines](CONTRIBUTING.md) and remove this
line.
* master:
  fix(lsp): replace panics with errors (#4209)
  feat: Improve Error Handling for Cargo in Bootstrap Script (#4211)
  fix: prevent declarations of blackbox functions outside of the stdlib (#4177)
  feat: disable unused variable checks on low-level and oracle functions (#4179)
  chore: Rename acir_docs.md to README.md (#4208)
  feat: remove replacement of boolean range opcodes with `AssertZero` opcodes (#4107)
  chore(docs): updating docs to match new recursion interfacee (#4187)
  feat!: Sync commits from `aztec-packages` (#4144)
* master:
  fix: apply range constraints to return values from unconstrained functions (#4217)
…nition (#4221)

Resolves #4222

Currently in order to specify whether we want to use a prover that
produces SNARK recursion friendly proofs, we must pass a flag from the
tooling infrastructure. This PR moves it be part of the circuit
definition itself.

The flag now lives on the Builder and is set when we call
`create_circuit` in the acir format. The proof produced when this flag
is true should be friendly for recursive verification inside of another
SNARK. For example, a recursive friendly proof may use Blake3Pedersen
for hashing in its transcript, while we still want a prove that uses
Keccak for its transcript in order to be able to verify SNARKs on
Ethereum.

However, a verifier does not need a full circuit description and should
be able to verify a proof with just the verification key and the proof.
An `is_recursive_circuit` field was thus added to the verification key
as well so that we can specify the accurate verifier to use for a given
proof without the full circuit description.

---------

Signed-off-by: kevaundray <kevtheappdev@gmail.com>
Co-authored-by: ledwards2225 <98505400+ledwards2225@users.noreply.github.com>
Co-authored-by: kevaundray <kevtheappdev@gmail.com>
feat: Allow nested arrays and vectors in Brillig foreign calls (AztecProtocol/aztec-packages#4478)
feat: allow brillig to read arrays directly from memory (AztecProtocol/aztec-packages#4460)
feat(avm): back in avm context with macro - refactor context (AztecProtocol/aztec-packages#4438)
chore!: rename bigint_neg into bigint_sub (AztecProtocol/aztec-packages#4420)
chore: add bigint solver in ACVM and add a unit test for bigints in Noir (AztecProtocol/aztec-packages#4415)
feat!: Add expression width into acir (AztecProtocol/aztec-packages#4014)
feat: Add bit size to const opcode (AztecProtocol/aztec-packages#4385)
feat(aztec-nr): initial work for aztec public vm macro (AztecProtocol/aztec-packages#4400)
chore: surpress chained macro warning (AztecProtocol/aztec-packages#4396)
feat!: init storage macro (AztecProtocol/aztec-packages#4200)
chore(acir)!: Move `is_recursive` flag to be part of the circuit definition (AztecProtocol/aztec-packages#4221)
@ludamad ludamad changed the title feat: Sync from aztec-packages [TEST] feat: Sync from aztec-packages Feb 8, 2024
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 8, 2024
Copy link

socket-security bot commented Feb 8, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@aztec/bb.js@0.23.0 Transitive: environment +4 40.2 MB charlielye, jaosef, joss-aztecprotocol, ...3 more

🚮 Removed packages: npm/@aztec/bb.js@0.21.0

View full report↗︎

Copy link
Contributor

github-actions bot commented Feb 8, 2024

@ludamad ludamad force-pushed the aztec-sync-test branch 2 times, most recently from 6e25e5e to 2a66948 Compare February 8, 2024 17:48
Copy link
Contributor

github-actions bot commented Feb 8, 2024

Changes to circuit sizes

Generated at commit: 1d0a340197ca719dc0636a17fa445f718e0e3c38, compared to commit: d86ff1a16eed0a3f2994176c9399dafaf5bde108

🧾 Summary (10% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
brillig_nested_arrays +7 ❌ +233.33% +6 ❌ +100.00%
debug_logs +2 ❌ +6.25% 0 ➖ 0.00%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
brillig_nested_arrays 10 (+7) +233.33% 12 (+6) +100.00%
debug_logs 34 (+2) +6.25% 10 (0) 0.00%

@ludamad ludamad closed this Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.