Mendora
Documentation · Chain integration

Chain integration

backend/src/mendora/chain/adapter.py offers three read-only modes and a weight planner. There are no write methods.

ModeWhat it readsVerification status
locala file-backed mock metagraph (var/local_chain.json)mocked verification only
testnetBittensor test network via the pinned SDK (bittensor 11.1.0 SyncClient("test"))read-only query verified, see below
mainnet_readonlyFinney via the same SDKsupported, not exercised in development

SDK calls used (checked against the installed 11.1.0 source): SyncClient(network), .block(), .spec_version(), .query(storage.SubtensorModule.SubnetOwnerHotkey, [netuid]), .neurons.uid(hotkey, netuid), .subnets.info(netuid), .subnets.commit_reveal_enabled(netuid).

Testnet read-only verification (recorded)

On 23 September 2026 a read-only query through the adapter's SDK calls against wss://test.finney.opentensor.ai:443 returned block 8,069,491, runtime spec version 469, and for testnet netuid 1: owner hotkey 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY resolving to UID 96, 256 neurons, commit-reveal enabled. Netuid 1 on testnet is not Mendora's subnet; it was used only to exercise identity resolution. No transaction was created, signed or sent. Reproduce with mendora chain observe --mode testnet --netuid 1.

Weight planning

build_weight_plan implements Annex T2 build_weights: resolve the Active champion's hotkey to its current UID at every weight-setting; if there is no Active champion, or its hotkey is not registered, route to the owner UID (burned by default, which reduces the subnet's future emission share). The netuid is never hardcoded: it comes from configuration (MENDORA_NETUID) or the command line.

Not done here, and why

Registering a subnet, moving funds, setting mainnet weights and committing testnet weights all need keys and explicit authorization this repository does not have. MENDORA_MAINNET_WRITES_ENABLED=true makes the API refuse to start. A weight-committing process should use SubtensorModule.commit_timelocked_weights (commit-reveal v4), hold only a validator hotkey, and read the plan this system records.