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: Sync from aztec-packages #4581

Merged
merged 31 commits into from
Mar 21, 2024
Merged

feat: Sync from aztec-packages #4581

merged 31 commits into from
Mar 21, 2024

Conversation

AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Mar 19, 2024

Automated pull of Noir development from aztec-packages.
BEGIN_COMMIT_OVERRIDE
feat: Add CMOV instruction to brillig and brillig gen (AztecProtocol/aztec-packages#5308)
feat(acir)!: Program and witness stack structure (AztecProtocol/aztec-packages#5149)
feat!: automatic NoteInterface and NoteGetterOptions auto select (AztecProtocol/aztec-packages#4508)
END_COMMIT_OVERRIDE

…ecProtocol/aztec-packages#4508)

Partially addresses:
AztecProtocol/aztec-packages#4519 (moved
autogeneration to the macro, even if not incremental)
Closes: AztecProtocol/aztec-packages#3011

Added the `#[aztec(note)]` attribute, which automatically implements
most of the `NoteInterface` trait in a struct marked as such, plus
several utilities. Even if this adds a fair share of "magic" to the note
implementation logic, it is structured in a way that it's hopefully easy
to follow, including meaningful errors attached to the correct span
during the process.

![Screenshot 2024-03-14 at 14 59
07](https://github.com/AztecProtocol/aztec-packages/assets/5404052/84a3d6e4-e346-4cfe-93eb-ec317632f344)

Hey you! Implement the trait!

![Screenshot 2024-03-14 at 14 46
39](https://github.com/AztecProtocol/aztec-packages/assets/5404052/bebfb3dd-c178-44d0-b9bc-005b5c9f0f38)
But only the meat and potatoes though.

As long as the user doesn't want to do any custom stuff, `get_header`,
`set_header`, `compute_note_content_hash`, `get_note_type_id`,
`serialize_content` and `deserialize_content` get automatically
implemented. Any combination of them can be overridden by the developer
though.

A metadata struct is also added, which takes the following form:

```rust
struct CardNote {
    points: FieldSelector,
    randomness: FieldSelector,
    owner: FieldSelector,
}
```

This is used to implement a `properties()` function, which in turn can
be used in conjunction with the `NoteGetterOptions.select` and `.sort`

<img width="697" alt="Screenshot 2024-03-18 at 15 27 27"
src="https://github.com/AztecProtocol/aztec-packages/assets/5404052/5da531b3-0b7f-4cf9-9908-300ff8d98c6d">
@TomAFrench
Copy link
Member

This is reverting changes from master currently.

Copy link

socket-security bot commented Mar 20, 2024

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

Package New capabilities Transitives Size Publisher

🚮 Removed packages: npm/[email protected]

View full report↗︎

@sirasistant
Copy link
Contributor

sirasistant commented Mar 20, 2024

This is reverting changes from master currently.

Last time I solved it by pulling noir master on aztec-packages, deleting this branch and triggering a sync manually from aztec-packages to here

@vezenovm
Copy link
Contributor

Last time I solved it by pulling noir master on aztec-packages, deleting this branch and triggering a sync manually from aztec-packages to here

The revert looks to be small so I just manually did it.

@vezenovm
Copy link
Contributor

@sirasistant We do need another bb.js release though your code wasn't included in the most recent release

@sirasistant
Copy link
Contributor

Yup let's see if we can release bb

@sirasistant
Copy link
Contributor

Release 0.30.1 is on the way

@vezenovm
Copy link
Contributor

Release 0.30.1 is on the way

I can update once it is posted on npm

Copy link
Contributor

github-actions bot commented Mar 20, 2024

Changes to circuit sizes

Generated at commit: 6e339b79aa17f3592a19732c098a4e8d3674a2c4, compared to commit: 3d1e45680b07e3c98432b7bfb8ff32c4437dc5f8

🧾 Summary (10% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
ecdsa_secp256r1 0 ➖ 0.00% +2,211 ❌ +3.28%
double_verify_proof 0 ➖ 0.00% +15,760 ❌ +3.13%
double_verify_proof_recursive 0 ➖ 0.00% +15,760 ❌ +3.13%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
ecdsa_secp256r1 162 (0) 0.00% 69,542 (+2,211) +3.28%
double_verify_proof 841 (0) 0.00% 519,537 (+15,760) +3.13%
double_verify_proof_recursive 841 (0) 0.00% 519,537 (+15,760) +3.13%
bigint 71 (0) 0.00% 4,418 (+2) +0.05%
hashmap 219,271 (0) 0.00% 491,764 (-1) -0.00%
scalar_mul 21 (0) 0.00% 3,409 (-1) -0.03%

@vezenovm
Copy link
Contributor

@TomAFrench Good to merge?

@sirasistant
Copy link
Contributor

I think this is not reverting anything else

@TomAFrench TomAFrench added this pull request to the merge queue Mar 21, 2024
Merged via the queue into master with commit 13eb71b Mar 21, 2024
44 checks passed
@TomAFrench TomAFrench deleted the aztec-packages branch March 21, 2024 10:43
TomAFrench added a commit that referenced this pull request Mar 27, 2024
* master:
  chore: delete `R1CSTransformer` (#4649)
  fix: Slice coercions (#4640)
  chore(ci): add warning sticky comment (#4647)
  fix(ssa): Fix slice intrinsic handling in the capacity tracker  (#4643)
  chore: fix versioning of `bn254_blackbox_solver` crate (#4638)
  chore: fix acvm crates reporting errors as JS packages (#4637)
  chore: Release Noir(0.26.0) (#4526)
  chore: convert `BlockExpression` into a standard struct (#4623)
  chore(github): Improve PR template "document later" checkbox description (#4625)
  chore: Update integers.md to note support for Fields using `from_integer` (#4536)
  chore: update docs with function names to match version 0.25.0 specifications (#4466)
  feat: add specific error for attempting `string[x] = ".."` (#4611)
  fix(ssa): Use accurate type during SSA AsSlice simplficiation (#4610)
  feat: Sync from aztec-packages (#4581)
  chore: regression test for #2540 (#4602)
  chore: fix up benchmarking scripts (#4601)
  feat: Add experimental `quote` expression to parser (#4595)
  chore(ci): fix long debugger test times (#4599)
TomAFrench pushed a commit that referenced this pull request Apr 3, 2024
Automated pull of Noir development from
[aztec-packages](https://github.com/AztecProtocol/aztec-packages).
BEGIN_COMMIT_OVERRIDE
feat: Add CMOV instruction to brillig and brillig gen
(AztecProtocol/aztec-packages#5308)
feat(acir)!: Program and witness stack structure
(AztecProtocol/aztec-packages#5149)
feat!: automatic NoteInterface and NoteGetterOptions auto select
(AztecProtocol/aztec-packages#4508)
END_COMMIT_OVERRIDE

---------

Co-authored-by: vezenovm <[email protected]>
Co-authored-by: Álvaro Rodríguez <[email protected]>
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.

4 participants