Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
50d1bf9
feat: richer EphemeralArray and TransientArray APIs
mverzilli Jun 10, 2026
fe86aae
refactor: unify EphemeralArray and TransientArray over OracleArray
mverzilli Jun 10, 2026
f751057
refactor: share OracleArray test bodies across backends
mverzilli Jun 10, 2026
0b346bf
feat: empty_at for transient arrays
mverzilli Jun 10, 2026
0f9f79f
feat: store/load/delete for ephemeral arrays, symmetric array APIs
mverzilli Jun 10, 2026
c4857f9
refactor: generate per-backend OracleArray tests with a comptime macro
mverzilli Jun 10, 2026
7413220
refactor: single parameterized oracle_array_tests macro
mverzilli Jun 10, 2026
d49fc3f
refactor: should_fail_ prefix for failing oracle array checks
mverzilli Jun 10, 2026
eb07d6c
Merge branch 'merge-train/fairies-v5' into martin/richer-ephemeral-an…
mverzilli Jun 10, 2026
7845f7b
refactor(aztec-nr): rename oracle::ephemeral module to ephemeral_oracles
mverzilli Jun 11, 2026
b5948b0
refactor(aztec-nr): rename oracle::transient module to transient_oracles
mverzilli Jun 11, 2026
62ad854
refactor(aztec-nr): rename OracleArray struct to UnconstrainedArray
mverzilli Jun 11, 2026
e8ad51f
refactor(aztec-nr): rename oracle_array module to unconstrained_array
mverzilli Jun 11, 2026
91772da
docs(aztec-nr): reflow doc comments orphaned by the UnconstrainedArra…
mverzilli Jun 11, 2026
15a7e00
refactor(aztec-nr): pluralize ArrayOracles, EphemeralOracles, Transie…
mverzilli Jun 11, 2026
aa90beb
docs(aztec-nr): restore ArrayOracles trait doc paragraph
mverzilli Jun 11, 2026
e174bce
properly document panics
mverzilli Jun 11, 2026
950a4a2
empty does not need to clear
mverzilli Jun 11, 2026
c85569f
make find short-circuit
mverzilli Jun 11, 2026
0ca93c6
remove read_as for now
mverzilli Jun 11, 2026
5fac01b
move Serialize/Deserialize traits from UnconstrainedArray
mverzilli Jun 11, 2026
f7cbb01
refactor kv functions
mverzilli Jun 11, 2026
1523392
commit missing file
mverzilli Jun 11, 2026
788bd2f
refactor test helpers
mverzilli Jun 11, 2026
51d06cb
another one
mverzilli Jun 11, 2026
261face
tighten access
mverzilli Jun 11, 2026
8e9e6ee
remove excess comments
mverzilli Jun 11, 2026
6f881e0
Merge branch 'merge-train/fairies-v5' into martin/richer-ephemeral-an…
mverzilli Jun 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
379 changes: 25 additions & 354 deletions noir-projects/aztec-nr/aztec/src/ephemeral/mod.nr

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions noir-projects/aztec-nr/aztec/src/lib.nr
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub mod nullifier;
pub mod oracle;
pub mod state_vars;
pub mod capsules;
pub mod unconstrained_array;
pub mod ephemeral;
pub mod transient;
pub mod event;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
#[oracle(aztec_utl_pushEphemeral)]
pub(crate) unconstrained fn push_oracle<let N: u32>(slot: Field, values: [Field; N]) -> u32 {}

/// Removes and returns the last serialized element from the ephemeral array.
/// Removes and returns the last serialized element from the ephemeral array. Panics if the array is empty.
#[oracle(aztec_utl_popEphemeral)]
pub(crate) unconstrained fn pop_oracle<let N: u32>(slot: Field) -> [Field; N] {}

/// Returns the serialized element at the given index.
/// Returns the serialized element at the given index. Panics if `index` is out of bounds.
#[oracle(aztec_utl_getEphemeral)]
pub(crate) unconstrained fn get_oracle<let N: u32>(slot: Field, index: u32) -> [Field; N] {}

/// Overwrites the serialized element at the given index.
/// Overwrites the serialized element at the given index. Panics if `index` is out of bounds.
#[oracle(aztec_utl_setEphemeral)]
pub(crate) unconstrained fn set_oracle<let N: u32>(slot: Field, index: u32, values: [Field; N]) {}

/// Returns the number of elements in the ephemeral array.
#[oracle(aztec_utl_getEphemeralLen)]
pub(crate) unconstrained fn len_oracle(slot: Field) -> u32 {}

/// Removes the element at the given index, shifting subsequent elements backward.
/// Removes the element at the given index, shifting subsequent elements backward. Panics if `index` is out of bounds.
#[oracle(aztec_utl_removeEphemeral)]
pub(crate) unconstrained fn remove_oracle(slot: Field, index: u32) {}

Expand Down
4 changes: 2 additions & 2 deletions noir-projects/aztec-nr/aztec/src/oracle/mod.nr
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ pub mod block_header;
pub mod call_private_function;
pub mod call_utility_function;
pub mod capsules;
pub mod ephemeral;
pub mod transient;
pub(crate) mod ephemeral_oracles;
pub(crate) mod transient_oracles;
pub mod contract_sync;
pub mod public_call;
pub mod tx_phase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
#[oracle(aztec_utl_pushTransient)]
pub(crate) unconstrained fn push_oracle<let N: u32>(slot: Field, values: [Field; N]) -> u32 {}

/// Removes and returns the last serialized element from the transient array.
/// Removes and returns the last serialized element from the transient array. Panics if the array is empty.
#[oracle(aztec_utl_popTransient)]
pub(crate) unconstrained fn pop_oracle<let N: u32>(slot: Field) -> [Field; N] {}

/// Returns the serialized element at the given index.
/// Returns the serialized element at the given index. Panics if `index` is out of bounds.
#[oracle(aztec_utl_getTransient)]
pub(crate) unconstrained fn get_oracle<let N: u32>(slot: Field, index: u32) -> [Field; N] {}

/// Overwrites the serialized element at the given index.
/// Overwrites the serialized element at the given index. Panics if `index` is out of bounds.
#[oracle(aztec_utl_setTransient)]
pub(crate) unconstrained fn set_oracle<let N: u32>(slot: Field, index: u32, values: [Field; N]) {}

/// Returns the number of elements in the transient array.
#[oracle(aztec_utl_getTransientLen)]
pub(crate) unconstrained fn len_oracle(slot: Field) -> u32 {}

/// Removes the element at the given index, shifting subsequent elements backward.
/// Removes the element at the given index, shifting subsequent elements backward. Panics if `index` is out of bounds.
#[oracle(aztec_utl_removeTransient)]
pub(crate) unconstrained fn remove_oracle(slot: Field, index: u32) {}

Expand Down
Loading
Loading