refactor(txe): pass GasSettings as a struct to oracles - #25170
Open
nchamo wants to merge 2 commits into
Open
Conversation
Collaborator
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
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.
Stacked on #25169, which re-expressed TXE-only oracle wire types as
STRUCT/OPTIONcompositions instead of opaqueLEAFmappings. This does the same forGasSettings.The change
Three TXE oracles (
private_call_new_flow,public_call_new_flow,set_private_txe_context) took[Field; GAS_SETTINGS_LENGTH], produced by callinggas_settings.serialize()at the call site. They now takeGasSettingsdirectly, and the TypeScript side describes it as aSTRUCTofGas/GasFeescomponents, 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 theGasSettingsclass, following thenoir-structs/convention already used in PXE: a type mapping describes the wire, and constructing the domain object is the consumer's job. TheGasSettings.from(...)conversion happens in the threeTXESessionStateHandlermethods, the same waynotifyCreatedContractClassLogconverts its own wire type.Because the mapping is now purely structural,
private_call_new_flow_oracleandpublic_call_new_flow_oraclecome off the#[generate_oracle_tests_excluding]list, taking the generated serialization suite from 95 to 99 tests.set_private_txe_context_oraclestays excluded on itsPrivateContextInputsreturn, 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_MAJORgoes 4 → 5.