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(docs): Macros explainer #7172

Merged
merged 9 commits into from
Jul 2, 2024
Merged

feat(docs): Macros explainer #7172

merged 9 commits into from
Jul 2, 2024

Conversation

catmcgee
Copy link
Contributor

I had already written a lot of this before so just adding to the other macros since then

Closes AztecProtocol/dev-rel#200

@AztecBot
Copy link
Collaborator

AztecBot commented Jun 24, 2024

Docs Preview

Hey there! 👋 You can check your preview at https://6682a50d45573b09690fc80a--aztec-docs-dev.netlify.app

@catmcgee catmcgee requested a review from a team June 30, 2024 18:04
@catmcgee catmcgee marked this pull request as ready for review June 30, 2024 18:04
@catmcgee catmcgee requested a review from Thunkar July 1, 2024 10:31
Co-authored-by: James Zaki <james.zaki@proton.me>
- Visibility Control: The function is marked as pub, making it accessible from outside the contract.
- Unconstrained Execution: Public functions are marked as unconstrained, meaning they don't generate proofs and are executed directly by the sequencer.

## Constrained `view` Functions #[aztec(view)]
Copy link
Contributor

Choose a reason for hiding this comment

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

This has been a source of discussion and confusion. I love the way it's explained here, gonna refer people to this paragraph from now on 🤣

@catmcgee catmcgee requested review from jzaki and Thunkar July 1, 2024 12:35
@Thunkar
Copy link
Contributor

Thunkar commented Jul 1, 2024

LGTM!

@catmcgee catmcgee enabled auto-merge (squash) July 1, 2024 13:11
}

fn get_note_type_id() -> Field {
// Automatically generated unique ID based on Keccak hash of the struct name
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the struct name the only input to the hash to generate the id? is there any possibility / concern with note type id collisions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

currently yes it looks like this, but it's going to be nuked and i assume a better note type ID fn will exist. will have to keep an eye on this

Copy link
Contributor

Choose a reason for hiding this comment

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

Note type id should be unique only within the same contract (please correct me if I'm wrong @benesjan) There's still the possibility of importing two different note structs of the same name from different packages, but that breaks a bunch of other things (such as the automatic implementation of compute_note_hash_and_optionally_a_nullifier) and forces the user to manually override. At any rate this is going to be revised very soon when noir metaprogramming comes online.

@catmcgee catmcgee merged commit bb2ebfc into master Jul 2, 2024
33 checks passed
@catmcgee catmcgee deleted the docs/macros-explainer branch July 2, 2024 08:32
rahul-kothari pushed a commit that referenced this pull request Jul 2, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.45.0</summary>

##
[0.45.0](aztec-package-v0.44.0...aztec-package-v0.45.0)
(2024-07-02)


### Bug Fixes

* Devnet deployment issues
([#7197](#7197))
([9cf4904](9cf4904))
</details>

<details><summary>barretenberg.js: 0.45.0</summary>

##
[0.45.0](barretenberg.js-v0.44.0...barretenberg.js-v0.45.0)
(2024-07-02)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>aztec-packages: 0.45.0</summary>

##
[0.45.0](aztec-packages-v0.44.0...aztec-packages-v0.45.0)
(2024-07-02)


### ⚠ BREAKING CHANGES

* error on too large integer value
(noir-lang/noir#5371)
* rename struct-specific TypeDefinition -> StructDefinition
(noir-lang/noir#5356)
* extend storage read oracle to receive address and block number
([#7243](#7243))
* split storage access oracles
([#7237](#7237))
* remove `dep::` prefix (noir-lang/noir#4946)

### Features

* `mod.nr` entrypoint (noir-lang/noir#5039)
([bb5cbab](bb5cbab))
* `static_assert` builtin (noir-lang/noir#5342)
([eb9e9f6](eb9e9f6))
* Add `map`, `fold`, `reduce`, `any`, and `all` for slices
(noir-lang/noir#5331)
([f2abb4e](f2abb4e))
* Add `set` and `set_unchecked` methods to `Vec` and `BoundedVec`
(noir-lang/noir#5241)
([ed815a3](ed815a3))
* Add BoundedVec::map (noir-lang/noir#5250)
([ed815a3](ed815a3))
* Add fuzzer for Noir programs
(noir-lang/noir#5251)
([ed815a3](ed815a3))
* Add new lenses for encryted notes
([#7238](#7238))
([c07cf2c](c07cf2c))
* Add outgoing keys support to getEvents
([#7239](#7239))
([77c304e](77c304e))
* Add support for wildcard types
(noir-lang/noir#5275)
([ed815a3](ed815a3))
* **avm:** Calldata gadget preliminaries
([#7227](#7227))
([79e8588](79e8588))
* Build simple dictionary from inspecting ACIR program
(noir-lang/noir#5264)
([ed815a3](ed815a3))
* Constant Honk proof sizes
([#6954](#6954))
([17c8d3a](17c8d3a))
* Disable nargo color output if stderr is tty
(noir-lang/noir#5346)
([eb9e9f6](eb9e9f6))
* **docs:** Macros explainer
([#7172](#7172))
([bb2ebfc](bb2ebfc))
* Error on too large integer value
(noir-lang/noir#5371)
([bb5cbab](bb5cbab))
* Example of private token transfer event
([#7242](#7242))
([99ce26f](99ce26f))
* **experimental:** Implement macro calls & splicing into `Expr` values
(noir-lang/noir#5203)
([ed815a3](ed815a3))
* Extend storage read oracle to receive address and block number
([#7243](#7243))
([153b201](153b201))
* **frontend:** Explicit numeric generics and type kinds
(noir-lang/noir#5155)
([f2abb4e](f2abb4e))
* **frontend:** Where clause on impl
(noir-lang/noir#5320)
([f2abb4e](f2abb4e))
* Function selector opcode in AVM
([#7244](#7244))
([dde47e9](dde47e9))
* Implement comptime support for `array_len` builtin
(noir-lang/noir#5272)
([ed815a3](ed815a3))
* Implement comptime support for `as_slice` builtin
(noir-lang/noir#5276)
([ed815a3](ed815a3))
* Insert trait impls into the program from type annotations
(noir-lang/noir#5327)
([f2abb4e](f2abb4e))
* Let `should_fail_with` check that the failure reason contains the
expected message (noir-lang/noir#5319)
([f2abb4e](f2abb4e))
* Make macros operate on token streams instead of AST nodes
(noir-lang/noir#5301)
([ed815a3](ed815a3))
* Private refunds
([#7226](#7226))
([6fafff6](6fafff6))
* Remove `dep::` prefix (noir-lang/noir#4946)
([ed815a3](ed815a3))
* Remove event selector in logs from public context
([#7192](#7192))
([646d45a](646d45a))
* Rename struct-specific TypeDefinition -&gt; StructDefinition
(noir-lang/noir#5356)
([bb5cbab](bb5cbab))
* Run `comptime` code from annotations on a type definition
(noir-lang/noir#5256)
([ed815a3](ed815a3))
* Split storage access oracles
([#7237](#7237))
([51f7d65](51f7d65))
* **stdlib:** Update stdlib to use explicit numeric generics
(noir-lang/noir#5306)
([f2abb4e](f2abb4e))
* Store shared mutable hash
([#7169](#7169))
([868606e](868606e))
* Sync from aztec-packages (noir-lang/noir#5242)
([ed815a3](ed815a3))
* Sync from aztec-packages (noir-lang/noir#5340)
([f2abb4e](f2abb4e))
* Sync from aztec-packages (noir-lang/noir#5347)
([eb9e9f6](eb9e9f6))
* Sync from aztec-packages (noir-lang/noir#5377)
([bb5cbab](bb5cbab))
* Unconstrained variants for event emission
([#7251](#7251))
([6d093e3](6d093e3))
* Unify unencrypted log emission and decoding
([#7232](#7232))
([354dba2](354dba2))
* Update rebuild script
([#7225](#7225))
([af59247](af59247))
* Use runtime loops for brillig array initialization
(noir-lang/noir#5243)
([f2abb4e](f2abb4e))
* Wonky rollups
([#7189](#7189))
([1de3746](1de3746))


### Bug Fixes

* Add more thorough check for whether a type is valid when passing it
from constrained code to unconstrained code
(noir-lang/noir#5009)
([ed815a3](ed815a3))
* Add support for nested arrays returned by oracles
(noir-lang/noir#5132)
([ed815a3](ed815a3))
* Address compiler warnings coming from stdlib
(noir-lang/noir#5351)
([eb9e9f6](eb9e9f6))
* Avoid duplicating constant arrays
(noir-lang/noir#5287)
([ed815a3](ed815a3))
* Avoid panic in type system
(noir-lang/noir#5332)
([f2abb4e](f2abb4e))
* Avoid unnecessarily splitting expressions with multiplication terms
with a shared term (noir-lang/noir#5291)
([ed815a3](ed815a3))
* Benchmark prover e2e test with proving
([#7175](#7175))
([431c14c](431c14c))
* Devnet deployment issues
([#7197](#7197))
([9cf4904](9cf4904))
* Disable `if` optimization
(noir-lang/noir#5240)
([ed815a3](ed815a3))
* **docs:** Historical reference library updates
([#7166](#7166))
([b3409c4](b3409c4))
* Don't benchmark the "prove" command as it doesn't exist anymore
(noir-lang/noir#5323)
([f2abb4e](f2abb4e))
* Don't lazily elaborate functions
(noir-lang/noir#5282)
([ed815a3](ed815a3))
* **elaborator:** Fix duplicate methods error
(noir-lang/noir#5225)
([ed815a3](ed815a3))
* **elaborator:** Fix regression introduced by lazy-global changes
(noir-lang/noir#5223)
([ed815a3](ed815a3))
* Error when a local function is called in a comptime context
(noir-lang/noir#5334)
([f2abb4e](f2abb4e))
* Fix authwit package
([#7204](#7204))
([98ccd41](98ccd41))
* Fix incorrect return type being applied to stdlib functions
`modulus_be_bytes()`, `modulus_be_bits()`, etc.
(noir-lang/noir#5278)
([ed815a3](ed815a3))
* Fix tokenization of unquoted types in macros
(noir-lang/noir#5326)
([f2abb4e](f2abb4e))
* Fix usage of `#[abi(tag)]` attribute with elaborator
(noir-lang/noir#5298)
([f2abb4e](f2abb4e))
* Handle struct with nested arrays in oracle return values
(noir-lang/noir#5244)
([ed815a3](ed815a3))
* Ignore calls to `Intrinsic::AsWitness` during brillig codegen
(noir-lang/noir#5350)
([eb9e9f6](eb9e9f6))
* Implement generic functions in the interpreter
(noir-lang/noir#5330)
([f2abb4e](f2abb4e))
* **nargo_fmt:** Account for spaces before the generic list of a
function (noir-lang/noir#5303)
([ed815a3](ed815a3))
* Replace panic in monomorphization with an error
(noir-lang/noir#5305)
([ed815a3](ed815a3))
* Reran pil-&gt;cpp codegen & encode_and_encrypt_event_with_randomness
fix
([#7247](#7247))
([fa15a45](fa15a45))
* Runtime brillig bigint id assignment
(noir-lang/noir#5369)
([bb5cbab](bb5cbab))
* Skip emission of brillig calls which will never be executed
(noir-lang/noir#5314)
([ed815a3](ed815a3))
* TS LSP being slow
([#7181](#7181))
([e934e87](e934e87))
* Update `in_contract` flag before handling function metadata in
elaborator (noir-lang/noir#5292)
([ed815a3](ed815a3))
* Use proper serialization in `AbiValue`
(noir-lang/noir#5270)
([ed815a3](ed815a3))


### Miscellaneous

* `static_assert` error message fix and split into is-dynamic and
is-false (noir-lang/noir#5353)
([eb9e9f6](eb9e9f6))
* Add back Pedersen blackbox functions (revert PR 5221)
(noir-lang/noir#5318)
([ed815a3](ed815a3))
* Add log_hash as input in log emission in private context
([#7249](#7249))
([8b3dfe9](8b3dfe9))
* Add no predicate to poseidon2
(noir-lang/noir#5252)
([ed815a3](ed815a3))
* Add no-predicate to hash implementations
(noir-lang/noir#5253)
([ed815a3](ed815a3))
* Add property tests for ABI encoding
(noir-lang/noir#5216)
([ed815a3](ed815a3))
* Address TODO in `compat.nr`
(noir-lang/noir#5339)
([f2abb4e](f2abb4e))
* **avm-transpiler:** Better error messages
([#7217](#7217))
([27051ad](27051ad))
* **avm:** Remove trailing minus zero in codegen
([#7185](#7185))
([f3c8166](f3c8166))
* Avoid building contracts when producing gates report
([#7136](#7136))
([25507e6](25507e6))
* Bump `bb` to 0.43.0 (noir-lang/noir#5321)
([f2abb4e](f2abb4e))
* Bundle SSA Evaluator Options
(noir-lang/noir#5317)
([ed815a3](ed815a3))
* **ci:** Trigger a noir sync every morning at 8am
([#7280](#7280))
([412c016](412c016))
* Copy across typo PR script from aztec-packages
(noir-lang/noir#5235)
([ed815a3](ed815a3))
* Create separate crate just for noir artifacts
(noir-lang/noir#5162)
([ed815a3](ed815a3))
* **docs:** Fixing trailing slash issue
(noir-lang/noir#5233)
([ed815a3](ed815a3))
* Fix examples (noir-lang/noir#5357)
([eb9e9f6](eb9e9f6))
* Fix migration notes
([#7279](#7279))
([51d93eb](51d93eb))
* Fix negative tests in AVM circuit for context input lookups
([#7261](#7261))
([ad2f654](ad2f654))
* Fixing all relative paths
(noir-lang/noir#5220)
([ed815a3](ed815a3))
* Generate PIL constants from via constants gen
([#7258](#7258))
([244ef7e](244ef7e))
* Gets rid of unencrypted emit in private_context
([#7236](#7236))
([3e6d88e](3e6d88e))
* Improve authwit comments/docs
([#7180](#7180))
([051ab9e](051ab9e))
* Misc cleanup in simulator
([#7203](#7203))
([eb00830](eb00830))
* Optimize the elaborator (noir-lang/noir#5230)
([ed815a3](ed815a3))
* Parse macros (noir-lang/noir#5229)
([ed815a3](ed815a3))
* Pedersen commitment in Noir
(noir-lang/noir#5221)
([ed815a3](ed815a3))
* Pedersen hash in Noir (noir-lang/noir#5217)
([ed815a3](ed815a3))
* Private tail circuits
([#7148](#7148))
([9e67e7d](9e67e7d))
* Pull out change to expression splitting from sync PR
([#7215](#7215))
([b4f50a5](b4f50a5))
* Pull out foreign call nested array changes
([#7216](#7216))
([1faaaf5](1faaaf5))
* Pull out
noir-lang/noir[#5120](#5120)
([#7205](#7205))
([c5dc094](c5dc094))
* Pull out pedersen generator builtin from sync PR
([#7210](#7210))
([412f02e](412f02e))
* Pull out SSA changes from sync PR
([#7209](#7209))
([141e137](141e137))
* Push code related to ABI gen into `noirc_driver`
(noir-lang/noir#5218)
([ed815a3](ed815a3))
* Redo typo PR by dropbigfish
(noir-lang/noir#5234)
([ed815a3](ed815a3))
* Refactor test case generation in build.rs
(noir-lang/noir#5280)
([ed815a3](ed815a3))
* Release Noir(0.31.0) (noir-lang/noir#5166)
([ed815a3](ed815a3))
* Remove `is_unconstrained_fn` field from elaborator
(noir-lang/noir#5335)
([f2abb4e](f2abb4e))
* Remove 4738 ref
([#7254](#7254))
([97d997c](97d997c))
* Remove a log file
([#7201](#7201))
([83bb218](83bb218))
* Remove commented code
([#7231](#7231))
([2740d60](2740d60))
* Remove panic for unimplemented trait dispatch
(noir-lang/noir#5329)
([f2abb4e](f2abb4e))
* Replace `is_bn254` implementation to not rely on truncation of
literals (noir-lang/noir#5247)
([ed815a3](ed815a3))
* Replace `regression_5202` with more manageably sized program
(noir-lang/noir#5345)
([eb9e9f6](eb9e9f6))
* Replace cached `in_contract` with `in_contract()` method
(noir-lang/noir#5324)
([f2abb4e](f2abb4e))
* Replace logical operators with bitwise in `DebugToString`
(noir-lang/noir#5236)
([ed815a3](ed815a3))
* Replace relative paths to noir-protocol-circuits
([e83b07b](e83b07b))
* Replace relative paths to noir-protocol-circuits
([eca8587](eca8587))
* Replace relative paths to noir-protocol-circuits
([b9ddf43](b9ddf43))
* Replace relative paths to noir-protocol-circuits
([6f817e8](6f817e8))
* Replace relative paths to noir-protocol-circuits
([f9bf0a4](f9bf0a4))
* Replicate
noir-lang/noir[#4946](#4946)
([#7202](#7202))
([b5c07d8](b5c07d8))
* Simplify compilation flow to write to file immediately
(noir-lang/noir#5265)
([ed815a3](ed815a3))
* Split off fuzzer, abi changes and `noirc_artifacts` from sync
([#7208](#7208))
([255d752](255d752))
* Thread generics through ACIR/brillig gen
(noir-lang/noir#5120)
([ed815a3](ed815a3))
* Use `push_err` more in elaborator
(noir-lang/noir#5336)
([f2abb4e](f2abb4e))
* Use options.limit as upper limit for note-getter loop
([#7253](#7253))
([8ff669b](8ff669b))
* Use prefix op_ for every instruction in avm_trace.hpp
([#7214](#7214))
([7ed7558](7ed7558))
* Use the elaborator by default
(noir-lang/noir#5246)
([ed815a3](ed815a3))
</details>

<details><summary>barretenberg: 0.45.0</summary>

##
[0.45.0](barretenberg-v0.44.0...barretenberg-v0.45.0)
(2024-07-02)


### Features

* **avm:** Calldata gadget preliminaries
([#7227](#7227))
([79e8588](79e8588))
* Constant Honk proof sizes
([#6954](#6954))
([17c8d3a](17c8d3a))
* Function selector opcode in AVM
([#7244](#7244))
([dde47e9](dde47e9))
* Update rebuild script
([#7225](#7225))
([af59247](af59247))


### Bug Fixes

* Benchmark prover e2e test with proving
([#7175](#7175))
([431c14c](431c14c))
* Reran pil-&gt;cpp codegen & encode_and_encrypt_event_with_randomness
fix
([#7247](#7247))
([fa15a45](fa15a45))


### Miscellaneous

* **avm:** Remove trailing minus zero in codegen
([#7185](#7185))
([f3c8166](f3c8166))
* Fix negative tests in AVM circuit for context input lookups
([#7261](#7261))
([ad2f654](ad2f654))
* Generate PIL constants from via constants gen
([#7258](#7258))
([244ef7e](244ef7e))
* Use prefix op_ for every instruction in avm_trace.hpp
([#7214](#7214))
([7ed7558](7ed7558))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
AztecBot added a commit to AztecProtocol/barretenberg that referenced this pull request Jul 3, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.45.0</summary>

##
[0.45.0](AztecProtocol/aztec-packages@aztec-package-v0.44.0...aztec-package-v0.45.0)
(2024-07-02)


### Bug Fixes

* Devnet deployment issues
([#7197](AztecProtocol/aztec-packages#7197))
([9cf4904](AztecProtocol/aztec-packages@9cf4904))
</details>

<details><summary>barretenberg.js: 0.45.0</summary>

##
[0.45.0](AztecProtocol/aztec-packages@barretenberg.js-v0.44.0...barretenberg.js-v0.45.0)
(2024-07-02)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>aztec-packages: 0.45.0</summary>

##
[0.45.0](AztecProtocol/aztec-packages@aztec-packages-v0.44.0...aztec-packages-v0.45.0)
(2024-07-02)


### ⚠ BREAKING CHANGES

* error on too large integer value
(noir-lang/noir#5371)
* rename struct-specific TypeDefinition -> StructDefinition
(noir-lang/noir#5356)
* extend storage read oracle to receive address and block number
([#7243](AztecProtocol/aztec-packages#7243))
* split storage access oracles
([#7237](AztecProtocol/aztec-packages#7237))
* remove `dep::` prefix (noir-lang/noir#4946)

### Features

* `mod.nr` entrypoint (noir-lang/noir#5039)
([bb5cbab](AztecProtocol/aztec-packages@bb5cbab))
* `static_assert` builtin (noir-lang/noir#5342)
([eb9e9f6](AztecProtocol/aztec-packages@eb9e9f6))
* Add `map`, `fold`, `reduce`, `any`, and `all` for slices
(noir-lang/noir#5331)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Add `set` and `set_unchecked` methods to `Vec` and `BoundedVec`
(noir-lang/noir#5241)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Add BoundedVec::map (noir-lang/noir#5250)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Add fuzzer for Noir programs
(noir-lang/noir#5251)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Add new lenses for encryted notes
([#7238](AztecProtocol/aztec-packages#7238))
([c07cf2c](AztecProtocol/aztec-packages@c07cf2c))
* Add outgoing keys support to getEvents
([#7239](AztecProtocol/aztec-packages#7239))
([77c304e](AztecProtocol/aztec-packages@77c304e))
* Add support for wildcard types
(noir-lang/noir#5275)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* **avm:** Calldata gadget preliminaries
([#7227](AztecProtocol/aztec-packages#7227))
([79e8588](AztecProtocol/aztec-packages@79e8588))
* Build simple dictionary from inspecting ACIR program
(noir-lang/noir#5264)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Constant Honk proof sizes
([#6954](AztecProtocol/aztec-packages#6954))
([17c8d3a](AztecProtocol/aztec-packages@17c8d3a))
* Disable nargo color output if stderr is tty
(noir-lang/noir#5346)
([eb9e9f6](AztecProtocol/aztec-packages@eb9e9f6))
* **docs:** Macros explainer
([#7172](AztecProtocol/aztec-packages#7172))
([bb2ebfc](AztecProtocol/aztec-packages@bb2ebfc))
* Error on too large integer value
(noir-lang/noir#5371)
([bb5cbab](AztecProtocol/aztec-packages@bb5cbab))
* Example of private token transfer event
([#7242](AztecProtocol/aztec-packages#7242))
([99ce26f](AztecProtocol/aztec-packages@99ce26f))
* **experimental:** Implement macro calls & splicing into `Expr` values
(noir-lang/noir#5203)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Extend storage read oracle to receive address and block number
([#7243](AztecProtocol/aztec-packages#7243))
([153b201](AztecProtocol/aztec-packages@153b201))
* **frontend:** Explicit numeric generics and type kinds
(noir-lang/noir#5155)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* **frontend:** Where clause on impl
(noir-lang/noir#5320)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Function selector opcode in AVM
([#7244](AztecProtocol/aztec-packages#7244))
([dde47e9](AztecProtocol/aztec-packages@dde47e9))
* Implement comptime support for `array_len` builtin
(noir-lang/noir#5272)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Implement comptime support for `as_slice` builtin
(noir-lang/noir#5276)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Insert trait impls into the program from type annotations
(noir-lang/noir#5327)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Let `should_fail_with` check that the failure reason contains the
expected message (noir-lang/noir#5319)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Make macros operate on token streams instead of AST nodes
(noir-lang/noir#5301)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Private refunds
([#7226](AztecProtocol/aztec-packages#7226))
([6fafff6](AztecProtocol/aztec-packages@6fafff6))
* Remove `dep::` prefix (noir-lang/noir#4946)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Remove event selector in logs from public context
([#7192](AztecProtocol/aztec-packages#7192))
([646d45a](AztecProtocol/aztec-packages@646d45a))
* Rename struct-specific TypeDefinition -&gt; StructDefinition
(noir-lang/noir#5356)
([bb5cbab](AztecProtocol/aztec-packages@bb5cbab))
* Run `comptime` code from annotations on a type definition
(noir-lang/noir#5256)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Split storage access oracles
([#7237](AztecProtocol/aztec-packages#7237))
([51f7d65](AztecProtocol/aztec-packages@51f7d65))
* **stdlib:** Update stdlib to use explicit numeric generics
(noir-lang/noir#5306)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Store shared mutable hash
([#7169](AztecProtocol/aztec-packages#7169))
([868606e](AztecProtocol/aztec-packages@868606e))
* Sync from aztec-packages (noir-lang/noir#5242)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Sync from aztec-packages (noir-lang/noir#5340)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Sync from aztec-packages (noir-lang/noir#5347)
([eb9e9f6](AztecProtocol/aztec-packages@eb9e9f6))
* Sync from aztec-packages (noir-lang/noir#5377)
([bb5cbab](AztecProtocol/aztec-packages@bb5cbab))
* Unconstrained variants for event emission
([#7251](AztecProtocol/aztec-packages#7251))
([6d093e3](AztecProtocol/aztec-packages@6d093e3))
* Unify unencrypted log emission and decoding
([#7232](AztecProtocol/aztec-packages#7232))
([354dba2](AztecProtocol/aztec-packages@354dba2))
* Update rebuild script
([#7225](AztecProtocol/aztec-packages#7225))
([af59247](AztecProtocol/aztec-packages@af59247))
* Use runtime loops for brillig array initialization
(noir-lang/noir#5243)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Wonky rollups
([#7189](AztecProtocol/aztec-packages#7189))
([1de3746](AztecProtocol/aztec-packages@1de3746))


### Bug Fixes

* Add more thorough check for whether a type is valid when passing it
from constrained code to unconstrained code
(noir-lang/noir#5009)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Add support for nested arrays returned by oracles
(noir-lang/noir#5132)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Address compiler warnings coming from stdlib
(noir-lang/noir#5351)
([eb9e9f6](AztecProtocol/aztec-packages@eb9e9f6))
* Avoid duplicating constant arrays
(noir-lang/noir#5287)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Avoid panic in type system
(noir-lang/noir#5332)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Avoid unnecessarily splitting expressions with multiplication terms
with a shared term (noir-lang/noir#5291)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Benchmark prover e2e test with proving
([#7175](AztecProtocol/aztec-packages#7175))
([431c14c](AztecProtocol/aztec-packages@431c14c))
* Devnet deployment issues
([#7197](AztecProtocol/aztec-packages#7197))
([9cf4904](AztecProtocol/aztec-packages@9cf4904))
* Disable `if` optimization
(noir-lang/noir#5240)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* **docs:** Historical reference library updates
([#7166](AztecProtocol/aztec-packages#7166))
([b3409c4](AztecProtocol/aztec-packages@b3409c4))
* Don't benchmark the "prove" command as it doesn't exist anymore
(noir-lang/noir#5323)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Don't lazily elaborate functions
(noir-lang/noir#5282)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* **elaborator:** Fix duplicate methods error
(noir-lang/noir#5225)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* **elaborator:** Fix regression introduced by lazy-global changes
(noir-lang/noir#5223)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Error when a local function is called in a comptime context
(noir-lang/noir#5334)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Fix authwit package
([#7204](AztecProtocol/aztec-packages#7204))
([98ccd41](AztecProtocol/aztec-packages@98ccd41))
* Fix incorrect return type being applied to stdlib functions
`modulus_be_bytes()`, `modulus_be_bits()`, etc.
(noir-lang/noir#5278)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Fix tokenization of unquoted types in macros
(noir-lang/noir#5326)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Fix usage of `#[abi(tag)]` attribute with elaborator
(noir-lang/noir#5298)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Handle struct with nested arrays in oracle return values
(noir-lang/noir#5244)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Ignore calls to `Intrinsic::AsWitness` during brillig codegen
(noir-lang/noir#5350)
([eb9e9f6](AztecProtocol/aztec-packages@eb9e9f6))
* Implement generic functions in the interpreter
(noir-lang/noir#5330)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* **nargo_fmt:** Account for spaces before the generic list of a
function (noir-lang/noir#5303)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Replace panic in monomorphization with an error
(noir-lang/noir#5305)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Reran pil-&gt;cpp codegen & encode_and_encrypt_event_with_randomness
fix
([#7247](AztecProtocol/aztec-packages#7247))
([fa15a45](AztecProtocol/aztec-packages@fa15a45))
* Runtime brillig bigint id assignment
(noir-lang/noir#5369)
([bb5cbab](AztecProtocol/aztec-packages@bb5cbab))
* Skip emission of brillig calls which will never be executed
(noir-lang/noir#5314)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* TS LSP being slow
([#7181](AztecProtocol/aztec-packages#7181))
([e934e87](AztecProtocol/aztec-packages@e934e87))
* Update `in_contract` flag before handling function metadata in
elaborator (noir-lang/noir#5292)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Use proper serialization in `AbiValue`
(noir-lang/noir#5270)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))


### Miscellaneous

* `static_assert` error message fix and split into is-dynamic and
is-false (noir-lang/noir#5353)
([eb9e9f6](AztecProtocol/aztec-packages@eb9e9f6))
* Add back Pedersen blackbox functions (revert PR 5221)
(noir-lang/noir#5318)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Add log_hash as input in log emission in private context
([#7249](AztecProtocol/aztec-packages#7249))
([8b3dfe9](AztecProtocol/aztec-packages@8b3dfe9))
* Add no predicate to poseidon2
(noir-lang/noir#5252)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Add no-predicate to hash implementations
(noir-lang/noir#5253)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Add property tests for ABI encoding
(noir-lang/noir#5216)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Address TODO in `compat.nr`
(noir-lang/noir#5339)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* **avm-transpiler:** Better error messages
([#7217](AztecProtocol/aztec-packages#7217))
([27051ad](AztecProtocol/aztec-packages@27051ad))
* **avm:** Remove trailing minus zero in codegen
([#7185](AztecProtocol/aztec-packages#7185))
([f3c8166](AztecProtocol/aztec-packages@f3c8166))
* Avoid building contracts when producing gates report
([#7136](AztecProtocol/aztec-packages#7136))
([25507e6](AztecProtocol/aztec-packages@25507e6))
* Bump `bb` to 0.43.0 (noir-lang/noir#5321)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Bundle SSA Evaluator Options
(noir-lang/noir#5317)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* **ci:** Trigger a noir sync every morning at 8am
([#7280](AztecProtocol/aztec-packages#7280))
([412c016](AztecProtocol/aztec-packages@412c016))
* Copy across typo PR script from aztec-packages
(noir-lang/noir#5235)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Create separate crate just for noir artifacts
(noir-lang/noir#5162)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* **docs:** Fixing trailing slash issue
(noir-lang/noir#5233)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Fix examples (noir-lang/noir#5357)
([eb9e9f6](AztecProtocol/aztec-packages@eb9e9f6))
* Fix migration notes
([#7279](AztecProtocol/aztec-packages#7279))
([51d93eb](AztecProtocol/aztec-packages@51d93eb))
* Fix negative tests in AVM circuit for context input lookups
([#7261](AztecProtocol/aztec-packages#7261))
([ad2f654](AztecProtocol/aztec-packages@ad2f654))
* Fixing all relative paths
(noir-lang/noir#5220)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Generate PIL constants from via constants gen
([#7258](AztecProtocol/aztec-packages#7258))
([244ef7e](AztecProtocol/aztec-packages@244ef7e))
* Gets rid of unencrypted emit in private_context
([#7236](AztecProtocol/aztec-packages#7236))
([3e6d88e](AztecProtocol/aztec-packages@3e6d88e))
* Improve authwit comments/docs
([#7180](AztecProtocol/aztec-packages#7180))
([051ab9e](AztecProtocol/aztec-packages@051ab9e))
* Misc cleanup in simulator
([#7203](AztecProtocol/aztec-packages#7203))
([eb00830](AztecProtocol/aztec-packages@eb00830))
* Optimize the elaborator (noir-lang/noir#5230)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Parse macros (noir-lang/noir#5229)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Pedersen commitment in Noir
(noir-lang/noir#5221)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Pedersen hash in Noir (noir-lang/noir#5217)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Private tail circuits
([#7148](AztecProtocol/aztec-packages#7148))
([9e67e7d](AztecProtocol/aztec-packages@9e67e7d))
* Pull out change to expression splitting from sync PR
([#7215](AztecProtocol/aztec-packages#7215))
([b4f50a5](AztecProtocol/aztec-packages@b4f50a5))
* Pull out foreign call nested array changes
([#7216](AztecProtocol/aztec-packages#7216))
([1faaaf5](AztecProtocol/aztec-packages@1faaaf5))
* Pull out
noir-lang/noir[#5120](AztecProtocol/aztec-packages#5120)
([#7205](AztecProtocol/aztec-packages#7205))
([c5dc094](AztecProtocol/aztec-packages@c5dc094))
* Pull out pedersen generator builtin from sync PR
([#7210](AztecProtocol/aztec-packages#7210))
([412f02e](AztecProtocol/aztec-packages@412f02e))
* Pull out SSA changes from sync PR
([#7209](AztecProtocol/aztec-packages#7209))
([141e137](AztecProtocol/aztec-packages@141e137))
* Push code related to ABI gen into `noirc_driver`
(noir-lang/noir#5218)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Redo typo PR by dropbigfish
(noir-lang/noir#5234)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Refactor test case generation in build.rs
(noir-lang/noir#5280)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Release Noir(0.31.0) (noir-lang/noir#5166)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Remove `is_unconstrained_fn` field from elaborator
(noir-lang/noir#5335)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Remove 4738 ref
([#7254](AztecProtocol/aztec-packages#7254))
([97d997c](AztecProtocol/aztec-packages@97d997c))
* Remove a log file
([#7201](AztecProtocol/aztec-packages#7201))
([83bb218](AztecProtocol/aztec-packages@83bb218))
* Remove commented code
([#7231](AztecProtocol/aztec-packages#7231))
([2740d60](AztecProtocol/aztec-packages@2740d60))
* Remove panic for unimplemented trait dispatch
(noir-lang/noir#5329)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Replace `is_bn254` implementation to not rely on truncation of
literals (noir-lang/noir#5247)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Replace `regression_5202` with more manageably sized program
(noir-lang/noir#5345)
([eb9e9f6](AztecProtocol/aztec-packages@eb9e9f6))
* Replace cached `in_contract` with `in_contract()` method
(noir-lang/noir#5324)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Replace logical operators with bitwise in `DebugToString`
(noir-lang/noir#5236)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Replace relative paths to noir-protocol-circuits
([e83b07b](AztecProtocol/aztec-packages@e83b07b))
* Replace relative paths to noir-protocol-circuits
([eca8587](AztecProtocol/aztec-packages@eca8587))
* Replace relative paths to noir-protocol-circuits
([b9ddf43](AztecProtocol/aztec-packages@b9ddf43))
* Replace relative paths to noir-protocol-circuits
([6f817e8](AztecProtocol/aztec-packages@6f817e8))
* Replace relative paths to noir-protocol-circuits
([f9bf0a4](AztecProtocol/aztec-packages@f9bf0a4))
* Replicate
noir-lang/noir[#4946](AztecProtocol/aztec-packages#4946)
([#7202](AztecProtocol/aztec-packages#7202))
([b5c07d8](AztecProtocol/aztec-packages@b5c07d8))
* Simplify compilation flow to write to file immediately
(noir-lang/noir#5265)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Split off fuzzer, abi changes and `noirc_artifacts` from sync
([#7208](AztecProtocol/aztec-packages#7208))
([255d752](AztecProtocol/aztec-packages@255d752))
* Thread generics through ACIR/brillig gen
(noir-lang/noir#5120)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
* Use `push_err` more in elaborator
(noir-lang/noir#5336)
([f2abb4e](AztecProtocol/aztec-packages@f2abb4e))
* Use options.limit as upper limit for note-getter loop
([#7253](AztecProtocol/aztec-packages#7253))
([8ff669b](AztecProtocol/aztec-packages@8ff669b))
* Use prefix op_ for every instruction in avm_trace.hpp
([#7214](AztecProtocol/aztec-packages#7214))
([7ed7558](AztecProtocol/aztec-packages@7ed7558))
* Use the elaborator by default
(noir-lang/noir#5246)
([ed815a3](AztecProtocol/aztec-packages@ed815a3))
</details>

<details><summary>barretenberg: 0.45.0</summary>

##
[0.45.0](AztecProtocol/aztec-packages@barretenberg-v0.44.0...barretenberg-v0.45.0)
(2024-07-02)


### Features

* **avm:** Calldata gadget preliminaries
([#7227](AztecProtocol/aztec-packages#7227))
([79e8588](AztecProtocol/aztec-packages@79e8588))
* Constant Honk proof sizes
([#6954](AztecProtocol/aztec-packages#6954))
([17c8d3a](AztecProtocol/aztec-packages@17c8d3a))
* Function selector opcode in AVM
([#7244](AztecProtocol/aztec-packages#7244))
([dde47e9](AztecProtocol/aztec-packages@dde47e9))
* Update rebuild script
([#7225](AztecProtocol/aztec-packages#7225))
([af59247](AztecProtocol/aztec-packages@af59247))


### Bug Fixes

* Benchmark prover e2e test with proving
([#7175](AztecProtocol/aztec-packages#7175))
([431c14c](AztecProtocol/aztec-packages@431c14c))
* Reran pil-&gt;cpp codegen & encode_and_encrypt_event_with_randomness
fix
([#7247](AztecProtocol/aztec-packages#7247))
([fa15a45](AztecProtocol/aztec-packages@fa15a45))


### Miscellaneous

* **avm:** Remove trailing minus zero in codegen
([#7185](AztecProtocol/aztec-packages#7185))
([f3c8166](AztecProtocol/aztec-packages@f3c8166))
* Fix negative tests in AVM circuit for context input lookups
([#7261](AztecProtocol/aztec-packages#7261))
([ad2f654](AztecProtocol/aztec-packages@ad2f654))
* Generate PIL constants from via constants gen
([#7258](AztecProtocol/aztec-packages#7258))
([244ef7e](AztecProtocol/aztec-packages@244ef7e))
* Use prefix op_ for every instruction in avm_trace.hpp
([#7214](AztecProtocol/aztec-packages#7214))
([7ed7558](AztecProtocol/aztec-packages@7ed7558))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

Docs: explainer about macros
5 participants