Skip to content

feat(txe): add oracle version check to bootstrap#23324

Open
nchamo wants to merge 1 commit into
merge-train/fairiesfrom
nchamo/f-667-add-txe-oracle-version-check-to-oracle-version-script
Open

feat(txe): add oracle version check to bootstrap#23324
nchamo wants to merge 1 commit into
merge-train/fairiesfrom
nchamo/f-667-add-txe-oracle-version-check-to-oracle-version-script

Conversation

@nchamo
Copy link
Copy Markdown
Contributor

@nchamo nchamo commented May 15, 2026

Problem

#23285 introduced versioning constants and an interface hash for the TXE oracle, but there was no mechanism to actually verify the hash, so a dev changing an oracle interface would not be reminded to bump the version. PXE already had a check_oracle_version script that runs in CI for this purpose; TXE did not.

Fix

Generalize PXE's getOracleInterfaceSignature so it handles both class methods and TS interface method signatures, and export it from pxe/bin for reuse.

Add a TXE-side check that hashes IAvmExecutionOracle and ITxeExecutionOracle and compares against TXE_ORACLE_INTERFACE_HASH. The check only covers TXE-specific oracles — PXE-implemented oracles are already covered by the existing PXE check, so duplicating them in TXE would just be noise.

Wire the new script into yarn-project/bootstrap.sh so it runs after the PXE check in CI.

Fixes F-667

@nchamo nchamo self-assigned this May 15, 2026
"./simulator": "./dest/contract_function_simulator/index.js",
"./config": "./dest/config/index.js"
"./config": "./dest/config/index.js",
"./bin": "./dest/bin/index.js"
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.

Honestly, I'm not sure if it's best to generalize and export getOracleInterfaceSignature to re-use from TXE, or copy-paste the logic

What do you think? I went this way, but I can easily go the other way if you think that would be best

@nchamo nchamo requested a review from mverzilli May 15, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant