Skip to content

refactor(txe): pass GasSettings as a struct to oracles - #25170

Open
nchamo wants to merge 2 commits into
nchamo/txe-oracle-workfrom
nchamo/txe-gas-settings-struct
Open

refactor(txe): pass GasSettings as a struct to oracles#25170
nchamo wants to merge 2 commits into
nchamo/txe-oracle-workfrom
nchamo/txe-gas-settings-struct

Conversation

@nchamo

@nchamo nchamo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Stacked on #25169, which re-expressed TXE-only oracle wire types as STRUCT/OPTION compositions instead of opaque LEAF mappings. This does the same for GasSettings.

The change

Three TXE oracles (private_call_new_flow, public_call_new_flow, set_private_txe_context) took [Field; GAS_SETTINGS_LENGTH], produced by calling gas_settings.serialize() at the call site. They now take GasSettings directly, and the TypeScript side describes it as a STRUCT of Gas/GasFees components, so the wire shape comes from the type mapping rather than from a hand-written serialization step.

The mapping is typed to a plain wire type (GasSettingsData) rather than to the GasSettings class, following the noir-structs/ convention already used in PXE: a type mapping describes the wire, and constructing the domain object is the consumer's job. The GasSettings.from(...) conversion happens in the three TXESessionStateHandler methods, the same way notifyCreatedContractClassLog converts its own wire type.

Because the mapping is now purely structural, private_call_new_flow_oracle and public_call_new_flow_oracle come off the #[generate_oracle_tests_excluding] list, taking the generated serialization suite from 95 to 99 tests. set_private_txe_context_oracle stays excluded on its PrivateContextInputs return, which is a separate follow-up.

This is a breaking oracle wire change (eight separate scalar slots instead of one eight-field slot), so TXE_ORACLE_VERSION_MAJOR goes 4 → 5.

@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
@AztecBot

Copy link
Copy Markdown
Collaborator

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/1bcda4a1be7ec5cb�1bcda4a1be7ec5cb8;;�): yarn-project/kv-store/scripts/run_test.sh src/sqlite-opfs/internal/ordered-binary-browser.test.ts (2s) (code: 0)

@nchamo
nchamo marked this pull request as ready for review August 11, 2026 18:16
@nchamo
nchamo requested a review from nventuro as a code owner August 11, 2026 18:16
@nchamo
nchamo requested review from vezenovm and removed request for nventuro August 11, 2026 18:16
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.

2 participants