test(txe): extend oracle roundtrip coverage to more scalar oracles#24550
Merged
Conversation
nchamo
commented
Jul 6, 2026
| exists: bool, | ||
| member: Field, | ||
| #[derive(Eq)] | ||
| pub(crate) struct GetContractInstanceResult { |
Contributor
Author
There was a problem hiding this comment.
Made public so we can generate tests for them. It's just the struct used to deserialize oracle return values
nchamo
commented
Jul 6, 2026
| * - TXE_ORACLE_VERSION_MINOR for additive changes (new oracle method added). | ||
| */ | ||
| export const TXE_ORACLE_INTERFACE_HASH = 'f6694961673ada551f57f5c09fa04cd566b175e63b7b965343bd4cf02b3cbdf6'; | ||
| export const TXE_ORACLE_INTERFACE_HASH = '4ed3618087fafb4aa63c6580996a69bf6bc257844035a2019692586b5b8daf34'; |
Contributor
Author
There was a problem hiding this comment.
No version bump, since nothing really changed
nchamo
commented
Jul 6, 2026
| getContractInstanceClassId(address: AztecAddress): Promise<{ member: Fr; exists: boolean }>; | ||
| getContractInstanceInitializationHash(address: AztecAddress): Promise<{ member: Fr; exists: boolean }>; | ||
| getContractInstanceImmutablesHash(address: AztecAddress): Promise<{ member: Fr; exists: boolean }>; | ||
| getContractInstanceDeployer(address: AztecAddress): Promise<{ member: Fr; exists: boolean }[]>; |
Contributor
Author
There was a problem hiding this comment.
We are now reflecting what the oracle actually returns in Noir. We are slowly fixing all oracles with these auto-tests
mverzilli
reviewed
Jul 6, 2026
Comment on lines
+42
to
+44
| quote { record_fact_oracle }, // TODO: implement once we support more complex types | ||
| quote { get_fact_collection_oracle }, // TODO: implement once we support more complex types | ||
| quote { get_fact_collections_by_type_oracle }, // TODO: implement once we support more complex types |
Contributor
There was a problem hiding this comment.
maybe worth a linear issue?
Contributor
Author
There was a problem hiding this comment.
It goes away in the next PR (already 80% there)
mverzilli
reviewed
Jul 6, 2026
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.
Summary
#[generate_oracle_tests]roundtrip suite to six more oracles:aztec_utl_deleteFactCollection,aztec_prv_getNextTaggingIndex, and the four AVMaztec_avm_getContractInstance*members (79 generated tests, up from 73).OnchainDeliveryModeandGetContractInstanceResult, and teaches the macro's type pinning to preserve concrete array lengths (e.g.[T; 1]) instead of rewriting them to the test collection length.CONTRACT_INSTANCE_MEMBERwire modeling, now composed asFIXED_ARRAY(STRUCT(...), 1): nargo encodes the[GetContractInstanceResult; 1]return as a single heap-array slot in struct field order, not two scalar slots — a latent mismatch that no production path exercised. The TXE handlers now build the one-element array themselves, so the hashed oracle interface changed (hash constant updated; no version bump since the wire itself is unchanged).