Skip to content

refactor(txe): describe oracle types with STRUCT instead of LEAF - #25169

Open
nchamo wants to merge 2 commits into
merge-train/fairiesfrom
nchamo/txe-oracle-work
Open

refactor(txe): describe oracle types with STRUCT instead of LEAF#25169
nchamo wants to merge 2 commits into
merge-train/fairiesfrom
nchamo/txe-oracle-work

Conversation

@nchamo

@nchamo nchamo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Two TXE-only oracle types were opaque LEAF mappings: the CompleteAddress returned by create_account/add_account, and the call context returned by get_last_call_context. Both are now composed from the existing STRUCT / OPTION combinators, reusing the PUBLIC_KEYS mapping already defined for PXE.
  • This matters for versioning: the oracle interface hash is computed from type labels, so a LEAF hides a length or shape change behind a stable label, while a structural label trips the tripwire. The wire format is byte-identical either way, so this is a re-pin of the hash only, with no version bump.
  • get_last_call_context now models a tx-less call as Option::none() instead of overloading Fr.ZERO, threaded through TxeSession.
  • The three oracles come off the #[generate_oracle_tests_excluding] list and are now covered by the generated serialization tests.

@nchamo nchamo self-assigned this Aug 11, 2026
@nchamo nchamo added ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure labels Aug 11, 2026
* - TXE_ORACLE_VERSION_MINOR for additive changes (new oracle method added).
*/
export const TXE_ORACLE_INTERFACE_HASH = '1a6c578d0a47cd8dd7dae07fd00abe781225a73920c596d873afcc061c0e4284';
export const TXE_ORACLE_INTERFACE_HASH = '86d900da6ca21d8dee76b790175aaaee9e865bf99950844e2dc727250fe14a40';

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.

Oracles didn't change, so no need to bump versions

@nchamo
nchamo marked this pull request as ready for review August 11, 2026 18:14
@nchamo
nchamo requested a review from nventuro as a code owner August 11, 2026 18:14
@nchamo
nchamo requested review from vezenovm and removed request for nventuro August 11, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant