Call Workflow
This diagram shows the call execution flow: starting with serve_axon, passing through validation
(signature, nonce, mortality, fee payment), then pre-dispatch checks, followed by dispatch which emits events: AxonServed and modifies storage: Axons, LastTxBlock, and finally post-dispatch where ExtrinsicSuccess is emitted and fees are settled.
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
Click items to navigate. Pan and zoom to explore.
Used by: minersvalidatorsdevelopers
The Big Picture
Your axon is your miner's public API. Validators need to know where to send queries, and this call publishes that address on-chain. Without a served axon, validators can't reach you, and you can't earn.
Why This Matters
Registration gets you a UID. Serving your axon tells the network where to find you. Both are required to actually receive queries and earn emissions.
Example Scenario
Your miner runs at 203.0.113.50:8091. After registering on subnet 1, call serve_axon(netuid=1, ip=203.0.113.50, port=8091). Now validators can discover and query your miner.
Common Questions
- Do I need to update my axon if my IP changes?
- Yes! If validators can't reach you, you get zero scores. Serve again with your new IP.
- What about firewalls?
- Ensure your axon port is publicly accessible. The chain just stores the address - you're responsible for actually being reachable.
Use Cases
- Publish your miner's API endpoint
- Update your endpoint after IP change
- Make your neuron discoverable for queries
Input Parameters
Permissions
Origin
Unknown
Required Role
Authorization Checks
- Hotkey must be registered on the target subnet
Requirements
- Caller is registered on subnet
- Valid IP/port provided
- Serving not rate limited
Effects
Events Emitted
Storage Modified
Postconditions
- Axon endpoint stored
Side Effects
- Other neurons can discover endpoint
- Validators can send requests
Code Examples
import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";
const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });
// Build serve_axon call
const netuid = 1;
const version = 0;
const ip = 0;
const port = 0;
const ip_type = 0;
const protocol = 0;
const placeholder1 = 0;
const placeholder2 = 0;
const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("serve_axon")](
netuid,
version,
ip,
port,
ip_type,
protocol,
placeholder1,
placeholder2
);On-Chain Activity
Usage Frequency
●●●●●● Dominant >10M extrinsics
Highest-volume operations
#3 most used call
Success Rate Competitive
5–20% of submissions succeed — expect frequent failures
As of block 7,429,232
Runtime Info
View Source- Pallet Index
- 7
- Call Index
- 4
- First Version
- v101
- Current Version
- v393