> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Global ORACLE_VERSION_MAJOR

Module: `noir_aztec::oracle::version`

```rust
pub global ORACLE_VERSION_MAJOR: Field;
```

The oracle version constants are used to check that the oracle interface is in sync between PXE and Aztec.nr. We version the oracle interface as `major.minor` where:

- `major` = backward-breaking changes (must match exactly between PXE and Aztec.nr)
- `minor` = oracle additions (non-breaking; PXE minor >= contract minor)

The TypeScript counterparts are in `oracle_version.ts`.

@dev Whenever a contract function or Noir test is run, the `aztec_misc_assertCompatibleOracleVersion` oracle is called. If the major version is incompatible, an error is thrown immediately. The minor version is recorded by the PXE and used to provide helpful error messages if a contract calls an oracle that doesn't exist. We don't throw immediately if AZTEC_NR_MINOR > PXE_MINOR because if a contract is updated to use a newer Aztec.nr dependency without actually using any of the new oracles then there is no reason to throw.
