Skip to content

feat(aztec-nr): add Serialize/Deserialize for EphemeralArray#23417

Merged
nchamo merged 3 commits into
merge-train/fairiesfrom
nchamo/ephemeral-arrays-serialization
May 21, 2026
Merged

feat(aztec-nr): add Serialize/Deserialize for EphemeralArray#23417
nchamo merged 3 commits into
merge-train/fairiesfrom
nchamo/ephemeral-arrays-serialization

Conversation

@nchamo
Copy link
Copy Markdown
Contributor

@nchamo nchamo commented May 19, 2026

Summary

  • Adds Serialize and Deserialize trait implementations to EphemeralArray<T>, serializing as a single Field (the slot identifier).
  • Updates oracle function signatures in message_processing.nr and shared_secret.nr to accept and return EphemeralArray<T> directly instead of opaque raw Field slots, eliminating manual EphemeralArray::at(slot) wrapping at every call site.

@nchamo nchamo requested a review from nventuro as a code owner May 19, 2026 22:58
@nchamo nchamo self-assigned this May 19, 2026
@nchamo nchamo requested a review from mverzilli May 19, 2026 23:23
impl<T> Serialize for EphemeralArray<T> {
let N: u32 = 1;

fn serialize(self) -> [Field; 1] {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This signature should be [Field; N], correct?

(or, if the N assignment in line 108 can be deleted, that would be equally good I guess)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Makes sense! Did it in 9968a92

pub(crate) unconstrained fn get_pending_tagged_logs(scope: AztecAddress) -> EphemeralArray<PendingTaggedLog> {
let result_slot = get_pending_tagged_logs_oracle(scope);
EphemeralArray::at(result_slot)
get_pending_tagged_logs_oracle(scope)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lovely!

@nchamo nchamo added the claudebox Owned by claudebox. it can push to this PR. label May 21, 2026
@nchamo
Copy link
Copy Markdown
Contributor Author

nchamo commented May 21, 2026

@AztecBot , please fix conflict

…zation

Resolves conflict in oracle/message_processing.nr: combine the base
branch's oracle rename (dropping the _v2 suffix now that the old
handlers are gone) with this PR's EphemeralArray<T> oracle signatures.
@nchamo nchamo enabled auto-merge (squash) May 21, 2026 10:52
@nchamo nchamo merged commit 0b78738 into merge-train/fairies May 21, 2026
14 checks passed
@nchamo nchamo deleted the nchamo/ephemeral-arrays-serialization branch May 21, 2026 11:09
github-merge-queue Bot pushed a commit that referenced this pull request May 25, 2026
BEGIN_COMMIT_OVERRIDE
feat(txe): add TXE oracle version check to bootstrap (#23324)
fix(txe): correct TXE_ORACLE_INTERFACE_HASH to match current oracle
interface (#23460)
feat(aztec-nr): add Serialize/Deserialize for EphemeralArray (#23417)
refactor: move validation and error handling out of transport layer
(#23422)
feat(pxe)!: add source and block-range filtering to get_logs_by_tag
(#23326)
fix(txe): update TXE oracle interface hash for new AVM oracle methods
(#23492)
chore(ci): capture sandbox diagnostics on acceptance test failure
(#23495)
feat(aztec-nr)!: rename push_nullifier to push_nullifier_unsafe (#23488)
feat(aztec-nr)!: add explicit custom_sync_state hook to AztecConfig
(#23446)
fix(ci): skip aztec-cli notify job when acceptance test is skipped
(#23534)
fix: released contract artifact aztec version (forward port of #23470)
(#23500)
fix: merge train conflicts (#23548)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants