Skip to content

feat!: make get_shared_secrets batched oracle call#23352

Open
nchamo wants to merge 4 commits into
merge-train/fairiesfrom
nchamo/f-656-replace-get_shared_secret-with-batched-version
Open

feat!: make get_shared_secrets batched oracle call#23352
nchamo wants to merge 4 commits into
merge-train/fairiesfrom
nchamo/f-656-replace-get_shared_secret-with-batched-version

Conversation

@nchamo
Copy link
Copy Markdown
Contributor

@nchamo nchamo commented May 17, 2026

Why we are doing this

As part of constrained delivery, computing multiple shared secrets for multiple ephemeral public keys is needed. The existing oracle only supported a single eph key per call, requiring repeated round-trips for multi-key scenarios.

Our fix

aztec_utl_getSharedSecret has been replaced by aztec_utl_getSharedSecrets, which accepts a batch of ephemeral public keys via an EphemeralArray slot and returns the corresponding secrets. The oracle major version has been bumped to 23.

The existing get_shared_secret Noir function is preserved as a thin wrapper around get_shared_secrets, so single-key callers are unaffected. The new get_shared_secrets function accepts a BoundedVec<Point, N> and returns a BoundedVec<Field, N>.

Fixes F-656

@nchamo nchamo requested a review from nventuro as a code owner May 17, 2026 15:38
@nchamo nchamo self-assigned this May 17, 2026
nchamo added 3 commits May 17, 2026 16:44
…ared_secret

- Consolidate imports using grouped `use` statements
- Add explicit type annotations on BoundedVec bindings for type inference
- Add turbofish ::<1> on singular get_shared_secrets call
- Make mock_get_shared_secrets unconstrained (calls unconstrained FFI)
- Fix AztecAddress import path to use re-export pattern
- Add missing FromField import in test module
…rdering test

x=3 has no valid point on Grumpkin (y^2 = x^3 - 17); x=8 is a known valid x coordinate.
@nchamo nchamo requested review from mverzilli and vezenovm May 17, 2026 17:02
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.

1 participant