feat!: make get_shared_secrets batched oracle call#23352
Open
nchamo wants to merge 4 commits into
Open
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_getSharedSecrethas been replaced byaztec_utl_getSharedSecrets, which accepts a batch of ephemeral public keys via anEphemeralArrayslot and returns the corresponding secrets. The oracle major version has been bumped to 23.The existing
get_shared_secretNoir function is preserved as a thin wrapper aroundget_shared_secrets, so single-key callers are unaffected. The newget_shared_secretsfunction accepts aBoundedVec<Point, N>and returns aBoundedVec<Field, N>.Fixes F-656