serve_axon_tls
Call v205 → current #40Registers TLS -enabled axon server endpoint.
View calls on chainCall Workflow
Click items to navigate. Pan and zoom to explore.
The Big Picture
Standard serve_axon exposes your miner over plain HTTP - anyone can see the traffic. serve_axon_tls adds encryption via TLS, protecting your queries and responses from eavesdropping. Required by some security-conscious subnets, and recommended for miners handling sensitive data.
Why This Matters
Validator queries might contain proprietary prompts. Your responses might be valuable. TLS encryption ensures only the intended validator sees the traffic. On public networks, this is essential for protecting your intellectual property and your clients' data.
Example Scenario
You run a miner handling medical queries - privacy matters. Configure TLS with your certificate and key. Call serve_axon_tls(netuid=1, ip=203.0.113.50, port=8091, cert=your_cert). Validators connect over HTTPS, encrypting all traffic.
Common Questions
- Do I need my own SSL certificate?
- Yes - you provide the certificate. Self-signed works for encryption but validators may warn. Let's Encrypt provides free trusted certificates.
- Can validators without TLS connect to me?
- No - TLS requires both sides to support it. Validators will use HTTPS when they see your TLS-enabled endpoint. Make sure your validator software supports TLS.
- Is TLS required on all subnets?
- No - it's optional unless the subnet mandates it. Check subnet requirements. Even when optional, TLS is good practice for sensitive operations.
Use Cases
- Secure miner communications with encryption
- Comply with subnet security requirements
- Protect sensitive queries and responses
- Enterprise-grade miner operations
From Chain Metadata
Same as `serve_axon` but takes a certificate as an extra optional argument. Serves or updates axon /prometheus information for the neuron associated with the caller. If the caller is already registered the metadata is updated. If the caller is not registered this call throws NotRegistered.
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 0 | netuid | u16 | Subnet/network identifier (0-65535) |
| 1 | version | u32 | version (u32) |
| 2 | ip | u128 | ip (u128) |
| 3 | port | u16 | port (u16) |
| 4 | ip_type | u8 | ip_type (u8) |
| 5 | protocol | u8 | protocol (u8) |
| 6 | placeholder1 | u8 | placeholder1 (u8) |
| 7 | placeholder2 | u8 | placeholder2 (u8) |
| 8 | certificate | Vec<u8> Vec | certificate (Vec<u8>) |
Permissions
Permission data inferred from metadata. May be incomplete.
Requirements
- Caller is registered on subnet
- Valid TLS configuration provided
- Certificate and key valid
Effects
Events Emitted
Storage Modified
Postconditions
- TLS axon endpoint stored
- Endpoint marked as TLS-capable
Side Effects
- Enables encrypted communication with validators
- Requires TLS-compatible client connections
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_tls 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 certificate = 0;
const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("serve_axon_tls")](
netuid,
version,
ip,
port,
ip_type,
protocol,
placeholder1,
placeholder2,
certificate
);On-Chain Activity
Occasional use
#41 most used call
Under 5% succeed — vast majority fail due to competition
As of block 7,429,232
Runtime Info
View Source- Pallet Index
- 7
- Call Index
- 40
- First Version
- v205
- Current Version
- v393