Skip to main content
Schemas are locked. Additive changes only, under explicit version bumps.
Every message the protocol touches uses one of these Pydantic v2 types. Frozen once constructed. Strict validation. Canonical JSON uses camelCase, Python attributes are snake_case via alias_generator=to_camel.

Question

The off-chain canonical question format. Spec §4.2.

EvidencePolicy

Nested in Question. Bounds what evidence a miner may cite.

Verdict

The canonical verdict format. Spec §4.2.

Evidence and EvidenceSource

Reasoning and MinerProvenance

SubnetMetadata

Outcome

Sentinel integer values for the outcome field across Verdict, MinerProvenance, and PelionSynapse. Not an enum (enumerated markets require values outside the closed set).

PelionSynapse

Bittensor wire envelope. Subclass of bt.Synapse. Lives in pelion.schemas.synapse and requires the bittensor extra. Inputs (validator populates, miner reads). Outputs (miner populates, validator reads). Input fields are included in the Synapse request hash. Changes to input field names or types are wire-breaking and require coordinated miner, validator, and router updates.

Post-Task-1 spec amendments

Four ambiguities in the original spec were resolved and documented. They apply to all schema usage. subnet_routing encoding. Canonical off-chain JSON uses list[int] matching spec §4.2. On-chain, PelionAdapter.sol’s QuestionParams.subnetRouting is a uint256 bitmap. Bit i is set iff i is in subnet_routing. Caps at 256 netuids. evidence_hash and reasoning_hash. The spec’s Solidity Verdict struct has these as bytes32. The canonical off-chain Verdict does not carry them. Instead, they are computed at the router-to-adapter boundary as sha256(canonical_json_bytes(evidence)) and sha256(canonical_json_bytes(reasoning)). Canonical JSON uses model_dump_json(by_alias=True) with compact separators. This matches IPFS CIDv0 convention. The 32-byte digest is exactly the content-identifier portion of Qm<base58(digest)>. UNRESOLVABLE sentinel value. -1. Documented on the Outcome class. callback_contract and callback_selector. Adapter-layer fields only. Not on canonical off-chain Question. The miner, validator, and router never see them. The authoritative engineering reference lives at pelion/schemas/README.md in the repository.