Skip to content

feat!: init storage macro#4200

Merged
Thunkar merged 112 commits intomasterfrom
gj/init_storage_macro
Feb 2, 2024
Merged

feat!: init storage macro#4200
Thunkar merged 112 commits intomasterfrom
gj/init_storage_macro

Conversation

@Thunkar
Copy link
Contributor

@Thunkar Thunkar commented Jan 24, 2024

Closes: #3198, #2928

Requires #4135, which is blocked by noir-lang/noir#4124

Automatic storage initialization via aztec macro.

Full support of public and private state from dep::aztec::state_vars::*, including Maps (and nested Maps!)
Limited support for custom types (as long as they have a single serializable generic and their constructor is ::new(context, storage_slot).

Pending: better errors, code comments and some cleanup.

Hijacking my own comment for the explanation:

The idea behind this is that in 99% of cases, storage initialization (that is, the impl for a given struct Storage... is redundant, and the only need for its existence was assigning storage slots...which in turn were necessary because we didn't know how to serialize the data structures that were used in a given contract or how much space they used once serialized (relevant for the public state).

After #4135 is merged, both of those things don't have to be explicitly provided since we're using traits, so the aztec macro can infer the implementation of the Storage struct just by taking hints from the definition. An example:

    struct Storage {
        // MyAwesomeStuff implements Serialize<2>, so we assign it slot 1 (and remember that it will take 2 slots due to its size)
        public_var: PublicState<MyAwesomeSuff>, 
        // Right after the first one, assign it to slot: current_slot + previous_size = 3
        another_public_var: PublicState<MyAwesomeSuff>,
        // Private and Public state don't share slots since they "live" in different trees, but keeping the slot count simplifies implementation. 
        // Notes also implement Serialize<N>, but they only take up 1 slot anyways because of hashing, assign it slot 5
        a_singleton: Singleton<ANote>,
        // Maps derive slots via hashing, so we can assume they only "take" 1 slot. We assign it slot 6
        balances: Map<AztecAddress, Singleton<ANote>>,
        // Slot 7
        a_set: Set<ANote>,
        // Slot 8
        imm_singleton: ImmutableSingleton<ANote>,
        // Slot 9. 
        profiles: Map<AztecAddress, Map<Singleton<ANote>>>,
    }

We have all the info we need in the AST and HIR to build this automatically:

impl Storage {
    fn init(context: Context) -> Self {
        Storage {
            public_var: PublicState::new(context, 1), // No need for serialization methods, taken from the the trait impl
            another_public_var: PublicState::new(context, 3),
            a_singleton: Singleton::new(context, 5),
            // Map init lambda always takes the same form for known storage structs
            balances: Map::new(context, 6, |context, slot| { 
                Singleton::new(context, slot) 
            }),
            a_set: Set::new(context, 7),
            imm_singleton: ImmutableSingleton::new(context, 8),
            // A map of maps is just nesting lambdas, we can infer this too
            profiles: Map::new(context, 9, |context, slot| { 
                Map::new(context, slot, |context, slot| { 
                    Singleton::new(context, slot) 
                })
            })
        }
    }
}

...as long as we use "canonical" storage implementations. This means AStoragePrimitive<SomethingSerializable> and Map<SomethingWithToField, AStoragePrimitive<SomethingSerializable>>.

TLDR: define the Storage struct, in 99% of cases the macro takes care of the implementation!

Implementing custom storage will look just like it does know, the macro will skip automatic generation if it finds one.

@Thunkar Thunkar self-assigned this Jan 24, 2024
@Thunkar Thunkar changed the base branch from master to gj/serialize_deserialize_note-interface January 24, 2024 14:51
AztecBot pushed a commit that referenced this pull request Feb 8, 2024
refactor: cleanup of `abi.nr` in `aztec-nr` (#4473)
feat: Allow nested arrays and vectors in Brillig foreign calls (#4478)
feat: allow brillig to read arrays directly from memory (#4460)
feat(avm): back in avm context with macro - refactor context (#4438)
chore!: rename bigint_neg into bigint_sub (#4420)
chore: add bigint solver in ACVM and add a unit test for bigints in Noir (#4415)
feat!: Add expression width into acir (#4014)
feat: Add bit size to const opcode (#4385)
feat(aztec-nr): initial work for aztec public vm macro (#4400)
chore: surpress chained macro warning (#4396)
feat!: init storage macro (#4200)
chore(acir)!: Move `is_recursive` flag to be part of the circuit definition (#4221) [skip ci]
AztecBot pushed a commit that referenced this pull request Feb 8, 2024
refactor: cleanup of `abi.nr` in `aztec-nr` (#4473)
feat: Allow nested arrays and vectors in Brillig foreign calls (#4478)
feat: allow brillig to read arrays directly from memory (#4460)
feat(avm): back in avm context with macro - refactor context (#4438)
chore!: rename bigint_neg into bigint_sub (#4420)
chore: add bigint solver in ACVM and add a unit test for bigints in Noir (#4415)
feat!: Add expression width into acir (#4014)
feat: Add bit size to const opcode (#4385)
feat(aztec-nr): initial work for aztec public vm macro (#4400)
chore: surpress chained macro warning (#4396)
feat!: init storage macro (#4200)
chore(acir)!: Move `is_recursive` flag to be part of the circuit definition (#4221) [skip ci]
AztecBot pushed a commit that referenced this pull request Feb 8, 2024
refactor: cleanup of `abi.nr` in `aztec-nr` (#4473)
feat: Allow nested arrays and vectors in Brillig foreign calls (#4478)
feat: allow brillig to read arrays directly from memory (#4460)
feat(avm): back in avm context with macro - refactor context (#4438)
chore!: rename bigint_neg into bigint_sub (#4420)
chore: add bigint solver in ACVM and add a unit test for bigints in Noir (#4415)
feat!: Add expression width into acir (#4014)
feat: Add bit size to const opcode (#4385)
feat(aztec-nr): initial work for aztec public vm macro (#4400)
chore: surpress chained macro warning (#4396)
feat!: init storage macro (#4200)
chore(acir)!: Move `is_recursive` flag to be part of the circuit definition (#4221) [skip ci]
AztecBot pushed a commit that referenced this pull request Feb 8, 2024
refactor: cleanup of `abi.nr` in `aztec-nr` (#4473)
feat: Allow nested arrays and vectors in Brillig foreign calls (#4478)
feat: allow brillig to read arrays directly from memory (#4460)
feat(avm): back in avm context with macro - refactor context (#4438)
chore!: rename bigint_neg into bigint_sub (#4420)
chore: add bigint solver in ACVM and add a unit test for bigints in Noir (#4415)
feat!: Add expression width into acir (#4014)
feat: Add bit size to const opcode (#4385)
feat(aztec-nr): initial work for aztec public vm macro (#4400)
chore: surpress chained macro warning (#4396)
feat!: init storage macro (#4200)
chore(acir)!: Move `is_recursive` flag to be part of the circuit definition (#4221) [skip ci]
AztecBot pushed a commit to noir-lang/noir that referenced this pull request Feb 8, 2024
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)
AztecBot pushed a commit that referenced this pull request Feb 8, 2024
Example
refactor: cleanup of `abi.nr` in `aztec-nr` (#4473)
feat: Allow nested arrays and vectors in Brillig foreign calls (#4478)
feat: allow brillig to read arrays directly from memory (#4460)
feat(avm): back in avm context with macro - refactor context (#4438)
chore!: rename bigint_neg into bigint_sub (#4420)
chore: add bigint solver in ACVM and add a unit test for bigints in Noir (#4415)
feat!: Add expression width into acir (#4014)
feat: Add bit size to const opcode (#4385)
feat(aztec-nr): initial work for aztec public vm macro (#4400)
chore: surpress chained macro warning (#4396)
feat!: init storage macro (#4200)
chore(acir)!: Move `is_recursive` flag to be part of the circuit definition (#4221) [skip ci]
AztecBot pushed a commit to noir-lang/noir that referenced this pull request Feb 8, 2024
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)
AztecBot pushed a commit that referenced this pull request Feb 8, 2024
Example
refactor: cleanup of `abi.nr` in `aztec-nr` (#4473)
feat: Allow nested arrays and vectors in Brillig foreign calls (#4478)
feat: allow brillig to read arrays directly from memory (#4460)
feat(avm): back in avm context with macro - refactor context (#4438)
chore!: rename bigint_neg into bigint_sub (#4420)
chore: add bigint solver in ACVM and add a unit test for bigints in Noir (#4415)
feat!: Add expression width into acir (#4014)
feat: Add bit size to const opcode (#4385)
feat(aztec-nr): initial work for aztec public vm macro (#4400)
chore: surpress chained macro warning (#4396)
feat!: init storage macro (#4200)
chore(acir)!: Move `is_recursive` flag to be part of the circuit definition (#4221) [skip ci]
AztecBot pushed a commit to noir-lang/noir that referenced this pull request Feb 8, 2024
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)
AztecBot pushed a commit to noir-lang/noir that referenced this pull request Feb 8, 2024
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)
AztecBot pushed a commit that referenced this pull request Feb 8, 2024
Example
refactor: cleanup of `abi.nr` in `aztec-nr` (#4473)
feat: Allow nested arrays and vectors in Brillig foreign calls (#4478)
feat: allow brillig to read arrays directly from memory (#4460)
feat(avm): back in avm context with macro - refactor context (#4438)
chore!: rename bigint_neg into bigint_sub (#4420)
chore: add bigint solver in ACVM and add a unit test for bigints in Noir (#4415)
feat!: Add expression width into acir (#4014)
feat: Add bit size to const opcode (#4385)
feat(aztec-nr): initial work for aztec public vm macro (#4400)
chore: surpress chained macro warning (#4396)
feat!: init storage macro (#4200)
chore(acir)!: Move `is_recursive` flag to be part of the circuit definition (#4221) [skip ci]
github-merge-queue bot pushed a commit to noir-lang/noir that referenced this pull request Feb 8, 2024
BEGIN_COMMIT_OVERRIDE
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

---------

Signed-off-by: kevaundray <kevtheappdev@gmail.com>
Co-authored-by: ludamad <adam.domurad@gmail.com>
Co-authored-by: ludamad <adam@aztecprotocol.com>
Co-authored-by: kevaundray <kevtheappdev@gmail.com>
Co-authored-by: sirasistant <sirasistant@gmail.com>
Co-authored-by: Gregorio Juliana <gregojquiros@gmail.com>
Co-authored-by: Tom French <tom@tomfren.ch>
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
Co-authored-by: Charlie Lye <karl.lye@gmail.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: ledwards2225 <l.edwards.d@gmail.com>
Co-authored-by: ledwards2225 <98505400+ledwards2225@users.noreply.github.com>
Co-authored-by: Santiago Palladino <santiago@aztecprotocol.com>
Co-authored-by: James Zaki <james.zaki@proton.me>
Co-authored-by: guipublic <47281315+guipublic@users.noreply.github.com>
github-merge-queue bot pushed a commit to noir-lang/noir that referenced this pull request Feb 12, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>0.24.0</summary>

## [0.24.0](v0.23.0...v0.24.0)
(2024-02-12)


### ⚠ BREAKING CHANGES

* rename bigint_neg into bigint_sub
(AztecProtocol/aztec-packages#4420)
* Add expression width into acir
(AztecProtocol/aztec-packages#4014)
* init storage macro
(AztecProtocol/aztec-packages#4200)
* **acir:** Move `is_recursive` flag to be part of the circuit
definition (AztecProtocol/aztec-packages#4221)
* Sync commits from `aztec-packages`
([#4144](#4144))

### Features

* Add bit size to const opcode
(AztecProtocol/aztec-packages#4385)
([158c8ce](158c8ce))
* Add brillig array index check
([#4127](#4127))
([c29f85f](c29f85f))
* Add definitions for From and Into traits to Noir prelude
([#4169](#4169))
([4421ce4](4421ce4))
* Add expression width into acir
(AztecProtocol/aztec-packages#4014)
([158c8ce](158c8ce))
* Add instrumentation for tracking variables in debugging
([#4122](#4122))
([c58d691](c58d691))
* Add option to print monomorphized program
([#4119](#4119))
([80f7e29](80f7e29))
* Add support for overriding expression width
([#4117](#4117))
([c8026d5](c8026d5))
* Add warnings for usage of restricted bit sizes
([#4234](#4234))
([0ffc38b](0ffc38b))
* Allow bitshifts to be represented in SSA for brillig
([#4301](#4301))
([d86ff1a](d86ff1a))
* Allow brillig to read arrays directly from memory
(AztecProtocol/aztec-packages#4460)
([158c8ce](158c8ce))
* Allow globals to refer to any expression
([#4293](#4293))
([479330e](479330e))
* Allow nested arrays and vectors in Brillig foreign calls
(AztecProtocol/aztec-packages#4478)
([158c8ce](158c8ce))
* Allow variables and stack trace inspection in the debugger
([#4184](#4184))
([bf263fc](bf263fc))
* **avm:** Back in avm context with macro - refactor context
(AztecProtocol/aztec-packages#4438)
([158c8ce](158c8ce))
* **aztec-nr:** Initial work for aztec public vm macro
(AztecProtocol/aztec-packages#4400)
([158c8ce](158c8ce))
* Deallocate stack items at the instruction level
([#4339](#4339))
([8f024a8](8f024a8))
* Disable constraint bubbling pass
([#4131](#4131))
([9ba2de6](9ba2de6))
* Disable unused variable checks on low-level and oracle functions
([#4179](#4179))
([8f70e57](8f70e57))
* Evaluation of dynamic assert messages
([#4101](#4101))
([c284e01](c284e01))
* Improve Error Handling for Cargo in Bootstrap Script
([#4211](#4211))
([3a90849](3a90849))
* Init storage macro
(AztecProtocol/aztec-packages#4200)
([158c8ce](158c8ce))
* **lsp:** Goto type reference for Struct
([#4091](#4091))
([d56cac2](d56cac2))
* Move bounded_vec into the noir stdlib
([#4197](#4197))
([c50621f](c50621f))
* Multiply first to allow more ACIR gen optimizations
([#4201](#4201))
([882639d](882639d))
* Option expect method
([#4219](#4219))
([8e042f2](8e042f2))
* Perform constraints on uncasted values if they are the same type
([#4303](#4303))
([816fa85](816fa85))
* Remove predicate from `sort` intrinsic function
([#4228](#4228))
([d646243](d646243))
* Remove replacement of boolean range opcodes with `AssertZero` opcodes
([#4107](#4107))
([dac0e87](dac0e87))
* Replace bitwise ANDs used for truncation with `Instruction::Truncate`
([#4327](#4327))
([eb67ff6](eb67ff6))
* Separate compilation and expression narrowing in `nargo` interface
([#4100](#4100))
([62a4e37](62a4e37))
* Simplify all unsigned constant NOT instructions
([#4230](#4230))
([fab4a6e](fab4a6e))
* Sync commits from `aztec-packages`
([#4144](#4144))
([0205d3b](0205d3b))
* Use constraint information to perform constant folding
([#4060](#4060))
([9a4bf16](9a4bf16))


### Bug Fixes

* Accurate tracking of slice capacities across blocks
([#4240](#4240))
([7420dbb](7420dbb))
* Allow function calls in global definitions
([#4320](#4320))
([0dc205c](0dc205c))
* Allow performing bitwise NOT on unsigned integers
([#4229](#4229))
([b3ddf10](b3ddf10))
* Apply generic arguments from trait constraints before instantiating
identifiers ([#4121](#4121))
([eb6fc0f](eb6fc0f))
* Apply range constraints to return values from unconstrained functions
([#4217](#4217))
([3af2a89](3af2a89))
* Apply trait constraints from method calls
([#4152](#4152))
([68c5486](68c5486))
* Better errors for missing `fn` keyword
([#4154](#4154))
([057c208](057c208))
* Check for tests in all packages before failing due to an unsatisfied
test filter ([#4114](#4114))
([1107373](1107373))
* Clean error when attemping to return a slice from Brillig to ACIR
([#4280](#4280))
([bcad4ec](bcad4ec))
* Correct result when assigning shared arrays in unconstrained code
([#4210](#4210))
([bdd8a96](bdd8a96))
* **docs:** Codegen docs before cutting a new version
([#4183](#4183))
([2914310](2914310))
* Ensure that destination register is allocated when moving between
registers in brillig gen
([#4316](#4316))
([ca0a56e](ca0a56e))
* Ensure that unconstrained entrypoint functions don't generate
constraints ([#4292](#4292))
([fae4ead](fae4ead))
* From field with constant values
([#4226](#4226))
([593916b](593916b))
* **lsp:** Crash when file not in workspace
([#4146](#4146))
([cf7130f](cf7130f))
* **lsp:** Replace panics with errors
([#4209](#4209))
([26e9618](26e9618))
* Maintain correct type when simplifying `x ^ x`
([#4082](#4082))
([9d83c2b](9d83c2b))
* Message formatting for assert statement
([#4323](#4323))
([3972ead](3972ead))
* Prevent debugger crashing on circuits with no opcodes
([#4283](#4283))
([2e32845](2e32845))
* Prevent declarations of blackbox functions outside of the stdlib
([#4177](#4177))
([9fb6b09](9fb6b09))
* Remove panic from `init_log_level` in `acvm_js`
([#4195](#4195))
([2e26530](2e26530))
* Respect order in bubble up for redundant asserts
([#4109](#4109))
([189aa48](189aa48))
* Revert "correct result when assigning shared arrays" and added
regression test ([#4333](#4333))
([05e78b3](05e78b3))
* Save the data bus to the current function before generating others
([#4047](#4047))
([0a5bd4f](0a5bd4f))
* Simplify constant assert messages into `ConstrainError::Static`
([#4287](#4287))
([fd15052](fd15052))
* Ssa typing for array & slice indexes
([#4278](#4278))
([4074bab](4074bab))
* Ssa typing for assign_lvalue_index
([#4289](#4289))
([37f149c](37f149c))
* SSA typing for right shifts
([#4302](#4302))
([41ee1aa](41ee1aa))
* Ssa typing of make_offset
([#4277](#4277))
([e4378ee](e4378ee))
* Track graphs of item dependencies to find dependency cycles
([#4266](#4266))
([61eabf1](61eabf1))
* Type check ACIR mutable reference passed to brillig
([#4281](#4281))
([7e139de](7e139de))
* Update array method type signatures in the docs
([#4178](#4178))
([7c0a955](7c0a955))
* Zero out input to `to_radix` calls if inactive
([#4116](#4116))
([3f5bad3](3f5bad3))


### Miscellaneous Chores

* **acir:** Move `is_recursive` flag to be part of the circuit
definition (AztecProtocol/aztec-packages#4221)
([158c8ce](158c8ce))
* Rename bigint_neg into bigint_sub
(AztecProtocol/aztec-packages#4420)
([158c8ce](158c8ce))
</details>

<details><summary>0.40.0</summary>

## [0.40.0](v0.39.0...v0.40.0)
(2024-02-12)


### ⚠ BREAKING CHANGES

* rename bigint_neg into bigint_sub
(AztecProtocol/aztec-packages#4420)
* Add expression width into acir
(AztecProtocol/aztec-packages#4014)
* init storage macro
(AztecProtocol/aztec-packages#4200)
* **acir:** Move `is_recursive` flag to be part of the circuit
definition (AztecProtocol/aztec-packages#4221)
* Sync commits from `aztec-packages`
([#4144](#4144))
* Breaking changes from aztec-packages
([#3955](#3955))
* Rename Arithmetic opcode to AssertZero
([#3840](#3840))
* Remove unused methods on ACIR opcodes
([#3841](#3841))
* Remove partial backend feature
([#3805](#3805))

### Features

* Add bit size to const opcode
(AztecProtocol/aztec-packages#4385)
([158c8ce](158c8ce))
* Add expression width into acir
(AztecProtocol/aztec-packages#4014)
([158c8ce](158c8ce))
* Add instrumentation for tracking variables in debugging
([#4122](#4122))
([c58d691](c58d691))
* Add support for overriding expression width
([#4117](#4117))
([c8026d5](c8026d5))
* Allow brillig to read arrays directly from memory
(AztecProtocol/aztec-packages#4460)
([158c8ce](158c8ce))
* Allow nested arrays and vectors in Brillig foreign calls
(AztecProtocol/aztec-packages#4478)
([158c8ce](158c8ce))
* Allow variables and stack trace inspection in the debugger
([#4184](#4184))
([bf263fc](bf263fc))
* **avm:** Back in avm context with macro - refactor context
(AztecProtocol/aztec-packages#4438)
([158c8ce](158c8ce))
* **aztec-nr:** Initial work for aztec public vm macro
(AztecProtocol/aztec-packages#4400)
([158c8ce](158c8ce))
* Aztec-packages
([#3754](#3754))
([c043265](c043265))
* Breaking changes from aztec-packages
([#3955](#3955))
([5be049e](5be049e))
* Evaluation of dynamic assert messages
([#4101](#4101))
([c284e01](c284e01))
* Init storage macro
(AztecProtocol/aztec-packages#4200)
([158c8ce](158c8ce))
* Remove range constraints from witnesses which are constrained to be
constants ([#3928](#3928))
([afe9c7a](afe9c7a))
* Remove replacement of boolean range opcodes with `AssertZero` opcodes
([#4107](#4107))
([dac0e87](dac0e87))
* Speed up transformation of debug messages
([#3815](#3815))
([2a8af1e](2a8af1e))
* Sync `aztec-packages`
([#4011](#4011))
([fee2452](fee2452))
* Sync commits from `aztec-packages`
([#4068](#4068))
([7a8f3a3](7a8f3a3))
* Sync commits from `aztec-packages`
([#4144](#4144))
([0205d3b](0205d3b))


### Bug Fixes

* Deserialize odd length hex literals
([#3747](#3747))
([4000fb2](4000fb2))
* Remove panic from `init_log_level` in `acvm_js`
([#4195](#4195))
([2e26530](2e26530))
* Return error rather instead of panicking on invalid circuit
([#3976](#3976))
([67201bf](67201bf))


### Miscellaneous Chores

* **acir:** Move `is_recursive` flag to be part of the circuit
definition (AztecProtocol/aztec-packages#4221)
([158c8ce](158c8ce))
* Remove partial backend feature
([#3805](#3805))
([0383100](0383100))
* Remove unused methods on ACIR opcodes
([#3841](#3841))
([9e5d0e8](9e5d0e8))
* Rename Arithmetic opcode to AssertZero
([#3840](#3840))
([836f171](836f171))
* Rename bigint_neg into bigint_sub
(AztecProtocol/aztec-packages#4420)
([158c8ce](158c8ce))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
github-merge-queue bot pushed a commit to noir-lang/noir that referenced this pull request Feb 12, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>0.24.0</summary>

## [0.24.0](v0.23.0...v0.24.0)
(2024-02-12)


### ⚠ BREAKING CHANGES

* rename bigint_neg into bigint_sub
(AztecProtocol/aztec-packages#4420)
* Add expression width into acir
(AztecProtocol/aztec-packages#4014)
* init storage macro
(AztecProtocol/aztec-packages#4200)
* **acir:** Move `is_recursive` flag to be part of the circuit
definition (AztecProtocol/aztec-packages#4221)
* Sync commits from `aztec-packages`
([#4144](#4144))

### Features

* Add bit size to const opcode
(AztecProtocol/aztec-packages#4385)
([158c8ce](158c8ce))
* Add brillig array index check
([#4127](#4127))
([c29f85f](c29f85f))
* Add definitions for From and Into traits to Noir prelude
([#4169](#4169))
([4421ce4](4421ce4))
* Add expression width into acir
(AztecProtocol/aztec-packages#4014)
([158c8ce](158c8ce))
* Add instrumentation for tracking variables in debugging
([#4122](#4122))
([c58d691](c58d691))
* Add option to print monomorphized program
([#4119](#4119))
([80f7e29](80f7e29))
* Add support for overriding expression width
([#4117](#4117))
([c8026d5](c8026d5))
* Add warnings for usage of restricted bit sizes
([#4234](#4234))
([0ffc38b](0ffc38b))
* Allow bitshifts to be represented in SSA for brillig
([#4301](#4301))
([d86ff1a](d86ff1a))
* Allow brillig to read arrays directly from memory
(AztecProtocol/aztec-packages#4460)
([158c8ce](158c8ce))
* Allow globals to refer to any expression
([#4293](#4293))
([479330e](479330e))
* Allow nested arrays and vectors in Brillig foreign calls
(AztecProtocol/aztec-packages#4478)
([158c8ce](158c8ce))
* Allow variables and stack trace inspection in the debugger
([#4184](#4184))
([bf263fc](bf263fc))
* **avm:** Back in avm context with macro - refactor context
(AztecProtocol/aztec-packages#4438)
([158c8ce](158c8ce))
* **aztec-nr:** Initial work for aztec public vm macro
(AztecProtocol/aztec-packages#4400)
([158c8ce](158c8ce))
* Deallocate stack items at the instruction level
([#4339](#4339))
([8f024a8](8f024a8))
* Disable constraint bubbling pass
([#4131](#4131))
([9ba2de6](9ba2de6))
* Disable unused variable checks on low-level and oracle functions
([#4179](#4179))
([8f70e57](8f70e57))
* Evaluation of dynamic assert messages
([#4101](#4101))
([c284e01](c284e01))
* Improve Error Handling for Cargo in Bootstrap Script
([#4211](#4211))
([3a90849](3a90849))
* Init storage macro
(AztecProtocol/aztec-packages#4200)
([158c8ce](158c8ce))
* **lsp:** Goto type reference for Struct
([#4091](#4091))
([d56cac2](d56cac2))
* Move bounded_vec into the noir stdlib
([#4197](#4197))
([c50621f](c50621f))
* Multiply first to allow more ACIR gen optimizations
([#4201](#4201))
([882639d](882639d))
* Option expect method
([#4219](#4219))
([8e042f2](8e042f2))
* Perform constraints on uncasted values if they are the same type
([#4303](#4303))
([816fa85](816fa85))
* Remove predicate from `sort` intrinsic function
([#4228](#4228))
([d646243](d646243))
* Remove replacement of boolean range opcodes with `AssertZero` opcodes
([#4107](#4107))
([dac0e87](dac0e87))
* Replace bitwise ANDs used for truncation with `Instruction::Truncate`
([#4327](#4327))
([eb67ff6](eb67ff6))
* Replace modulo operations with truncations where possible
([#4329](#4329))
([70f2435](70f2435))
* Separate compilation and expression narrowing in `nargo` interface
([#4100](#4100))
([62a4e37](62a4e37))
* Simplify all unsigned constant NOT instructions
([#4230](#4230))
([fab4a6e](fab4a6e))
* Sync commits from `aztec-packages`
([#4144](#4144))
([0205d3b](0205d3b))
* Use constraint information to perform constant folding
([#4060](#4060))
([9a4bf16](9a4bf16))


### Bug Fixes

* Accurate tracking of slice capacities across blocks
([#4240](#4240))
([7420dbb](7420dbb))
* Allow function calls in global definitions
([#4320](#4320))
([0dc205c](0dc205c))
* Allow performing bitwise NOT on unsigned integers
([#4229](#4229))
([b3ddf10](b3ddf10))
* Apply generic arguments from trait constraints before instantiating
identifiers ([#4121](#4121))
([eb6fc0f](eb6fc0f))
* Apply range constraints to return values from unconstrained functions
([#4217](#4217))
([3af2a89](3af2a89))
* Apply trait constraints from method calls
([#4152](#4152))
([68c5486](68c5486))
* Better errors for missing `fn` keyword
([#4154](#4154))
([057c208](057c208))
* Check for tests in all packages before failing due to an unsatisfied
test filter ([#4114](#4114))
([1107373](1107373))
* Clean error when attemping to return a slice from Brillig to ACIR
([#4280](#4280))
([bcad4ec](bcad4ec))
* Correct result when assigning shared arrays in unconstrained code
([#4210](#4210))
([bdd8a96](bdd8a96))
* **docs:** Codegen docs before cutting a new version
([#4183](#4183))
([2914310](2914310))
* Ensure that destination register is allocated when moving between
registers in brillig gen
([#4316](#4316))
([ca0a56e](ca0a56e))
* Ensure that unconstrained entrypoint functions don't generate
constraints ([#4292](#4292))
([fae4ead](fae4ead))
* From field with constant values
([#4226](#4226))
([593916b](593916b))
* **lsp:** Crash when file not in workspace
([#4146](#4146))
([cf7130f](cf7130f))
* **lsp:** Replace panics with errors
([#4209](#4209))
([26e9618](26e9618))
* Maintain correct type when simplifying `x ^ x`
([#4082](#4082))
([9d83c2b](9d83c2b))
* Message formatting for assert statement
([#4323](#4323))
([3972ead](3972ead))
* Prevent debugger crashing on circuits with no opcodes
([#4283](#4283))
([2e32845](2e32845))
* Prevent declarations of blackbox functions outside of the stdlib
([#4177](#4177))
([9fb6b09](9fb6b09))
* Remove panic from `init_log_level` in `acvm_js`
([#4195](#4195))
([2e26530](2e26530))
* Respect order in bubble up for redundant asserts
([#4109](#4109))
([189aa48](189aa48))
* Revert "correct result when assigning shared arrays" and added
regression test ([#4333](#4333))
([05e78b3](05e78b3))
* Save the data bus to the current function before generating others
([#4047](#4047))
([0a5bd4f](0a5bd4f))
* Simplify constant assert messages into `ConstrainError::Static`
([#4287](#4287))
([fd15052](fd15052))
* Ssa typing for array & slice indexes
([#4278](#4278))
([4074bab](4074bab))
* Ssa typing for assign_lvalue_index
([#4289](#4289))
([37f149c](37f149c))
* SSA typing for right shifts
([#4302](#4302))
([41ee1aa](41ee1aa))
* Ssa typing of make_offset
([#4277](#4277))
([e4378ee](e4378ee))
* Track graphs of item dependencies to find dependency cycles
([#4266](#4266))
([61eabf1](61eabf1))
* Type check ACIR mutable reference passed to brillig
([#4281](#4281))
([7e139de](7e139de))
* Update array method type signatures in the docs
([#4178](#4178))
([7c0a955](7c0a955))
* Zero out input to `to_radix` calls if inactive
([#4116](#4116))
([3f5bad3](3f5bad3))


### Miscellaneous Chores

* **acir:** Move `is_recursive` flag to be part of the circuit
definition (AztecProtocol/aztec-packages#4221)
([158c8ce](158c8ce))
* Rename bigint_neg into bigint_sub
(AztecProtocol/aztec-packages#4420)
([158c8ce](158c8ce))
</details>

<details><summary>0.40.0</summary>

## [0.40.0](v0.39.0...v0.40.0)
(2024-02-12)


### ⚠ BREAKING CHANGES

* rename bigint_neg into bigint_sub
(AztecProtocol/aztec-packages#4420)
* Add expression width into acir
(AztecProtocol/aztec-packages#4014)
* init storage macro
(AztecProtocol/aztec-packages#4200)
* **acir:** Move `is_recursive` flag to be part of the circuit
definition (AztecProtocol/aztec-packages#4221)
* Sync commits from `aztec-packages`
([#4144](#4144))
* Breaking changes from aztec-packages
([#3955](#3955))
* Rename Arithmetic opcode to AssertZero
([#3840](#3840))
* Remove unused methods on ACIR opcodes
([#3841](#3841))
* Remove partial backend feature
([#3805](#3805))

### Features

* Add bit size to const opcode
(AztecProtocol/aztec-packages#4385)
([158c8ce](158c8ce))
* Add expression width into acir
(AztecProtocol/aztec-packages#4014)
([158c8ce](158c8ce))
* Add instrumentation for tracking variables in debugging
([#4122](#4122))
([c58d691](c58d691))
* Add support for overriding expression width
([#4117](#4117))
([c8026d5](c8026d5))
* Allow brillig to read arrays directly from memory
(AztecProtocol/aztec-packages#4460)
([158c8ce](158c8ce))
* Allow nested arrays and vectors in Brillig foreign calls
(AztecProtocol/aztec-packages#4478)
([158c8ce](158c8ce))
* Allow variables and stack trace inspection in the debugger
([#4184](#4184))
([bf263fc](bf263fc))
* **avm:** Back in avm context with macro - refactor context
(AztecProtocol/aztec-packages#4438)
([158c8ce](158c8ce))
* **aztec-nr:** Initial work for aztec public vm macro
(AztecProtocol/aztec-packages#4400)
([158c8ce](158c8ce))
* Aztec-packages
([#3754](#3754))
([c043265](c043265))
* Breaking changes from aztec-packages
([#3955](#3955))
([5be049e](5be049e))
* Evaluation of dynamic assert messages
([#4101](#4101))
([c284e01](c284e01))
* Init storage macro
(AztecProtocol/aztec-packages#4200)
([158c8ce](158c8ce))
* Remove range constraints from witnesses which are constrained to be
constants ([#3928](#3928))
([afe9c7a](afe9c7a))
* Remove replacement of boolean range opcodes with `AssertZero` opcodes
([#4107](#4107))
([dac0e87](dac0e87))
* Speed up transformation of debug messages
([#3815](#3815))
([2a8af1e](2a8af1e))
* Sync `aztec-packages`
([#4011](#4011))
([fee2452](fee2452))
* Sync commits from `aztec-packages`
([#4068](#4068))
([7a8f3a3](7a8f3a3))
* Sync commits from `aztec-packages`
([#4144](#4144))
([0205d3b](0205d3b))


### Bug Fixes

* Deserialize odd length hex literals
([#3747](#3747))
([4000fb2](4000fb2))
* Remove panic from `init_log_level` in `acvm_js`
([#4195](#4195))
([2e26530](2e26530))
* Return error rather instead of panicking on invalid circuit
([#3976](#3976))
([67201bf](67201bf))


### Miscellaneous Chores

* **acir:** Move `is_recursive` flag to be part of the circuit
definition (AztecProtocol/aztec-packages#4221)
([158c8ce](158c8ce))
* Remove partial backend feature
([#3805](#3805))
([0383100](0383100))
* Remove unused methods on ACIR opcodes
([#3841](#3841))
([9e5d0e8](9e5d0e8))
* Rename Arithmetic opcode to AssertZero
([#3840](#3840))
([836f171](836f171))
* Rename bigint_neg into bigint_sub
(AztecProtocol/aztec-packages#4420)
([158c8ce](158c8ce))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
michaelelliot pushed a commit to Swoir/noir_rs that referenced this pull request Feb 28, 2024
Closes: AztecProtocol#3198,
AztecProtocol#2928

~~Requires AztecProtocol#4135,
which is blocked by noir-lang/noir#4124

Automatic storage initialization via aztec macro. 

Full support of public and private state from
`dep::aztec::state_vars::*`, including Maps (and nested Maps!)
Limited support for custom types (as long as they have a single
serializable generic and their constructor is `::new(context,
storage_slot`).

~~Pending: better errors, code comments and some cleanup.~~

Hijacking my own
[comment](AztecProtocol#4200 (comment))
for the explanation:

The idea behind this is that in 99% of cases, storage initialization
(that is, the `impl` for a given `struct Storage...` is redundant, and
the only need for its existence was assigning storage slots...which in
turn were necessary because we didn't know how to serialize the data
structures that were used in a given contract or how much space they
used once serialized (relevant for the public state).

After AztecProtocol#4135 is
merged, both of those things don't have to be explicitly provided since
we're using traits, so the aztec macro can infer the implementation of
the Storage struct just by taking hints from the definition. An example:

```rust
    struct Storage {
        // MyAwesomeStuff implements Serialize<2>, so we assign it slot 1 (and remember that it will take 2 slots due to its size)
        public_var: PublicState<MyAwesomeSuff>, 
        // Right after the first one, assign it to slot: current_slot + previous_size = 3
        another_public_var: PublicState<MyAwesomeSuff>,
        // Private and Public state don't share slots since they "live" in different trees, but keeping the slot count simplifies implementation. 
        // Notes also implement Serialize<N>, but they only take up 1 slot anyways because of hashing, assign it slot 5
        a_singleton: Singleton<ANote>,
        // Maps derive slots via hashing, so we can assume they only "take" 1 slot. We assign it slot 6
        balances: Map<AztecAddress, Singleton<ANote>>,
        // Slot 7
        a_set: Set<ANote>,
        // Slot 8
        imm_singleton: ImmutableSingleton<ANote>,
        // Slot 9. 
        profiles: Map<AztecAddress, Map<Singleton<ANote>>>,
    }

```

We have all the info we need in the AST and HIR to build this
automatically:

```rust
impl Storage {
    fn init(context: Context) -> Self {
        Storage {
            public_var: PublicState::new(context, 1), // No need for serialization methods, taken from the the trait impl
            another_public_var: PublicState::new(context, 3),
            a_singleton: Singleton::new(context, 5),
            // Map init lambda always takes the same form for known storage structs
            balances: Map::new(context, 6, |context, slot| { 
                Singleton::new(context, slot) 
            }),
            a_set: Set::new(context, 7),
            imm_singleton: ImmutableSingleton::new(context, 8),
            // A map of maps is just nesting lambdas, we can infer this too
            profiles: Map::new(context, 9, |context, slot| { 
                Map::new(context, slot, |context, slot| { 
                    Singleton::new(context, slot) 
                })
            })
        }
    }
}

```

...as long as we use "canonical" storage implementations. This means
`AStoragePrimitive<SomethingSerializable>` and
`Map<SomethingWithToField, AStoragePrimitive<SomethingSerializable>>`.

**TLDR:** define the Storage struct, in 99% of cases the macro takes
care of the implementation!

Implementing custom storage will look just like it does know, the macro
will skip automatic generation if it finds one.

---------

Co-authored-by: sirasistant <sirasistant@gmail.com>
michaelelliot pushed a commit to Swoir/noir_rs that referenced this pull request Feb 28, 2024
This uses the storage slot getter introduced in
AztecProtocol#4200 to remove some
intances were we were still hardcoding storage slot values. I did not
find any other such cases.
michaelelliot pushed a commit to Swoir/noir_rs that referenced this pull request Feb 28, 2024
🤖 I have created a release *beep* *boop*
---


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

##
[0.22.0](AztecProtocol/aztec-packages@aztec-packages-v0.21.0...aztec-packages-v0.22.0)
(2024-02-06)


### ⚠ BREAKING CHANGES

* rename bigint_neg into bigint_sub
([AztecProtocol#4420](AztecProtocol#4420))
* Add expression width into acir
([AztecProtocol#4014](AztecProtocol#4014))
* Use NoteSerialize and NoteDeserialize traits for note specific
serialization
([AztecProtocol#4383](AztecProtocol#4383))
* Unencrypted logs are not strings
([AztecProtocol#4392](AztecProtocol#4392))
* init storage macro
([AztecProtocol#4200](AztecProtocol#4200))
* **acir:** Move `is_recursive` flag to be part of the circuit
definition
([AztecProtocol#4221](AztecProtocol#4221))
* introduce compute_note_hash_for_(consumption/insertion)
([AztecProtocol#4344](AztecProtocol#4344))
* replace Note::compute_note_hash with Note::compute_note_content_hash
([AztecProtocol#4342](AztecProtocol#4342))
* Include contract class id in deployment info
([AztecProtocol#4223](AztecProtocol#4223))
* Serialize, Deserialize and NoteInterface as Traits
([AztecProtocol#4135](AztecProtocol#4135))

### Features

* Add aztec node to client execution and nuke state info provider
[AztecProtocol#4320](AztecProtocol#4320)
([AztecProtocol#4401](AztecProtocol#4401))
([2dec0cc](AztecProtocol@2dec0cc))
* Add bit size to const opcode
([AztecProtocol#4385](AztecProtocol#4385))
([b2a000e](AztecProtocol@b2a000e))
* Add expression width into acir
([AztecProtocol#4014](AztecProtocol#4014))
([f09e8fc](AztecProtocol@f09e8fc))
* Add meta_hwm to PrivateCircuitPublicInputs
([AztecProtocol#4341](AztecProtocol#4341))
([4f248b5](AztecProtocol@4f248b5))
* Add poseidon2 hashing to native transcript
([AztecProtocol#3718](AztecProtocol#3718))
([afcfa71](AztecProtocol@afcfa71))
* Adding slitherin detectors
([AztecProtocol#4246](AztecProtocol#4246))
([7cdc186](AztecProtocol@7cdc186))
* Allow using of current block in inclusion proofs
([AztecProtocol#4285](AztecProtocol#4285))
([728c5ac](AztecProtocol@728c5ac)),
closes
[AztecProtocol#4274](AztecProtocol#4274)
* **avm-transpiler:** Brillig to AVM transpiler
([AztecProtocol#4227](AztecProtocol#4227))
([c366c6e](AztecProtocol@c366c6e))
* **avm:** Add command to call avm proving in bb binary
([AztecProtocol#4369](AztecProtocol#4369))
([4f6d607](AztecProtocol@4f6d607)),
closes
[AztecProtocol#4039](AztecProtocol#4039)
* **avm:** Add revert tracking to the journal
([AztecProtocol#4349](AztecProtocol#4349))
([1615803](AztecProtocol@1615803))
* **avm:** Back in avm context with macro - refactor context
([AztecProtocol#4438](AztecProtocol#4438))
([ccf9b17](AztecProtocol@ccf9b17))
* **avm:** Complete SET instruction
([AztecProtocol#4378](AztecProtocol#4378))
([013891f](AztecProtocol@013891f))
* **avm:** Implement avm state getter opcodes within noir contracts
([AztecProtocol#4402](AztecProtocol#4402))
([9f2a6eb](AztecProtocol@9f2a6eb))
* **avm:** Implement serialization for all existing operations
([AztecProtocol#4338](AztecProtocol#4338))
([13e0683](AztecProtocol@13e0683))
* **avm:** Keep history of reads and writes in journal
([AztecProtocol#4315](AztecProtocol#4315))
([cdf1baf](AztecProtocol@cdf1baf))
* **aztec-nr:** Initial work for aztec public vm macro
([AztecProtocol#4400](AztecProtocol#4400))
([0024590](AztecProtocol@0024590))
* **bb:** Wasmtime and remote benchmarking
([AztecProtocol#4204](AztecProtocol#4204))
([fd27808](AztecProtocol@fd27808))
* Contract class registerer contract
([AztecProtocol#4403](AztecProtocol#4403))
([d953090](AztecProtocol@d953090)),
closes
[AztecProtocol#4069](AztecProtocol#4069)
[AztecProtocol#4070](AztecProtocol#4070)
* Crude stable var implementation
([AztecProtocol#4289](AztecProtocol#4289))
([5f9eee4](AztecProtocol@5f9eee4))
* **docs:** Docs deeper dive into unconstrained functions
([AztecProtocol#4233](AztecProtocol#4233))
([6af548e](AztecProtocol@6af548e))
* Emit single functions from class registerer
([AztecProtocol#4429](AztecProtocol#4429))
([19e03ad](AztecProtocol@19e03ad)),
closes
[AztecProtocol#4427](AztecProtocol#4427)
* Extend Historical Access APIs
[AztecProtocol#4179](AztecProtocol#4179)
([AztecProtocol#4375](AztecProtocol#4375))
([c918d8d](AztecProtocol@c918d8d))
* Folding `GoblinUltra` instances in ProtoGalaxy
([AztecProtocol#4340](AztecProtocol#4340))
([8569e7c](AztecProtocol@8569e7c))
* Hashing output of `serialize()` in noir + more tests
([AztecProtocol#4365](AztecProtocol#4365))
([5a71bb9](AztecProtocol@5a71bb9))
* Implementation for bigint opcodes
([AztecProtocol#4288](AztecProtocol#4288))
([b61dace](AztecProtocol@b61dace))
* Improve ivc bench
([AztecProtocol#4242](AztecProtocol#4242))
([9d28354](AztecProtocol@9d28354))
* Include contract class id in deployment info
([AztecProtocol#4223](AztecProtocol#4223))
([0ed4126](AztecProtocol@0ed4126)),
closes
[AztecProtocol#4054](AztecProtocol#4054)
* Init storage macro
([AztecProtocol#4200](AztecProtocol#4200))
([11d9697](AztecProtocol@11d9697))
* Memory only brillig
([AztecProtocol#4215](AztecProtocol#4215))
([018177b](AztecProtocol@018177b))
* Nullified note retrieval in get_notes and view_notes
([AztecProtocol#4238](AztecProtocol#4238))
([8d02eb7](AztecProtocol@8d02eb7))
* Private calls and initialization of undeployed contracts
([AztecProtocol#4362](AztecProtocol#4362))
([f31c181](AztecProtocol@f31c181)),
closes
[AztecProtocol#4057](AztecProtocol#4057)
[AztecProtocol#4058](AztecProtocol#4058)
[AztecProtocol#4059](AztecProtocol#4059)
* Sequencer processes transactions in phases
([AztecProtocol#4345](AztecProtocol#4345))
([78cc709](AztecProtocol@78cc709))
* Unencrypted logs are not strings
([AztecProtocol#4392](AztecProtocol#4392))
([25a7ea7](AztecProtocol@25a7ea7))
* Verify function against contract class id in private kernel
([AztecProtocol#4337](AztecProtocol#4337))
([e1d832d](AztecProtocol@e1d832d)),
closes
[AztecProtocol#4056](AztecProtocol#4056)


### Bug Fixes

* **avm-transpiler:** Avm-transpiler bootstrap by tying down rust
version
([AztecProtocol#4347](AztecProtocol#4347))
([09d0730](AztecProtocol@09d0730))
* **avm-transpiler:** Bump rust toolchain version for transpiler
([AztecProtocol#4356](AztecProtocol#4356))
([75e30b9](AztecProtocol@75e30b9))
* **avm:** Fix SendL2ToL1Message implementation
([AztecProtocol#4367](AztecProtocol#4367))
([ee560c3](AztecProtocol@ee560c3))
* Aztec binary fixes
([AztecProtocol#4273](AztecProtocol#4273))
([84e1f7d](AztecProtocol@84e1f7d))
* Bb build
([AztecProtocol#4317](AztecProtocol#4317))
([82f5f03](AztecProtocol@82f5f03))
* Load contract artifact from json
([AztecProtocol#4352](AztecProtocol#4352))
([47a0a79](AztecProtocol@47a0a79))
* Mac build
([AztecProtocol#4336](AztecProtocol#4336))
([aeb4cf0](AztecProtocol@aeb4cf0))
* **noir-contracts:** Disable transpilation for now
([AztecProtocol#4372](AztecProtocol#4372))
([37662b7](AztecProtocol@37662b7))
* Nr codegen to use new protocol types path
([AztecProtocol#4353](AztecProtocol#4353))
([84e63b1](AztecProtocol@84e63b1)),
closes
[AztecProtocol#4193](AztecProtocol#4193)
* Relative LogFn import
([AztecProtocol#4328](AztecProtocol#4328))
([1faead5](AztecProtocol@1faead5))
* Release the size of goblin translator
([AztecProtocol#4259](AztecProtocol#4259))
([6e1d958](AztecProtocol@6e1d958))
* Transpiler build
([AztecProtocol#4386](AztecProtocol#4386))
([032ddc5](AztecProtocol@032ddc5))


### Miscellaneous

* `PublicCircuitPublicInputs` and `PrivateCircuitPublicInputs` cleanup
([AztecProtocol#4360](AztecProtocol#4360))
([b92d690](AztecProtocol@b92d690))
* `toFields()`/`fromFields(...)` methods in more classes
([AztecProtocol#4335](AztecProtocol#4335))
([433b9eb](AztecProtocol@433b9eb))
* **acir:** Move `is_recursive` flag to be part of the circuit
definition
([AztecProtocol#4221](AztecProtocol#4221))
([9c965a7](AztecProtocol@9c965a7))
* Add bigint solver in ACVM and add a unit test for bigints in Noir
([AztecProtocol#4415](AztecProtocol#4415))
([e4a2fe9](AztecProtocol@e4a2fe9))
* Add bootstrap_cache for avm-transpiler
([AztecProtocol#4357](AztecProtocol#4357))
([bfebebb](AztecProtocol@bfebebb))
* Add disclaimer
([AztecProtocol#4393](AztecProtocol#4393))
([6895f52](AztecProtocol@6895f52))
* Add migration note for serialization change
([AztecProtocol#4414](AztecProtocol#4414))
([968a3a0](AztecProtocol@968a3a0))
* **avm:** Make interpreter a function not a class
([AztecProtocol#4272](AztecProtocol#4272))
([14e8c5c](AztecProtocol@14e8c5c))
* **avm:** Refactor AVM Simulator and fix issues
([AztecProtocol#4424](AztecProtocol#4424))
([a6179bd](AztecProtocol@a6179bd))
* Call stack item cleanup
([AztecProtocol#4381](AztecProtocol#4381))
([341b0a1](AztecProtocol@341b0a1))
* Check loading Nargo artifacts works in the cli
([AztecProtocol#4355](AztecProtocol#4355))
([43b58b3](AztecProtocol@43b58b3))
* Cleanup + various doc improvements
([AztecProtocol#4282](AztecProtocol#4282))
([648229c](AztecProtocol@648229c)),
closes
[AztecProtocol#4264](AztecProtocol#4264)
* Collapse bb::honk
([AztecProtocol#4318](AztecProtocol#4318))
([5853af4](AztecProtocol@5853af4))
* Consistent naming of serialization method
([AztecProtocol#4379](AztecProtocol#4379))
([148d5dc](AztecProtocol@148d5dc))
* Do not run forge fmt because not everyone has forge installed
([AztecProtocol#4430](AztecProtocol#4430))
([ecb6c3f](AztecProtocol@ecb6c3f))
* **docs:** Update broken link ref in slow_updates_tree.md
([AztecProtocol#4339](AztecProtocol#4339))
([2599d7f](AztecProtocol@2599d7f))
* Eth address tech debt cleanup
([AztecProtocol#4442](AztecProtocol#4442))
([153989f](AztecProtocol@153989f))
* Extract merge from UC and simplify
([AztecProtocol#4343](AztecProtocol#4343))
([54fd794](AztecProtocol@54fd794))
* Fix bb wasm build when using remote cache
([AztecProtocol#4397](AztecProtocol#4397))
([14e57cb](AztecProtocol@14e57cb))
* Fix clippy warnings in `avm-transpiler`
([AztecProtocol#4416](AztecProtocol#4416))
([e54ecd2](AztecProtocol@e54ecd2))
* Format l1-contracts after generating constants
([AztecProtocol#4448](AztecProtocol#4448))
([de11994](AztecProtocol@de11994))
* Git subrepo commit (merge) noir
([AztecProtocol#4321](AztecProtocol#4321))
([348d18a](AztecProtocol@348d18a))
* Git subrepo pull (merge) noir
([AztecProtocol#4331](AztecProtocol#4331))
([683f782](AztecProtocol@683f782))
* Implementing `deserialize()` in Noir structs
([AztecProtocol#4384](AztecProtocol#4384))
([e63bbae](AztecProtocol@e63bbae))
* Introduce compute_note_hash_for_(consumption/insertion)
([AztecProtocol#4344](AztecProtocol#4344))
([26a0d49](AztecProtocol@26a0d49))
* Optimize prove_note_validity
[AztecProtocol#4418](AztecProtocol#4418)
([AztecProtocol#4426](AztecProtocol#4426))
([4de2540](AztecProtocol@4de2540))
* Poseidon2 hash uses span instead of vector
([AztecProtocol#4003](AztecProtocol#4003))
([f63e7a9](AztecProtocol@f63e7a9))
* Reenable private kernel function tree checks
([AztecProtocol#4358](AztecProtocol#4358))
([e7db0da](AztecProtocol@e7db0da))
* Remove hardcoded storage slot values
([AztecProtocol#4398](AztecProtocol#4398))
([d2294a4](AztecProtocol@d2294a4))
* Rename bigint_neg into bigint_sub
([AztecProtocol#4420](AztecProtocol#4420))
([57824fe](AztecProtocol@57824fe))
* Replace Note::compute_note_hash with Note::compute_note_content_hash
([AztecProtocol#4342](AztecProtocol#4342))
([8368659](AztecProtocol@8368659))
* Replace relative paths to noir-protocol-circuits
([23de650](AztecProtocol@23de650))
* Replace relative paths to noir-protocol-circuits
([b8d427f](AztecProtocol@b8d427f))
* Replace relative paths to noir-protocol-circuits
([113dec1](AztecProtocol@113dec1))
* Replace relative paths to noir-protocol-circuits
([a79093b](AztecProtocol@a79093b))
* Replace relative paths to noir-protocol-circuits
([808b4eb](AztecProtocol@808b4eb))
* Serialize, Deserialize and NoteInterface as Traits
([AztecProtocol#4135](AztecProtocol#4135))
([9e6605c](AztecProtocol@9e6605c))
* Simpler noir sync
([AztecProtocol#4376](AztecProtocol#4376))
([665b35e](AztecProtocol@665b35e))
* Surpress chained macro warning
([AztecProtocol#4396](AztecProtocol#4396))
([5e9c790](AztecProtocol@5e9c790))
* Switch to macos-14 for m1 runners
([AztecProtocol#3456](AztecProtocol#3456))
([ca5b6f8](AztecProtocol@ca5b6f8))
* Testing `toFields()` length
([AztecProtocol#4364](AztecProtocol#4364))
([5d3fce3](AztecProtocol@5d3fce3))
* Typing contents of `MessageLoadOracleInputs`
([AztecProtocol#4351](AztecProtocol#4351))
([433babd](AztecProtocol@433babd))
* Update docs on comparators
([AztecProtocol#4281](AztecProtocol#4281))
([cc2ce9c](AztecProtocol@cc2ce9c))
* Updating block hash to be header.hash()
([AztecProtocol#4286](AztecProtocol#4286))
([d4125e1](AztecProtocol@d4125e1))
* Use NoteSerialize and NoteDeserialize traits for note specific
serialization
([AztecProtocol#4383](AztecProtocol#4383))
([14dd0b8](AztecProtocol@14dd0b8))


### Documentation

* Add simple api description for note_getter_options.status
([AztecProtocol#4329](AztecProtocol#4329))
([cc17afe](AztecProtocol@cc17afe))
* Document stable public state usage
([AztecProtocol#4324](AztecProtocol#4324))
([13f709b](AztecProtocol@13f709b)),
closes
[AztecProtocol#4325](AztecProtocol#4325)
* Minor quickstart fixes
([AztecProtocol#4330](AztecProtocol#4330))
([f85a870](AztecProtocol@f85a870))
* Update contract deployment section in YP
([AztecProtocol#4290](AztecProtocol#4290))
([e99a882](AztecProtocol@e99a882))
* **yp:** AVM circuit - user memory section
([AztecProtocol#4323](AztecProtocol#4323))
([8928fb1](AztecProtocol@8928fb1)),
closes
[AztecProtocol#4043](AztecProtocol#4043)
</details>

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

##
[0.22.0](AztecProtocol/aztec-packages@barretenberg.js-v0.21.0...barretenberg.js-v0.22.0)
(2024-02-06)


### ⚠ BREAKING CHANGES

* **acir:** Move `is_recursive` flag to be part of the circuit
definition
([AztecProtocol#4221](AztecProtocol#4221))

### Miscellaneous

* **acir:** Move `is_recursive` flag to be part of the circuit
definition
([AztecProtocol#4221](AztecProtocol#4221))
([9c965a7](AztecProtocol@9c965a7))
</details>

<details><summary>barretenberg: 0.22.0</summary>

##
[0.22.0](AztecProtocol/aztec-packages@barretenberg-v0.21.0...barretenberg-v0.22.0)
(2024-02-06)


### ⚠ BREAKING CHANGES

* rename bigint_neg into bigint_sub
([AztecProtocol#4420](AztecProtocol#4420))
* Add expression width into acir
([AztecProtocol#4014](AztecProtocol#4014))
* **acir:** Move `is_recursive` flag to be part of the circuit
definition
([AztecProtocol#4221](AztecProtocol#4221))

### Features

* Add bit size to const opcode
([AztecProtocol#4385](AztecProtocol#4385))
([b2a000e](AztecProtocol@b2a000e))
* Add expression width into acir
([AztecProtocol#4014](AztecProtocol#4014))
([f09e8fc](AztecProtocol@f09e8fc))
* Add poseidon2 hashing to native transcript
([AztecProtocol#3718](AztecProtocol#3718))
([afcfa71](AztecProtocol@afcfa71))
* **avm:** Add command to call avm proving in bb binary
([AztecProtocol#4369](AztecProtocol#4369))
([4f6d607](AztecProtocol@4f6d607)),
closes
[AztecProtocol#4039](AztecProtocol#4039)
* **avm:** Back in avm context with macro - refactor context
([AztecProtocol#4438](AztecProtocol#4438))
([ccf9b17](AztecProtocol@ccf9b17))
* **bb:** Wasmtime and remote benchmarking
([AztecProtocol#4204](AztecProtocol#4204))
([fd27808](AztecProtocol@fd27808))
* Folding `GoblinUltra` instances in ProtoGalaxy
([AztecProtocol#4340](AztecProtocol#4340))
([8569e7c](AztecProtocol@8569e7c))
* Implementation for bigint opcodes
([AztecProtocol#4288](AztecProtocol#4288))
([b61dace](AztecProtocol@b61dace))
* Improve ivc bench
([AztecProtocol#4242](AztecProtocol#4242))
([9d28354](AztecProtocol@9d28354))
* Memory only brillig
([AztecProtocol#4215](AztecProtocol#4215))
([018177b](AztecProtocol@018177b))


### Bug Fixes

* Bb build
([AztecProtocol#4317](AztecProtocol#4317))
([82f5f03](AztecProtocol@82f5f03))
* Mac build
([AztecProtocol#4336](AztecProtocol#4336))
([aeb4cf0](AztecProtocol@aeb4cf0))
* Release the size of goblin translator
([AztecProtocol#4259](AztecProtocol#4259))
([6e1d958](AztecProtocol@6e1d958))


### Miscellaneous

* **acir:** Move `is_recursive` flag to be part of the circuit
definition
([AztecProtocol#4221](AztecProtocol#4221))
([9c965a7](AztecProtocol@9c965a7))
* Collapse bb::honk
([AztecProtocol#4318](AztecProtocol#4318))
([5853af4](AztecProtocol@5853af4))
* Extract merge from UC and simplify
([AztecProtocol#4343](AztecProtocol#4343))
([54fd794](AztecProtocol@54fd794))
* Fix bb wasm build when using remote cache
([AztecProtocol#4397](AztecProtocol#4397))
([14e57cb](AztecProtocol@14e57cb))
* Poseidon2 hash uses span instead of vector
([AztecProtocol#4003](AztecProtocol#4003))
([f63e7a9](AztecProtocol@f63e7a9))
* Rename bigint_neg into bigint_sub
([AztecProtocol#4420](AztecProtocol#4420))
([57824fe](AztecProtocol@57824fe))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
michaelelliot pushed a commit to Swoir/noir_rs that referenced this pull request Feb 28, 2024
feat: Allow nested arrays and vectors in Brillig foreign calls (AztecProtocol#4478)
feat: allow brillig to read arrays directly from memory (AztecProtocol#4460)
feat(avm): back in avm context with macro - refactor context (AztecProtocol#4438)
chore!: rename bigint_neg into bigint_sub (AztecProtocol#4420)
chore: add bigint solver in ACVM and add a unit test for bigints in Noir (AztecProtocol#4415)
feat!: Add expression width into acir (AztecProtocol#4014)
feat: Add bit size to const opcode (AztecProtocol#4385)
feat(aztec-nr): initial work for aztec public vm macro (AztecProtocol#4400)
chore: surpress chained macro warning (AztecProtocol#4396)
feat!: init storage macro (AztecProtocol#4200)
chore(acir)!: Move `is_recursive` flag to be part of the circuit definition (AztecProtocol#4221) [skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

Abstract away storage slots?

7 participants