diff --git a/docs/learn/chain-rate-limits.md b/docs/learn/chain-rate-limits.md index b3674a83..e64f107c 100644 --- a/docs/learn/chain-rate-limits.md +++ b/docs/learn/chain-rate-limits.md @@ -36,15 +36,14 @@ This rate limit prevents frequent changes to delegate take percentages. - Chain State Variable: `TxDelegateTakeRateLimit` - Error message: [`DelegateTxRateLimitExceeded`](../errors/subtensor.md#delegatetxratelimitexceeded) - ### Hotkey swap rate limit This rate limit prevents a user from swapping a hotkey too frequently. Hotkey swaps are subject to **two separate rate limits** that must both be satisfied: -- Rate Limit: +- Rate Limit: - General transaction: 1 block (12 seconds) - Per-subnet: 36,000 blocks (~5 days) -- Chain State Variables: +- Chain State Variables: - `TxRateLimit` (general transaction rate limit) - `HotkeySwapOnSubnetInterval` (global interval constant, not queryable from chain state) - Source Code: [swap_hotkey.rs](https://github.com/opentensor/subtensor/blob/main/pallets/subtensor/src/swap/swap_hotkey.rs#L52-56) @@ -74,7 +73,6 @@ This rate limit controls how frequently subnet owners can modify hyperparameters - Chain State Variable: `OwnerHyperparamRateLimit` - Error message: [`TxRateLimitExceeded`](../errors/subtensor.md#txratelimitexceeded) - ### Weights version key rate limit This rate limit controls the frequency of weights version key updates. @@ -117,7 +115,6 @@ This rate limit controls how frequently a user can perform staking operations (a - Chain State Variable: `StakingOperationRateLimiter` (Bool, since limit is 1 operation) - Error message: [`StakingOperationRateLimitExceeded`](../errors/subtensor.md#stakingoperationratelimitexceeded) - ### Child hotkey operations rate limit This rate limit controls how frequently a parent hotkey can set or revoke child hotkeys on a specific subnet. Note that revoking children is implemented by calling `set_children` with an empty list, so both operations share the same rate limit. @@ -146,7 +143,6 @@ This rate limit controls how frequently neurons can update their serving informa - Chain State Variable: `ServingRateLimit` - Error message: [`ServingRateLimitExceeded`](../errors/subtensor.md#servingratelimitexceeded) - ### Weights setting rate limit This rate limit controls how frequently a subnet validator can set weights to the network. Appears as `weights_rate_limit` in the subnet's hyperparameters. For more information, see [subnet hyperparameters](../subnets/subnet-hyperparameters.md#weightsratelimit--commitmentratelimit). @@ -183,5 +179,4 @@ When querying OTF-provided lite nodes, the following rate limits apply. We stron - Any OTF-provided lite node will rate limit the requests to one request per second, per IP address. Note that this rate limit may change dynamically based on the network or application requirements. - A request can be either WS/WSS or HTTP/HTTPS. - If you exceed the rate limit, you will receive the error code 429. You will then have to wait until the rate limit window has expired. -- You can avoid OTF-lite node rate limits by running your own local lite node. You can run a lite node either [Using Docker](../subtensor-nodes/using-docker.md#using-lite-nodes) or [Using Source](../subtensor-nodes/using-source#lite-node-on-mainchain). - +- You can avoid OTF-lite node rate limits by running your own local lite node. You can run a lite node either [Using Docker](../subtensor-nodes/run/using-docker.md#using-lite-nodes) or [Using Source](../subtensor-nodes/run/using-docker#lite-node-on-mainchain). diff --git a/docs/subtensor-api/constants.md b/docs/subtensor-api/constants.md index 7c77cca9..d21c888b 100644 --- a/docs/subtensor-api/constants.md +++ b/docs/subtensor-api/constants.md @@ -1,6 +1,11 @@ +--- +title: Constants +description: "This page contains compile-time runtime constants for the Subtensor runtime and their respective values." +--- + # Constants -This page contains compile-time runtime constants for the Bittensor (Subtensor) runtime. Accessible via `api.consts..`. Values read live from node. +This page contains compile-time runtime constants for the Subtensor runtime and their respective values. Accessible via `api.consts..`. Values read live from node. :::info Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Connected to: `wss://entrypoint-finney.opentensor.ai:443` @@ -33,8 +38,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `12000` - **summary**: The slot duration Aura should run with, expressed in milliseconds. The effective value of this type should not change while the chain is running. - For backwards compatibility either use [`MinimumPeriodTimesTwo`] or a const. - + For backwards compatibility either use [`MinimumPeriodTimesTwo`] or a const. ## `balances` @@ -44,9 +48,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `500` - **summary**: The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO! - If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for this pallet. However, you do so at your own risk: this will open up a major DoS vector. In case you have multiple sources of provider references, you may also get unexpected behaviour if you set this to zero. + If you _really_ need it to be zero, you can enable the feature `insecure_zero_ed` for this pallet. However, you do so at your own risk: this will open up a major DoS vector. In case you have multiple sources of provider references, you may also get unexpected behaviour if you set this to zero. - Bottom line: Do yourself a favour and make it at least one! + Bottom line: Do yourself a favour and make it at least one! ### `maxFreezes`: `u32` @@ -60,7 +64,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `50` - **summary**: The maximum number of locks that should exist on an account. Not strictly enforced, but used for weight estimation. - Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` + Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` ### `maxReserves`: `u32` @@ -68,8 +72,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `50` - **summary**: The maximum number of named reserves that can exist on an account. - Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` - + Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` ## `commitments` @@ -91,7 +94,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `3` - **summary**: The maximum number of additional fields that can be added to a commitment - ## `contracts` ### `apiVersion`: `u16` @@ -100,7 +102,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `4` - **summary**: The version of the HostFn APIs that are available in the runtime. - Only valid value is `()`. + Only valid value is `()`. ### `codeHashLockupDepositPercent`: `Perbill` @@ -120,9 +122,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `30` - **summary**: The amount of balance a caller has to pay for each byte of storage. - **Note:** + **Note:** - Changing this value for an existing chain might need a storage migration. + Changing this value for an existing chain might need a storage migration. ### `depositPerItem`: `u64` @@ -130,9 +132,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `75` - **summary**: The amount of balance a caller has to pay for each storage item. - **Note:** + **Note:** - Changing this value for an existing chain might need a storage migration. + Changing this value for an existing chain might need a storage migration. ### `environment`: `{"_alias":{"hash_":"hash"},"accountId":"Null","balance":"PalletContractsEnvironmentType","hash_":"PalletContractsEnvironmentTypeH256","hasher":"PalletContractsEnvironmentTypeBlakeTwo256","timestamp":"PalletContractsEnvironmentTypeU64","blockNumber":"PalletContractsEnvironmentTypeU32"}` @@ -140,7 +142,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `{"accountId":null,"balance":null,"hash":null,"hasher":null,"timestamp":null,"blockNumber":null}` - **summary**: Type that bundles together all the runtime configurable interface types. - This is not a real config. We just mention the type here as constant so that its type appears in the metadata. Only valid value is `()`. + This is not a real config. We just mention the type here as constant so that its type appears in the metadata. Only valid value is `()`. ### `maxCodeLen`: `u32` @@ -148,7 +150,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `131072` - **summary**: The maximum length of a contract code in bytes. - The value should be chosen carefully taking into the account the overall memory limit your runtime has, as well as the [maximum allowed callstack depth](#associatedtype.CallStack). Look into the `integrity_test()` for some insights. + The value should be chosen carefully taking into the account the overall memory limit your runtime has, as well as the [maximum allowed callstack depth](#associatedtype.CallStack). Look into the `integrity_test()` for some insights. ### `maxDebugBufferLen`: `u32` @@ -186,12 +188,11 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `false` - **summary**: Make contract callable functions marked as `#[unstable]` available. - Contracts that use `#[unstable]` functions won't be able to be uploaded unless this is set to `true`. This is only meant for testnets and dev nodes in order to experiment with new features. - - **Warning:** + Contracts that use `#[unstable]` functions won't be able to be uploaded unless this is set to `true`. This is only meant for testnets and dev nodes in order to experiment with new features. - Do **not** set to `true` on productions chains. + **Warning:** + Do **not** set to `true` on productions chains. ## `crowdloan` @@ -236,7 +237,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `50` - **summary**: The maximum number of contributors that can be refunded in a single refund. - ## `drand` ### `httpFetchTimeout`: `u64` @@ -251,8 +251,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `1048576` - **summary**: A configuration for base priority of unsigned transactions. - This is exposed so that it can be tuned for particular runtime, when multiple pallets send unsigned transactions. - + This is exposed so that it can be tuned for particular runtime, when multiple pallets send unsigned transactions. ## `grandpa` @@ -274,8 +273,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `0` - **summary**: The maximum number of entries to keep in the set id to session index mapping. - Since the `SetIdSession` map is only used for validating equivocations this value should relate to the bonding duration of whatever staking system is being used (if any). If equivocation handling is not enabled then this value can be zero. - + Since the `SetIdSession` map is only used for validating equivocations this value should relate to the bonding duration of whatever staking system is being used (if any). If equivocation handling is not enabled then this value can be zero. ## `multisig` @@ -285,7 +283,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `132000000` - **summary**: The base amount of currency needed to reserve for creating a multisig execution or to store a dispatch call for later. - This is held for an additional storage item whose value size is `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is `32 + sizeof(AccountId)` bytes. + This is held for an additional storage item whose value size is `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is `32 + sizeof(AccountId)` bytes. ### `depositFactor`: `u64` @@ -293,7 +291,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `32000000` - **summary**: The amount of currency needed per unit threshold when creating a multisig execution. - This is held for adding 32 bytes more into a pre-existing storage value. + This is held for adding 32 bytes more into a pre-existing storage value. ### `maxSignatories`: `u32` @@ -301,7 +299,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `100` - **summary**: The maximum amount of signatories allowed in the multisig. - ## `proxy` ### `announcementDepositBase`: `u64` @@ -310,7 +307,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `36000000` - **summary**: The base amount of currency needed to reserve for creating an announcement. - This is held when a new storage item holding a `Balance` is created (typically 16 bytes). + This is held when a new storage item holding a `Balance` is created (typically 16 bytes). ### `announcementDepositFactor`: `u64` @@ -318,7 +315,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `68000000` - **summary**: The amount of currency needed per announcement made. - This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes) into a pre-existing storage value. + This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes) into a pre-existing storage value. ### `maxPending`: `u32` @@ -338,7 +335,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `60000000` - **summary**: The base amount of currency needed to reserve for creating a proxy. - This is held for an additional storage item whose value size is `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes. + This is held for an additional storage item whose value size is `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes. ### `proxyDepositFactor`: `u64` @@ -346,8 +343,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `33000000` - **summary**: The amount of currency needed per proxy added. - This is held for adding 32 bytes plus an instance of `ProxyType` more into a pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take into account `32 + proxy_type.encode().len()` bytes of data. - + This is held for adding 32 bytes plus an instance of `ProxyType` more into a pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take into account `32 + proxy_type.encode().len()` bytes of data. ## `registry` @@ -369,7 +365,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `1` - **summary**: Configuration fields Maximum user-configured additional fields - ## `safeMode` ### `enterDepositAmount`: `Option` @@ -378,7 +373,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `` - **summary**: The amount that will be reserved upon calling [`Pallet::enter`]. - `None` disallows permissionlessly enabling the safe-mode and is a sane default. + `None` disallows permissionlessly enabling the safe-mode and is a sane default. ### `enterDuration`: `u32` @@ -392,7 +387,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `` - **summary**: The amount that will be reserved upon calling [`Pallet::extend`]. - `None` disallows permissionlessly extending the safe-mode and is a sane default. + `None` disallows permissionlessly extending the safe-mode and is a sane default. ### `extendDuration`: `u32` @@ -400,7 +395,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `0` - **summary**: For how many blocks the safe-mode can be extended by each [`Pallet::extend`] call. - This does not impose a hard limit as the safe-mode can be extended multiple times. + This does not impose a hard limit as the safe-mode can be extended multiple times. ### `releaseDelay`: `Option` @@ -408,10 +403,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `` - **summary**: The minimal duration a deposit will remain reserved after safe-mode is entered or extended, unless [`Pallet::force_release_deposit`] is successfully called sooner. - Every deposit is tied to a specific activation or extension, thus each deposit can be released independently after the delay for it has passed. - - `None` disallows permissionlessly releasing the safe-mode deposits and is a sane default. + Every deposit is tied to a specific activation or extension, thus each deposit can be released independently after the delay for it has passed. + `None` disallows permissionlessly releasing the safe-mode deposits and is a sane default. ## `scheduler` @@ -427,10 +421,8 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `50` - **summary**: The maximum number of scheduled calls in the queue for a single block. - **NOTE:** - - + Dependent pallets' benchmarks might require a higher limit for the setting. Set a higher limit under `runtime-benchmarks` feature. - + **NOTE:** + - Dependent pallets' benchmarks might require a higher limit for the setting. Set a higher limit under `runtime-benchmarks` feature. ## `subtensorModule` @@ -792,7 +784,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.consts.subtensorModule.minBurnUpperBound` - **value**: `1000000000` -- **summary**: Min burn upper bound. +- **summary**: Min burn upper bound. ### `yuma3On`: `bool` @@ -800,7 +792,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `false` - **summary**: A flag to indicate if Yuma3 is enabled. - ## `swap` ### `maxFeeRate`: `u16` @@ -833,7 +824,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `0x74656e2f73776170` - **summary**: This type is used to derive protocol accoun ID. - ## `system` ### `blockHashCount`: `u32` @@ -866,7 +856,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `42` - **summary**: The designated SS58 prefix of this chain. - This replaces the "ss58Format" property declared in the chain spec. Reason is that the runtime should know about the prefix in order to make use of it as an identifier of the chain. + This replaces the "ss58Format" property declared in the chain spec. Reason is that the runtime should know about the prefix in order to make use of it as an identifier of the chain. ### `version`: `{"specName":"Text","implName":"Text","authoringVersion":"u32","specVersion":"u32","implVersion":"u32","apis":"Vec<([u8;8],u32)>","transactionVersion":"u32","systemVersion":"u8"}` @@ -874,7 +864,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `{"specName":"node-subtensor","implName":"node-subtensor","authoringVersion":1,"specVersion":401,"implVersion":1,"apis":[["0xdf6acb689907609b",5],["0x37e397fc7c91f5e4",2],["0x40fe3ad401f8959a",6],["0xfbc577b9d747efd6",1],["0xd2bc9897eed08f15",3],["0xf78b278be53f454c",2],["0xdd718d5cc53262d4",1],["0xab3c0572291feb8b",1],["0xed99c5acb25eedf5",3],["0xbc9d89904f5b923f",1],["0x37c8bb1350a9a2a8",4],["0xf3ff14d5ab527059",3],["0x582211f65bb14b89",6],["0xe65b00e46cedd0aa",2],["0x68b66ba122c93fa7",2],["0x42e62be4a39e5b60",1],["0x806df4ccaa9ed485",1],["0x8375104b299b74c5",1],["0x5d1fbfbe852f2807",1],["0xc6886e2f8e598b0a",1],["0xcbca25e39f142387",2],["0xa8b093e6508d9e9c",1],["0x1c4585bd5c707202",1]],"transactionVersion":1,"systemVersion":1}` - **summary**: Get the chain's in-code version. - ## `timestamp` ### `minimumPeriod`: `u64` @@ -883,8 +872,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `6000` - **summary**: The minimum period between blocks. - Be aware that this is different to the *expected* period that the block production apparatus provides. Your chosen consensus system will generally work with this to determine a sensible block time. For example, in the Aura pallet it will be double this period on default settings. - + Be aware that this is different to the _expected_ period that the block production apparatus provides. Your chosen consensus system will generally work with this to determine a sensible block time. For example, in the Aura pallet it will be double this period on default settings. ## `transactionPayment` @@ -894,14 +882,13 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **value**: `5` - **summary**: A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their `priority` - This value is multiplied by the `final_fee` to obtain a "virtual tip" that is later added to a tip component in regular `priority` calculations. It means that a `Normal` transaction can front-run a similarly-sized `Operational` extrinsic (with no tip), by including a tip value greater than the virtual tip. - - ```rust,ignore // For `Normal` let priority = priority_calc(tip); + This value is multiplied by the `final_fee` to obtain a "virtual tip" that is later added to a tip component in regular `priority` calculations. It means that a `Normal` transaction can front-run a similarly-sized `Operational` extrinsic (with no tip), by including a tip value greater than the virtual tip. - // For `Operational` let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier; let priority = priority_calc(tip + virtual_tip); ``` + ```rust,ignore // For `Normal` let priority = priority_calc(tip); - Note that since we use `final_fee` the multiplier applies also to the regular `tip` sent with the transaction. So, not only does the transaction get a priority bump based on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational` transactions. + // For `Operational` let virtual_tip = (inclusion_fee + tip) \* OperationalFeeMultiplier; let priority = priority_calc(tip + virtual_tip); ``` + Note that since we use `final_fee` the multiplier applies also to the regular `tip` sent with the transaction. So, not only does the transaction get a priority bump based on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational` transactions. ## `utility` diff --git a/docs/subtensor-api/errors.md b/docs/subtensor-api/errors.md index 0b8f1721..04be3d2e 100644 --- a/docs/subtensor-api/errors.md +++ b/docs/subtensor-api/errors.md @@ -1,6 +1,11 @@ +--- +title: Errors +description: "This page contains error variants returned by the Subtensor runtime." +--- + # Errors -This page contains error variants returned by the Bittensor (Subtensor) runtime. Accessible via `api.errors..`. +This page contains error variants returned by the Subtensor runtime. Accessible via `api.errors..`. :::info Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Connected to: `wss://entrypoint-finney.opentensor.ai:443` @@ -95,7 +100,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.adminUtils.ValueNotInBounds` - **summary**: Value not in allowed bounds. - ## `balances` ### `DeadAccount` @@ -158,7 +162,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.balances.VestingBalance` - **summary**: Vesting balance too high to send value. - ## `commitments` ### `AccountNotAllowedCommit` @@ -181,7 +184,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.commitments.UnexpectedUnreserveLeftover` - **summary**: Indicates that unreserve returned a leftover, which is unexpected. - ## `contracts` ### `CannotAddSelfAsDelegateDependency` @@ -209,9 +211,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.contracts.CodeRejected` - **summary**: The contract's code was found to be invalid during validation. - The most likely cause of this is that an API was used which is not supported by the node. This happens if an older node is used with a new version of ink!. Try updating your node to the newest available version. + The most likely cause of this is that an API was used which is not supported by the node. This happens if an older node is used with a new version of ink!. Try updating your node to the newest available version. - A more detailed error can be found on the node console if debug messages are enabled by supplying `-lruntime::contracts=debug`. + A more detailed error can be found on the node console if debug messages are enabled by supplying `-lruntime::contracts=debug`. ### `CodeTooLarge` @@ -291,7 +293,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne ### `NoChainExtension` - **interface**: `api.errors.contracts.NoChainExtension` -- **summary**: The chain does not provide a chain extension. Calling the chain extension results in this error. Note that this usually shouldn't happen as deploying such contracts is rejected. +- **summary**: The chain does not provide a chain extension. Calling the chain extension results in this error. Note that this usually shouldn't happen as deploying such contracts is rejected. ### `NoMigrationPerformed` @@ -348,7 +350,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.contracts.TerminatedInConstructor` - **summary**: A contract self destructed in its constructor. - This can be triggered by a call to `seal_terminate`. + This can be triggered by a call to `seal_terminate`. ### `TerminatedWhileReentrant` @@ -375,7 +377,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.contracts.XCMDecodeFailed` - **summary**: Failed to decode the XCM program. - ## `crowdloan` ### `AlreadyFinalized` @@ -488,7 +489,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.crowdloan.Underflow` - **summary**: An underflow occurred. - ## `drand` ### `DrandConnectionFailure` @@ -521,7 +521,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.drand.UnverifiedPulse` - **summary**: the pulse is invalid - ## `ethereum` ### `InvalidSignature` @@ -534,7 +533,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.ethereum.PreLogExists` - **summary**: Pre-log is present, therefore transact is not allowed. - ## `evm` ### `BalanceLow` @@ -612,7 +610,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.evm.WithdrawFailed` - **summary**: Withdraw fee failed - ## `grandpa` ### `ChangePending` @@ -650,7 +647,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.grandpa.TooSoon` - **summary**: Cannot signal forced change so soon after last. - ## `mevShield` ### `BadEncKeyLen` @@ -673,7 +669,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.mevShield.WeightExceedsAbsoluteMax` - **summary**: Weight exceeds the absolute maximum (half of total block weight). - ## `multisig` ### `AlreadyApproved` @@ -746,7 +741,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.multisig.WrongTimepoint` - **summary**: A different timepoint was given to the multisig operation that is underway. - ## `preimage` ### `AlreadyNoted` @@ -789,7 +783,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.preimage.TooMany` - **summary**: More than `MAX_HASH_UPGRADE_BULK_COUNT` hashes were requested to be upgraded at once. - ## `proxy` ### `AnnouncementDepositInvariantViolated` @@ -842,7 +835,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.proxy.Unproxyable` - **summary**: A call which is incompatible with the proxy type's filter was attempted. - ## `registry` ### `CannotRegister` @@ -860,7 +852,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.registry.TooManyFieldsInIdentityInfo` - **summary**: Account passed too many additional fields to their identity - ## `safeMode` ### `AlreadyDeposited` @@ -898,7 +889,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.safeMode.NotConfigured` - **summary**: This functionality of the pallet is disabled by the configuration. - ## `scheduler` ### `FailedToSchedule` @@ -926,7 +916,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.scheduler.TargetBlockNumberInPast` - **summary**: Given target block number is in the past. - ## `subtensorModule` ### `ActivityCutoffTooLow` @@ -1609,7 +1598,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.subtensorModule.ZeroMaxStakeAmount` - **summary**: Zero max stake amount - ## `sudo` ### `RequireSudo` @@ -1617,7 +1605,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.sudo.RequireSudo` - **summary**: Sender must be the Sudo account. - ## `swap` ### `FeeRateTooHigh` @@ -1690,7 +1677,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.swap.UserLiquidityDisabled` - **summary**: User liquidity operations are disabled for this subnet - ## `system` ### `CallFiltered` @@ -1703,7 +1689,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.system.FailedToExtractRuntimeVersion` - **summary**: Failed to extract the runtime version from the new runtime. - Either calling `Core_version` or decoding `RuntimeVersion` failed. + Either calling `Core_version` or decoding `RuntimeVersion` failed. ### `InvalidSpecName` @@ -1740,7 +1726,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.errors.system.Unauthorized` - **summary**: The submitted code is not authorized. - ## `utility` ### `InvalidDerivedAccount` diff --git a/docs/subtensor-api/events.md b/docs/subtensor-api/events.md index 0fe35546..3b9c3718 100644 --- a/docs/subtensor-api/events.md +++ b/docs/subtensor-api/events.md @@ -1,6 +1,11 @@ +--- +title: Events +description: "The following page contains runtime events emitted by the Subtensor runtime." +--- + # Events -The following page contains runtime events emitted by the Bittensor (Subtensor) runtime. Accessible via `api.events..`. +The following page contains runtime events emitted by the Subtensor runtime. Accessible via `api.events..`. :::info Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Connected to: `wss://entrypoint-finney.opentensor.ai:443` @@ -57,7 +62,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.adminUtils.Yuma3EnableToggled` - **summary**: Event emitted when the Yuma3 enable is toggled. - ## `balances` ### `BalanceSet(AccountId, u128)` @@ -170,7 +174,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.balances.Withdraw` - **summary**: Some amount was withdrawn from the account (e.g. for transaction fees). - ## `baseFee` ### `BaseFeeOverflow()` @@ -185,7 +188,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.baseFee.NewElasticity` - ## `commitments` ### `Commitment(NetUid, AccountId)` @@ -203,7 +205,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.commitments.TimelockCommitment` - **summary**: A timelock-encrypted commitment was set - ## `contracts` ### `Called(Origin, AccountId)` @@ -211,9 +212,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.contracts.Called` - **summary**: A contract was called either by a plain account or another contract. - **Note:** + **Note:** - Please keep in mind that like all events this is only emitted for successful calls. This is because on failure all storage changes including events are rolled back. + Please keep in mind that like all events this is only emitted for successful calls. This is because on failure all storage changes including events are rolled back. ### `CodeRemoved(H256, u128, AccountId)` @@ -240,9 +241,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.contracts.DelegateCalled` - **summary**: A contract delegate called a code hash. - **Note:** + **Note:** - Please keep in mind that like all events this is only emitted for successful calls. This is because on failure all storage changes including events are rolled back. + Please keep in mind that like all events this is only emitted for successful calls. This is because on failure all storage changes including events are rolled back. ### `Instantiated(AccountId, AccountId)` @@ -264,10 +265,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.contracts.Terminated` - **summary**: Contract has been removed. - **Note:** - - The only way for a contract to be removed and emitting this event is by calling `seal_terminate`. + **Note:** + The only way for a contract to be removed and emitting this event is by calling `seal_terminate`. ## `crowdloan` @@ -321,7 +321,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.crowdloan.Withdrew` - **summary**: A contribution was withdrawn from a failed crowdloan. - ## `drand` ### `BeaconConfigChanged()` @@ -339,7 +338,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.drand.SetOldestStoredRound` - **summary**: Oldest Stored Round has been set. - ## `ethereum` ### `Executed(H160, H160, H256, ExitReason, Vec)` @@ -347,7 +345,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.ethereum.Executed` - **summary**: An ethereum transaction was successfully executed. - ## `evm` ### `Created(H160)` @@ -375,7 +372,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.evm.Log` - **summary**: Ethereum events from contracts. - ## `grandpa` ### `NewAuthorities(AuthorityList)` @@ -393,7 +389,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.grandpa.Resumed` - **summary**: Current authority set has been resumed. - ## `mevShield` ### `EncryptedSubmitted(H256, AccountId)` @@ -456,7 +451,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.mevShield.OnInitializeWeightSet` - **summary**: Maximum on_initialize weight was updated. - ## `multisig` ### `DepositPoked(AccountId, CallHash, u128, u128)` @@ -484,7 +478,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.multisig.NewMultisig` - **summary**: A new multisig operation has begun. - ## `preimage` ### `Cleared(H256)` @@ -502,7 +495,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.preimage.Requested` - **summary**: A preimage has been requested. - ## `proxy` ### `Announced(AccountId, AccountId, CallHashOf)` @@ -545,7 +537,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.proxy.RealPaysFeeSet` - **summary**: The real-pays-fee setting was updated for a proxy relationship. - ## `registry` ### `IdentityDissolved(AccountId)` @@ -558,7 +549,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.registry.IdentitySet` - **summary**: Emitted when a user registers an identity - ## `safeMode` ### `CannotDeposit()` @@ -566,14 +556,14 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.safeMode.CannotDeposit` - **summary**: Could not hold funds for entering or extending the safe-mode. - This error comes from the underlying `Currency`. + This error comes from the underlying `Currency`. ### `CannotRelease()` - **interface**: `api.events.safeMode.CannotRelease` - **summary**: Could not release funds for entering or extending the safe-mode. - This error comes from the underlying `Currency`. + This error comes from the underlying `Currency`. ### `DepositPlaced(AccountId, u128)` @@ -605,7 +595,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.safeMode.Extended` - **summary**: The safe-mode was extended until inclusively this block. - ## `scheduler` ### `AgendaIncomplete(u32)` @@ -658,7 +647,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.scheduler.Scheduled` - **summary**: Scheduled some task. - ## `subtensorModule` ### `ActivityCutoffSet(NetUid, u16)` @@ -696,18 +684,18 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.subtensorModule.AlphaBurned` - **summary**: Alpha have been burned without reducing AlphaOut. - **Parameters:** + **Parameters:** - (coldkey, hotkey, amount, subnet_id) + (coldkey, hotkey, amount, subnet_id) ### `AlphaRecycled(AccountId, AccountId, AlphaBalance, NetUid)` - **interface**: `api.events.subtensorModule.AlphaRecycled` - **summary**: Alpha has been recycled, reducing AlphaOut on a subnet. - **Parameters:** + **Parameters:** - (coldkey, hotkey, amount, subnet_id) + (coldkey, hotkey, amount, subnet_id) ### `AlphaSigmoidSteepnessSet(NetUid, i16)` @@ -733,10 +721,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.subtensorModule.AutoStakeDestinationSet` - **summary**: The auto stake destination has been set. - - - **coldkey**: The account ID of the coldkey. - - **netuid**: The network identifier. - - **hotkey**: The account ID of the hotkey. + - **coldkey**: The account ID of the coldkey. + - **netuid**: The network identifier. + - **hotkey**: The account ID of the hotkey. ### `AxonServed(NetUid, AccountId)` @@ -752,16 +739,14 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.subtensorModule.BatchWeightItemFailed` - **summary**: A weight set among a batch of weights failed. - - - **error**: The dispatch error emitted by the failed item. + - **error**: The dispatch error emitted by the failed item. ### `BatchWeightsCompleted(Vec>, AccountId)` - **interface**: `api.events.subtensorModule.BatchWeightsCompleted` - **summary**: A batch of weights (or commits) have been force-set. - - - **netuids**: The netuids these weights were successfully set/committed for. - - **who**: The hotkey that set this batch. + - **netuids**: The netuids these weights were successfully set/committed for. + - **who**: The hotkey that set this batch. ### `BondsMovingAverageSet(NetUid, u64)` @@ -852,41 +837,36 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.subtensorModule.CommitRevealEnabled` - **summary**: Commit-Reveal has been successfully toggled. - - - **netuid**: The network identifier. - - **Enabled**: Is Commit-Reveal enabled. + - **netuid**: The network identifier. + - **Enabled**: Is Commit-Reveal enabled. ### `CommitRevealPeriodsSet(NetUid, u64)` - **interface**: `api.events.subtensorModule.CommitRevealPeriodsSet` - **summary**: Commit-Reveal periods has been successfully set. - - - **netuid**: The network identifier. - - **periods**: The number of epochs before the reveal. + - **netuid**: The network identifier. + - **periods**: The number of epochs before the reveal. ### `CommitRevealVersionSet(u16)` - **interface**: `api.events.subtensorModule.CommitRevealVersionSet` - **summary**: Commit Reveal Weights version has been updated. - - - **version**: The required version. + - **version**: The required version. ### `CRV3WeightsCommitted(AccountId, NetUidStorageIndex, H256)` - **interface**: `api.events.subtensorModule.CRV3WeightsCommitted` - **summary**: Commit-reveal v3 weights have been successfully committed. - - - **who**: The account ID of the user committing the weights. - - **netuid**: The network identifier. - - **commit_hash**: The hash representing the committed weights. + - **who**: The account ID of the user committing the weights. + - **netuid**: The network identifier. + - **commit_hash**: The hash representing the committed weights. ### `CRV3WeightsRevealed(NetUid, AccountId)` - **interface**: `api.events.subtensorModule.CRV3WeightsRevealed` - **summary**: CRV3 Weights have been successfully revealed. - - - **netuid**: The network identifier. - - **who**: The account ID of the user revealing the weights. + - **netuid**: The network identifier. + - **who**: The account ID of the user revealing the weights. ### `DefaultTakeSet(u16)` @@ -928,9 +908,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.subtensorModule.FirstEmissionBlockNumberSet` - **summary**: FirstEmissionBlockNumber is set via start call extrinsic - **Parameters:** + **Parameters:** - netuid block number + netuid block number ### `HotkeySwapped(AccountId, AccountId, AccountId)` @@ -1107,18 +1087,18 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.subtensorModule.RootClaimed` - **summary**: Root emissions have been claimed for a coldkey on all subnets and hotkeys. - **Parameters:** + **Parameters:** - (coldkey) + (coldkey) ### `RootClaimTypeSet(AccountId, RootClaimTypeEnum)` - **interface**: `api.events.subtensorModule.RootClaimTypeSet` - **summary**: Root claim type for a coldkey has been set. - **Parameters:** + **Parameters:** - (coldkey, u8) + (coldkey, u8) ### `ScalingLawPowerSet(NetUid, u16)` @@ -1160,9 +1140,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.subtensorModule.StakeSwapped` - **summary**: Stake has been swapped from one subnet to another for the same coldkey-hotkey pair. - **Parameters:** + **Parameters:** - (coldkey, hotkey, origin_netuid, destination_netuid, amount) + (coldkey, hotkey, origin_netuid, destination_netuid, amount) ### `StakeThresholdSet(u64)` @@ -1174,9 +1154,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.subtensorModule.StakeTransferred` - **summary**: Stake has been transferred from one coldkey to another on the same subnet. - **Parameters:** + **Parameters:** - (origin_coldkey, destination_coldkey, hotkey, origin_netuid, destination_netuid, amount) + (origin_coldkey, destination_coldkey, hotkey, origin_netuid, destination_netuid, amount) ### `StartCallDelaySet(u64)` @@ -1223,9 +1203,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.subtensorModule.SubnetOwnerHotkeySet` - **summary**: The owner hotkey for a subnet has been set. - **Parameters:** + **Parameters:** - (netuid, new_hotkey) + (netuid, new_hotkey) ### `Sudid(DispatchResult)` @@ -1256,35 +1236,33 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.subtensorModule.TimelockedWeightsCommitted` - **summary**: Timelocked weights have been successfully committed. - - - **who**: The account ID of the user committing the weights. - - **netuid**: The network identifier. - - **commit_hash**: The hash representing the committed weights. - - **reveal_round**: The round at which weights can be revealed. + - **who**: The account ID of the user committing the weights. + - **netuid**: The network identifier. + - **commit_hash**: The hash representing the committed weights. + - **reveal_round**: The round at which weights can be revealed. ### `TimelockedWeightsRevealed(NetUidStorageIndex, AccountId)` - **interface**: `api.events.subtensorModule.TimelockedWeightsRevealed` - **summary**: Timelocked Weights have been successfully revealed. - - - **netuid**: The network identifier. - - **who**: The account ID of the user revealing the weights. + - **netuid**: The network identifier. + - **who**: The account ID of the user revealing the weights. ### `TransactionFeePaidWithAlpha(AccountId, NetUid, AlphaBalance, TaoBalance)` - **interface**: `api.events.subtensorModule.TransactionFeePaidWithAlpha` - **summary**: Transaction fee was paid in Alpha. - Emitted in addition to `TransactionFeePaid` when the fee payment path is Alpha. `alpha_fee` is the exact Alpha amount deducted. + Emitted in addition to `TransactionFeePaid` when the fee payment path is Alpha. `alpha_fee` is the exact Alpha amount deducted. ### `TransferToggle(NetUid, bool)` - **interface**: `api.events.subtensorModule.TransferToggle` - **summary**: Event called when transfer is toggled on a subnet. - **Parameters:** + **Parameters:** - (netuid, bool) + (netuid, bool) ### `TxChildKeyTakeRateLimitSet(u64)` @@ -1330,28 +1308,25 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.subtensorModule.WeightsBatchRevealed` - **summary**: Weights have been successfully batch revealed. - - - **who**: The account ID of the user revealing the weights. - - **netuid**: The network identifier. - - **revealed_hashes**: A vector of hashes representing each revealed weight set. + - **who**: The account ID of the user revealing the weights. + - **netuid**: The network identifier. + - **revealed_hashes**: A vector of hashes representing each revealed weight set. ### `WeightsCommitted(AccountId, NetUidStorageIndex, H256)` - **interface**: `api.events.subtensorModule.WeightsCommitted` - **summary**: Weights have been successfully committed. - - - **who**: The account ID of the user committing the weights. - - **netuid**: The network identifier. - - **commit_hash**: The hash representing the committed weights. + - **who**: The account ID of the user committing the weights. + - **netuid**: The network identifier. + - **commit_hash**: The hash representing the committed weights. ### `WeightsRevealed(AccountId, NetUidStorageIndex, H256)` - **interface**: `api.events.subtensorModule.WeightsRevealed` - **summary**: Weights have been successfully revealed. - - - **who**: The account ID of the user revealing the weights. - - **netuid**: The network identifier. - - **commit_hash**: The hash of the revealed weights. + - **who**: The account ID of the user revealing the weights. + - **netuid**: The network identifier. + - **commit_hash**: The hash of the revealed weights. ### `WeightsSet(NetUidStorageIndex, u16)` @@ -1368,7 +1343,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.subtensorModule.WeightsVersionKeySet` - **summary**: weights version key is set for a network. - ## `sudo` ### `KeyChanged(Option, AccountId)` @@ -1391,7 +1365,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.sudo.SudoAsDone` - **summary**: A sudo_as call just took place. - ## `swap` ### `FeeRateSet(NetUid, u16)` @@ -1419,7 +1392,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.swap.UserLiquidityToggled` - **summary**: Event emitted when user liquidity operations are enabled for a subnet. First enable even indicates a switch from V2 to V3 swap. - ## `system` ### `CodeUpdated()` @@ -1462,7 +1434,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.system.UpgradeAuthorized` - **summary**: An upgrade was authorized. - ## `transactionPayment` ### `TransactionFeePaid(AccountId, u128, u128)` @@ -1470,7 +1441,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.events.transactionPayment.TransactionFeePaid` - **summary**: A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee, has been paid by `who`. - ## `utility` ### `BatchCompleted()` diff --git a/docs/subtensor-api/extrinsics.md b/docs/subtensor-api/extrinsics.md index 45216e46..2cef5aa8 100644 --- a/docs/subtensor-api/extrinsics.md +++ b/docs/subtensor-api/extrinsics.md @@ -1,6 +1,11 @@ +--- +title: Extrinsics +description: "The following sections contain Extrinsic methods that are part of the Subtensor runtime." +--- + # Extrinsics -The following sections contain Extrinsic methods that are part of the Bittensor (Subtensor) runtime. On the API, these are exposed via `api.tx..`. +The following sections contain Extrinsic methods that are part of the Subtensor runtime. On the API, these are exposed via `api.tx..`. :::info Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Connected to: `wss://entrypoint-finney.opentensor.ai:443` @@ -37,13 +42,13 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.adminUtils.scheduleGrandpaChange` - **summary**: A public interface for `pallet_grandpa::Pallet::schedule_grandpa_change`. - Schedule a change in the authorities. + Schedule a change in the authorities. - The change will be applied at the end of execution of the block `in_blocks` after the current block. This value may be 0, in which case the change is applied at the end of the current block. + The change will be applied at the end of execution of the block `in_blocks` after the current block. This value may be 0, in which case the change is applied at the end of the current block. - If the `forced` parameter is defined, this indicates that the current set has been synchronously determined to be offline and that after `in_blocks` the given change should be applied. The given block number indicates the median last finalized block number and it should be used as the canon block when starting the new grandpa voter. + If the `forced` parameter is defined, this indicates that the current set has been synchronously determined to be offline and that after `in_blocks` the given change should be applied. The given block number indicates the median last finalized block number and it should be used as the canon block when starting the new grandpa voter. - No change should be signaled while any change is pending. Returns an error if a change is already pending. + No change should be signaled while any change is pending. Returns an error if a change is already pending. ### `sudoSetActivityCutoff(netuid: NetUid, activity_cutoff: u16)` @@ -68,23 +73,21 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne ### `sudoSetAlphaSigmoidSteepness(netuid: NetUid, steepness: i16)` - **interface**: `api.tx.adminUtils.sudoSetAlphaSigmoidSteepness` -- **summary**: **Arguments:** - - - `origin` — The origin of the call, which must be the root account. - - `netuid` — The unique identifier for the subnet. - - `steepness` — The Steepness for the alpha sigmoid function. (range is 0-int16::MAX, +- **summary**: **Arguments:** + - `origin` — The origin of the call, which must be the root account. + - `netuid` — The unique identifier for the subnet. + - `steepness` — The Steepness for the alpha sigmoid function. (range is 0-int16::MAX, negative values are reserved for future use) - **Errors:** - - - `BadOrigin` — If the caller is not the root account. - - `SubnetDoesNotExist` — If the specified subnet does not exist. - - `NegativeSigmoidSteepness` — If the steepness is negative and the caller is + **Errors:** + - `BadOrigin` — If the caller is not the root account. + - `SubnetDoesNotExist` — If the specified subnet does not exist. + - `NegativeSigmoidSteepness` — If the steepness is negative and the caller is root. - **Weight:** + **Weight:** - Weight is handled by the `#[pallet::weight]` attribute. + Weight is handled by the `#[pallet::weight]` attribute. ### `sudoSetAlphaValues(netuid: NetUid, alpha_low: u16, alpha_high: u16)` @@ -106,15 +109,14 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.adminUtils.sudoSetBondsResetEnabled` - **summary**: Enables or disables Bonds Reset for a given subnet. - **Parameters:** - - - `origin`: The origin of the call, which must be the root account or subnet owner. - - `netuid`: The unique identifier for the subnet. - - `enabled`: A boolean flag to enable or disable Bonds Reset. + **Parameters:** + - `origin`: The origin of the call, which must be the root account or subnet owner. + - `netuid`: The unique identifier for the subnet. + - `enabled`: A boolean flag to enable or disable Bonds Reset. - **Weight:** + **Weight:** - This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees. + This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees. ### `sudoSetBurnHalfLife(netuid: NetUid, burn_half_life: u16)` @@ -156,22 +158,20 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.adminUtils.sudoSetCommitRevealWeightsInterval` - **summary**: Sets the commit-reveal weights periods for a specific subnet. - This extrinsic allows the subnet owner or root account to set the duration (in epochs) during which committed weights must be revealed. The commit-reveal mechanism ensures that users commit weights in advance and reveal them only within a specified period. + This extrinsic allows the subnet owner or root account to set the duration (in epochs) during which committed weights must be revealed. The commit-reveal mechanism ensures that users commit weights in advance and reveal them only within a specified period. - **Arguments:** + **Arguments:** + - `origin` — The origin of the call, which must be the subnet owner or the root account. + - `netuid` — The unique identifier of the subnet for which the periods are being set. + - `periods` — The number of epochs that define the commit-reveal period. - - `origin` — The origin of the call, which must be the subnet owner or the root account. - - `netuid` — The unique identifier of the subnet for which the periods are being set. - - `periods` — The number of epochs that define the commit-reveal period. + **Errors:** + - `BadOrigin` — If the caller is neither the subnet owner nor the root account. + - `SubnetDoesNotExist` — If the specified subnet does not exist. - **Errors:** + **Weight:** - - `BadOrigin` — If the caller is neither the subnet owner nor the root account. - - `SubnetDoesNotExist` — If the specified subnet does not exist. - - **Weight:** - - Weight is handled by the `#[pallet::weight]` attribute. + Weight is handled by the `#[pallet::weight]` attribute. ### `sudoSetDefaultTake(default_take: u16)` @@ -188,54 +188,48 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.adminUtils.sudoSetDissolveNetworkScheduleDuration` - **summary**: Sets the duration of the dissolve network schedule. - This extrinsic allows the root account to set the duration for the dissolve network schedule. The dissolve network schedule determines how long it takes for a network dissolution operation to complete. - - **Arguments:** + This extrinsic allows the root account to set the duration for the dissolve network schedule. The dissolve network schedule determines how long it takes for a network dissolution operation to complete. - - `origin` — The origin of the call, which must be the root account. - - `duration` — The new duration for the dissolve network schedule, in number of blocks. + **Arguments:** + - `origin` — The origin of the call, which must be the root account. + - `duration` — The new duration for the dissolve network schedule, in number of blocks. - **Errors:** + **Errors:** + - `BadOrigin` — If the caller is not the root account. - - `BadOrigin` — If the caller is not the root account. + **Weight:** - **Weight:** - - Weight is handled by the `#[pallet::weight]` attribute. + Weight is handled by the `#[pallet::weight]` attribute. ### `sudoSetEmaPriceHalvingPeriod(netuid: NetUid, ema_halving: u64)` - **interface**: `api.tx.adminUtils.sudoSetEmaPriceHalvingPeriod` -- **summary**: **Arguments:** - - - `origin` — The origin of the call, which must be the root account. - - `ema_alpha_period` — Number of blocks for EMA price to halve +- **summary**: **Arguments:** + - `origin` — The origin of the call, which must be the root account. + - `ema_alpha_period` — Number of blocks for EMA price to halve - **Errors:** + **Errors:** + - `BadOrigin` — If the caller is not the root account. - - `BadOrigin` — If the caller is not the root account. + **Weight:** - **Weight:** - - Weight is handled by the `#[pallet::weight]` attribute. + Weight is handled by the `#[pallet::weight]` attribute. ### `sudoSetEvmChainId(chain_id: u64)` - **interface**: `api.tx.adminUtils.sudoSetEvmChainId` - **summary**: Sets the EVM ChainID. - **Arguments:** - - - `origin` — The origin of the call, which must be the subnet owner or the root account. - - `chainId` — The u64 chain ID + **Arguments:** + - `origin` — The origin of the call, which must be the subnet owner or the root account. + - `chainId` — The u64 chain ID - **Errors:** + **Errors:** + - `BadOrigin` — If the caller is neither the subnet owner nor the root account. - - `BadOrigin` — If the caller is neither the subnet owner nor the root account. + **Weight:** - **Weight:** - - Weight is handled by the `#[pallet::weight]` attribute. + Weight is handled by the `#[pallet::weight]` attribute. ### `sudoSetImmunityPeriod(netuid: NetUid, immunity_period: u16)` @@ -252,15 +246,14 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.adminUtils.sudoSetLiquidAlphaEnabled` - **summary**: Enables or disables Liquid Alpha for a given subnet. - **Parameters:** - - - `origin`: The origin of the call, which must be the root account or subnet owner. - - `netuid`: The unique identifier for the subnet. - - `enabled`: A boolean flag to enable or disable Liquid Alpha. + **Parameters:** + - `origin`: The origin of the call, which must be the root account or subnet owner. + - `netuid`: The unique identifier for the subnet. + - `enabled`: A boolean flag to enable or disable Liquid Alpha. - **Weight:** + **Weight:** - This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees. + This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees. ### `sudoSetLockReductionInterval(interval: u64)` @@ -387,11 +380,10 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.adminUtils.sudoSetRecycleOrBurn` - **summary**: Set the behaviour of the "burn" UID(s) for a given subnet. If set to `Burn`, the miner emission sent to the burn UID(s) will be burned. If set to `Recycle`, the miner emission sent to the burn UID(s) will be recycled. - **Parameters:** - - - `origin`: The origin of the call, which must be the root account or subnet owner. - - `netuid`: The unique identifier for the subnet. - - `recycle_or_burn`: The desired behaviour of the "burn" UID(s) for the subnet. + **Parameters:** + - `origin`: The origin of the call, which must be the root account or subnet owner. + - `netuid`: The unique identifier for the subnet. + - `recycle_or_burn`: The desired behaviour of the "burn" UID(s) for the subnet. ### `sudoSetRho(netuid: NetUid, rho: u16)` @@ -408,38 +400,34 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.adminUtils.sudoSetSnOwnerHotkey` - **summary**: Sets or updates the hotkey account associated with the owner of a specific subnet. - This function allows either the root origin or the current subnet owner to set or update the hotkey for a given subnet. The subnet must already exist. To prevent abuse, the call is rate-limited to once per configured interval (default: one week) per subnet. + This function allows either the root origin or the current subnet owner to set or update the hotkey for a given subnet. The subnet must already exist. To prevent abuse, the call is rate-limited to once per configured interval (default: one week) per subnet. - **Parameters:** + **Parameters:** + - `origin`: The dispatch origin of the call. Must be either root or the current owner of the subnet. + - `netuid`: The unique identifier of the subnet whose owner hotkey is being set. + - `hotkey`: The new hotkey account to associate with the subnet owner. - - `origin`: The dispatch origin of the call. Must be either root or the current owner of the subnet. - - `netuid`: The unique identifier of the subnet whose owner hotkey is being set. - - `hotkey`: The new hotkey account to associate with the subnet owner. + **Returns:** + - `DispatchResult`: Returns `Ok(())` if the hotkey was successfully set, or an appropriate error otherwise. - **Returns:** + **Errors:** + - `Error::SubnetNotExists`: If the specified subnet does not exist. + - `Error::TxRateLimitExceeded`: If the function is called more frequently than the allowed rate limit. - - `DispatchResult`: Returns `Ok(())` if the hotkey was successfully set, or an appropriate error otherwise. + **Access Control:** - **Errors:** + Only callable by: + - Root origin, or + - The coldkey account that owns the subnet. - - `Error::SubnetNotExists`: If the specified subnet does not exist. - - `Error::TxRateLimitExceeded`: If the function is called more frequently than the allowed rate limit. + **Storage:** + - Updates [`SubnetOwnerHotkey`] for the given `netuid`. + - Reads and updates [`LastRateLimitedBlock`] for rate-limiting. + - Reads [`DefaultSetSNOwnerHotkeyRateLimit`] to determine the interval between allowed updates. - **Access Control:** + **Rate Limiting:** - Only callable by: - - Root origin, or - - The coldkey account that owns the subnet. - - **Storage:** - - - Updates [`SubnetOwnerHotkey`] for the given `netuid`. - - Reads and updates [`LastRateLimitedBlock`] for rate-limiting. - - Reads [`DefaultSetSNOwnerHotkeyRateLimit`] to determine the interval between allowed updates. - - **Rate Limiting:** - - This function is rate-limited to one call per subnet per interval (e.g., one week). + This function is rate-limited to one call per subnet per interval (e.g., one week). ### `sudoSetStakeThreshold(min_stake: u64)` @@ -459,18 +447,16 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne ### `sudoSetSubnetMovingAlpha(alpha: I96F32)` - **interface**: `api.tx.adminUtils.sudoSetSubnetMovingAlpha` -- **summary**: **Arguments:** +- **summary**: **Arguments:** + - `origin` — The origin of the call, which must be the root account. + - `alpha` — The new moving alpha value for the SubnetMovingAlpha. - - `origin` — The origin of the call, which must be the root account. - - `alpha` — The new moving alpha value for the SubnetMovingAlpha. + **Errors:** + - `BadOrigin` — If the caller is not the root account. - **Errors:** + **Weight:** - - `BadOrigin` — If the caller is not the root account. - - **Weight:** - - Weight is handled by the `#[pallet::weight]` attribute. + Weight is handled by the `#[pallet::weight]` attribute. ### `sudoSetSubnetOwnerCut(subnet_owner_cut: u16)` @@ -482,38 +468,34 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.adminUtils.sudoSetSubnetOwnerHotkey` - **summary**: Change the SubnetOwnerHotkey for a given subnet. - **Arguments:** - - - `origin` — The origin of the call, which must be the subnet owner. - - `netuid` — The unique identifier for the subnet. - - `hotkey` — The new hotkey for the subnet owner. + **Arguments:** + - `origin` — The origin of the call, which must be the subnet owner. + - `netuid` — The unique identifier for the subnet. + - `hotkey` — The new hotkey for the subnet owner. - **Errors:** + **Errors:** + - `BadOrigin` — If the caller is not the subnet owner or root account. - - `BadOrigin` — If the caller is not the subnet owner or root account. + **Weight:** - **Weight:** - - Weight is handled by the `#[pallet::weight]` attribute. + Weight is handled by the `#[pallet::weight]` attribute. ### `sudoSetSubtokenEnabled(netuid: NetUid, subtoken_enabled: bool)` - **interface**: `api.tx.adminUtils.sudoSetSubtokenEnabled` - **summary**: Enables or disables subtoken trading for a given subnet. - **Arguments:** - - - `origin` — The origin of the call, which must be the root account. - - `netuid` — The unique identifier of the subnet. - - `subtoken_enabled` — A boolean indicating whether subtoken trading should be enabled or disabled. - - **Errors:** + **Arguments:** + - `origin` — The origin of the call, which must be the root account. + - `netuid` — The unique identifier of the subnet. + - `subtoken_enabled` — A boolean indicating whether subtoken trading should be enabled or disabled. - - `BadOrigin` — If the caller is not the root account. + **Errors:** + - `BadOrigin` — If the caller is not the root account. - **Weight:** + **Weight:** - Weight is handled by the `#[pallet::weight]` attribute. + Weight is handled by the `#[pallet::weight]` attribute. ### `sudoSetTaoFlowCutoff(flow_cutoff: I64F64)` @@ -545,15 +527,14 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.adminUtils.sudoSetToggleTransfer` - **summary**: Enable or disable atomic alpha transfers for a given subnet. - **Parameters:** + **Parameters:** + - `origin`: The origin of the call, which must be the root account or subnet owner. + - `netuid`: The unique identifier for the subnet. + - `enabled`: A boolean flag to enable or disable Liquid Alpha. - - `origin`: The origin of the call, which must be the root account or subnet owner. - - `netuid`: The unique identifier for the subnet. - - `enabled`: A boolean flag to enable or disable Liquid Alpha. + **Weight:** - **Weight:** - - This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees. + This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees. ### `sudoSetTotalIssuance(total_issuance: TaoBalance)` @@ -585,48 +566,44 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.adminUtils.sudoSetYuma3Enabled` - **summary**: Enables or disables Yuma3 for a given subnet. - **Parameters:** - - - `origin`: The origin of the call, which must be the root account or subnet owner. - - `netuid`: The unique identifier for the subnet. - - `enabled`: A boolean flag to enable or disable Yuma3. + **Parameters:** + - `origin`: The origin of the call, which must be the root account or subnet owner. + - `netuid`: The unique identifier for the subnet. + - `enabled`: A boolean flag to enable or disable Yuma3. - **Weight:** + **Weight:** - This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees. + This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees. ### `sudoToggleEvmPrecompile(precompile_id: PrecompileEnum, enabled: bool)` - **interface**: `api.tx.adminUtils.sudoToggleEvmPrecompile` - **summary**: Toggles the enablement of an EVM precompile. - **Arguments:** - - - `origin` — The origin of the call, which must be the root account. - - `precompile_id` — The identifier of the EVM precompile to toggle. - - `enabled` — The new enablement state of the precompile. + **Arguments:** + - `origin` — The origin of the call, which must be the root account. + - `precompile_id` — The identifier of the EVM precompile to toggle. + - `enabled` — The new enablement state of the precompile. - **Errors:** + **Errors:** + - `BadOrigin` — If the caller is not the root account. - - `BadOrigin` — If the caller is not the root account. + **Weight:** - **Weight:** - - Weight is handled by the `#[pallet::weight]` attribute. + Weight is handled by the `#[pallet::weight]` attribute. ### `sudoTrimToMaxAllowedUids(netuid: NetUid, max_n: u16)` - **interface**: `api.tx.adminUtils.sudoTrimToMaxAllowedUids` - **summary**: Trims the maximum number of UIDs for a subnet. - The trimming is done by sorting the UIDs by emission descending and then trimming the lowest emitters while preserving temporally and owner immune UIDs. The UIDs are then compressed to the left and storage is migrated to the new compressed UIDs. + The trimming is done by sorting the UIDs by emission descending and then trimming the lowest emitters while preserving temporally and owner immune UIDs. The UIDs are then compressed to the left and storage is migrated to the new compressed UIDs. ### `swapAuthorities(new_authorities: BoundedVec)` - **interface**: `api.tx.adminUtils.swapAuthorities` - **summary**: The extrinsic sets the new authorities for Aura consensus. It is only callable by the root account. The extrinsic will call the Aura pallet to change the authorities. - ## `balances` ### `burn(value: u128, keep_alive: bool)` @@ -634,25 +611,25 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.balances.burn` - **summary**: Burn the specified liquid free balance from the origin account. - If the origin's account ends up below the existential deposit as a result of the burn and `keep_alive` is false, the account will be reaped. + If the origin's account ends up below the existential deposit as a result of the burn and `keep_alive` is false, the account will be reaped. - Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible, this `burn` operation will reduce total issuance by the amount _burned_. + Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible, this `burn` operation will reduce total issuance by the amount _burned_. ### `forceAdjustTotalIssuance(direction: AdjustmentDirection, delta: u128)` - **interface**: `api.tx.balances.forceAdjustTotalIssuance` - **summary**: Adjust the total issuance in a saturating way. - Can only be called by root and always needs a positive `delta`. + Can only be called by root and always needs a positive `delta`. - **Example:** + **Example:** ### `forceSetBalance(who: MultiAddress, new_free: u128)` - **interface**: `api.tx.balances.forceSetBalance` - **summary**: Set the regular balance of a given account. - The dispatch origin for this call is `root`. + The dispatch origin for this call is `root`. ### `forceTransfer(source: MultiAddress, dest: MultiAddress, value: u128)` @@ -664,19 +641,18 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.balances.forceUnreserve` - **summary**: Unreserve some balance from a user by force. - Can only be called by ROOT. + Can only be called by ROOT. ### `transferAll(dest: MultiAddress, keep_alive: bool)` - **interface**: `api.tx.balances.transferAll` - **summary**: Transfer the entire transferable balance from the caller account. - NOTE: This function only attempts to transfer _transferable_ balances. This means that any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... + NOTE: This function only attempts to transfer _transferable_ balances. This means that any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... - The dispatch origin of this call must be Signed. - - - `dest`: The recipient of the transfer. - - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all + The dispatch origin of this call must be Signed. + - `dest`: The recipient of the transfer. + - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all of the funds the account has, causing the sender account to be killed (false), or transfer everything except at least the existential deposit, which will guarantee to keep the sender account alive (true). ### `transferAllowDeath(dest: MultiAddress, value: u128)` @@ -684,27 +660,25 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.balances.transferAllowDeath` - **summary**: Transfer some liquid free balance to another account. - `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. If the sender's account is below the existential deposit as a result of the transfer, the account will be reaped. + `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. If the sender's account is below the existential deposit as a result of the transfer, the account will be reaped. - The dispatch origin for this call must be `Signed` by the transactor. + The dispatch origin for this call must be `Signed` by the transactor. ### `transferKeepAlive(dest: MultiAddress, value: u128)` - **interface**: `api.tx.balances.transferKeepAlive` - **summary**: Same as the [`transfer_allow_death`] call, but with a check that the transfer will not kill the origin account. - 99% of the time you want [`transfer_allow_death`] instead. + 99% of the time you want [`transfer_allow_death`] instead. ### `upgradeAccounts(who: Vec)` - **interface**: `api.tx.balances.upgradeAccounts` - **summary**: Upgrade a specified account. + - `origin`: Must be `Signed`. + - `who`: The account to be upgraded. - - `origin`: Must be `Signed`. - - `who`: The account to be upgraded. - - This will waive the transaction fee if at least all but 10% of the accounts needed to be upgraded. (We let some not have to be upgraded just in order to allow for the possibility of churn). - + This will waive the transaction fee if at least all but 10% of the accounts needed to be upgraded. (We let some not have to be upgraded just in order to allow for the possibility of churn). ## `baseFee` @@ -716,7 +690,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.baseFee.setElasticity` - ## `commitments` ### `setCommitment(netuid: NetUid, info: Box>)` @@ -729,7 +702,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.commitments.setMaxSpace` - **summary**: Sudo-set MaxSpace - ## `contracts` ### `call(dest: MultiAddress, value: u128, gas_limit: Weight, storage_deposit_limit: Option< as codec::HasCompact>::Type>, data: Vec)` @@ -737,19 +709,18 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.contracts.call` - **summary**: Makes a call to an account, optionally transferring some balance. - **Parameters:** - - - `dest`: Address of the contract to call. - - `value`: The balance to transfer from the `origin` to `dest`. - - `gas_limit`: The gas limit enforced when executing the constructor. - - `storage_deposit_limit`: The maximum amount of balance that can be charged from the + **Parameters:** + - `dest`: Address of the contract to call. + - `value`: The balance to transfer from the `origin` to `dest`. + - `gas_limit`: The gas limit enforced when executing the constructor. + - `storage_deposit_limit`: The maximum amount of balance that can be charged from the caller to pay for the storage consumed. - - `data`: The input data to pass to the contract. + - `data`: The input data to pass to the contract. - - If the account is a smart-contract account, the associated code will be + - If the account is a smart-contract account, the associated code will be executed and any value will be transferred. - - If the account is a regular account, any value will be transferred. - - If no account exists and the call value is not less than `existential_deposit`, + - If the account is a regular account, any value will be transferred. + - If no account exists and the call value is not less than `existential_deposit`, a regular account will be created and any value will be transferred. ### `callOldWeight(dest: MultiAddress, value: u128, gas_limit: OldWeight, storage_deposit_limit: Option< as codec::HasCompact>::Type>, data: Vec)` @@ -762,7 +733,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.contracts.instantiate` - **summary**: Instantiates a contract from a previously deployed wasm binary. - This function is identical to [`Self::instantiate_with_code`] but without the code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary must be supplied. + This function is identical to [`Self::instantiate_with_code`] but without the code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary must be supplied. ### `instantiateOldWeight(value: u128, gas_limit: OldWeight, storage_deposit_limit: Option< as codec::HasCompact>::Type>, code_hash: CodeHash, data: Vec, salt: Vec)` @@ -774,26 +745,24 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.contracts.instantiateWithCode` - **summary**: Instantiates a new contract from the supplied `code` optionally transferring some balance. - This dispatchable has the same effect as calling [`Self::upload_code`] + [`Self::instantiate`]. Bundling them together provides efficiency gains. Please also check the documentation of [`Self::upload_code`]. - - **Parameters:** + This dispatchable has the same effect as calling [`Self::upload_code`] + [`Self::instantiate`]. Bundling them together provides efficiency gains. Please also check the documentation of [`Self::upload_code`]. - - `value`: The balance to transfer from the `origin` to the newly created contract. - - `gas_limit`: The gas limit enforced when executing the constructor. - - `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved + **Parameters:** + - `value`: The balance to transfer from the `origin` to the newly created contract. + - `gas_limit`: The gas limit enforced when executing the constructor. + - `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved from the caller to pay for the storage consumed. - - `code`: The contract code to deploy in raw bytes. - - `data`: The input data to pass to the contract constructor. - - `salt`: Used for the address derivation. See [`Pallet::contract_address`]. - - Instantiation is executed as follows: - - - The supplied `code` is deployed, and a `code_hash` is created for that code. - - If the `code_hash` already exists on the chain the underlying `code` will be shared. - - The destination address is computed based on the sender, code_hash and the salt. - - The smart-contract account is created at the computed address. - - The `value` is transferred to the new account. - - The `deploy` function is executed in the context of the newly-created account. + - `code`: The contract code to deploy in raw bytes. + - `data`: The input data to pass to the contract constructor. + - `salt`: Used for the address derivation. See [`Pallet::contract_address`]. + + Instantiation is executed as follows: + - The supplied `code` is deployed, and a `code_hash` is created for that code. + - If the `code_hash` already exists on the chain the underlying `code` will be shared. + - The destination address is computed based on the sender, code_hash and the salt. + - The smart-contract account is created at the computed address. + - The `value` is transferred to the new account. + - The `deploy` function is executed in the context of the newly-created account. ### `instantiateWithCodeOldWeight(value: u128, gas_limit: OldWeight, storage_deposit_limit: Option< as codec::HasCompact>::Type>, code: Vec, data: Vec, salt: Vec)` @@ -810,37 +779,35 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.contracts.removeCode` - **summary**: Remove the code stored under `code_hash` and refund the deposit to its owner. - A code can only be removed by its original uploader (its owner) and only if it is not used by any contract. + A code can only be removed by its original uploader (its owner) and only if it is not used by any contract. ### `setCode(dest: MultiAddress, code_hash: CodeHash)` - **interface**: `api.tx.contracts.setCode` - **summary**: Privileged function that changes the code of an existing contract. - This takes care of updating refcounts and all other necessary operations. Returns an error if either the `code_hash` or `dest` do not exist. + This takes care of updating refcounts and all other necessary operations. Returns an error if either the `code_hash` or `dest` do not exist. - **Note:** + **Note:** - This does **not** change the address of the contract in question. This means that the contract address is no longer derived from its code hash after calling this dispatchable. + This does **not** change the address of the contract in question. This means that the contract address is no longer derived from its code hash after calling this dispatchable. ### `uploadCode(code: Vec, storage_deposit_limit: Option< as codec::HasCompact>::Type>, determinism: Determinism)` - **interface**: `api.tx.contracts.uploadCode` - **summary**: Upload new `code` without instantiating a contract from it. - If the code does not already exist a deposit is reserved from the caller and unreserved only when [`Self::remove_code`] is called. The size of the reserve depends on the size of the supplied `code`. - - If the code already exists in storage it will still return `Ok` and upgrades the in storage version to the current `InstructionWeights::version`. + If the code does not already exist a deposit is reserved from the caller and unreserved only when [`Self::remove_code`] is called. The size of the reserve depends on the size of the supplied `code`. - - `determinism`: If this is set to any other value but [`Determinism::Enforced`] then + If the code already exists in storage it will still return `Ok` and upgrades the in storage version to the current `InstructionWeights::version`. + - `determinism`: If this is set to any other value but [`Determinism::Enforced`] then the only way to use this code is to delegate call into it from an offchain execution. Set to [`Determinism::Enforced`] if in doubt. - **Note:** - - Anyone can instantiate a contract from any uploaded code and thus prevent its removal. To avoid this situation a constructor could employ access control so that it can only be instantiated by permissioned entities. The same is true when uploading through [`Self::instantiate_with_code`]. + **Note:** - Use [`Determinism::Relaxed`] exclusively for non-deterministic code. If the uploaded code is deterministic, specifying [`Determinism::Relaxed`] will be disregarded and result in higher gas costs. + Anyone can instantiate a contract from any uploaded code and thus prevent its removal. To avoid this situation a constructor could employ access control so that it can only be instantiated by permissioned entities. The same is true when uploading through [`Self::instantiate_with_code`]. + Use [`Determinism::Relaxed`] exclusively for non-deterministic code. If the uploaded code is deterministic, specifying [`Determinism::Relaxed`] will be disregarded and result in higher gas costs. ## `crowdloan` @@ -849,121 +816,111 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.crowdloan.contribute` - **summary**: Contribute to an active crowdloan. - The contribution will be transfered to the crowdloan account and will be refunded if the crowdloan fails to raise the cap. If the contribution would raise the amount above the cap, the contribution will be set to the amount that is left to be raised. + The contribution will be transfered to the crowdloan account and will be refunded if the crowdloan fails to raise the cap. If the contribution would raise the amount above the cap, the contribution will be set to the amount that is left to be raised. - The dispatch origin for this call must be _Signed_. + The dispatch origin for this call must be _Signed_. - **Parameters:** - - - `crowdloan_id`: The id of the crowdloan to contribute to. - - `amount`: The amount to contribute. + **Parameters:** + - `crowdloan_id`: The id of the crowdloan to contribute to. + - `amount`: The amount to contribute. ### `create(deposit: u128, min_contribution: u128, cap: u128, end: u32, call: Option>, target_address: Option)` - **interface**: `api.tx.crowdloan.create` - **summary**: Create a crowdloan that will raise funds up to a maximum cap and if successful, will transfer funds to the target address if provided and dispatch the call (using creator origin). - The initial deposit will be transfered to the crowdloan account and will be refunded in case the crowdloan fails to raise the cap. Additionally, the creator will pay for the execution of the call. - - The dispatch origin for this call must be _Signed_. + The initial deposit will be transfered to the crowdloan account and will be refunded in case the crowdloan fails to raise the cap. Additionally, the creator will pay for the execution of the call. - **Parameters:** + The dispatch origin for this call must be _Signed_. - - `deposit`: The initial deposit from the creator. - - `min_contribution`: The minimum contribution required to contribute to the crowdloan. - - `cap`: The maximum amount of funds that can be raised. - - `end`: The block number at which the crowdloan will end. - - `call`: The call to dispatch when the crowdloan is finalized. - - `target_address`: The address to transfer the raised funds to if provided. + **Parameters:** + - `deposit`: The initial deposit from the creator. + - `min_contribution`: The minimum contribution required to contribute to the crowdloan. + - `cap`: The maximum amount of funds that can be raised. + - `end`: The block number at which the crowdloan will end. + - `call`: The call to dispatch when the crowdloan is finalized. + - `target_address`: The address to transfer the raised funds to if provided. ### `dissolve(crowdloan_id: CrowdloanId)` - **interface**: `api.tx.crowdloan.dissolve` - **summary**: Dissolve a crowdloan. - The crowdloan will be removed from the storage. All contributions must have been refunded before the crowdloan can be dissolved (except the creator's one). + The crowdloan will be removed from the storage. All contributions must have been refunded before the crowdloan can be dissolved (except the creator's one). - The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. + The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. - **Parameters:** - - - `crowdloan_id`: The id of the crowdloan to dissolve. + **Parameters:** + - `crowdloan_id`: The id of the crowdloan to dissolve. ### `finalize(crowdloan_id: CrowdloanId)` - **interface**: `api.tx.crowdloan.finalize` - **summary**: Finalize crowdloan that has reached the cap. - The call will transfer the raised amount to the target address if it was provided when the crowdloan was created and dispatch the call that was provided using the creator origin. The CurrentCrowdloanId will be set to the crowdloan id being finalized so the dispatched call can access it temporarily by accessing the `CurrentCrowdloanId` storage item. - - The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. + The call will transfer the raised amount to the target address if it was provided when the crowdloan was created and dispatch the call that was provided using the creator origin. The CurrentCrowdloanId will be set to the crowdloan id being finalized so the dispatched call can access it temporarily by accessing the `CurrentCrowdloanId` storage item. - **Parameters:** + The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. - - `crowdloan_id`: The id of the crowdloan to finalize. + **Parameters:** + - `crowdloan_id`: The id of the crowdloan to finalize. ### `refund(crowdloan_id: CrowdloanId)` - **interface**: `api.tx.crowdloan.refund` - **summary**: Refund contributors of a non-finalized crowdloan. - The call will try to refund all contributors (excluding the creator) up to the limit defined by the `RefundContributorsLimit`. If the limit is reached, the call will stop and the crowdloan will be marked as partially refunded. It may be needed to dispatch this call multiple times to refund all contributors. + The call will try to refund all contributors (excluding the creator) up to the limit defined by the `RefundContributorsLimit`. If the limit is reached, the call will stop and the crowdloan will be marked as partially refunded. It may be needed to dispatch this call multiple times to refund all contributors. - The dispatch origin for this call must be _Signed_ and doesn't need to be the creator of the crowdloan. + The dispatch origin for this call must be _Signed_ and doesn't need to be the creator of the crowdloan. - **Parameters:** - - - `crowdloan_id`: The id of the crowdloan to refund. + **Parameters:** + - `crowdloan_id`: The id of the crowdloan to refund. ### `updateCap(crowdloan_id: CrowdloanId, new_cap: u128)` - **interface**: `api.tx.crowdloan.updateCap` - **summary**: Update the cap of a non-finalized crowdloan. - The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. - - **Parameters:** + The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. - - `crowdloan_id`: The id of the crowdloan to update the cap of. - - `new_cap`: The new cap. + **Parameters:** + - `crowdloan_id`: The id of the crowdloan to update the cap of. + - `new_cap`: The new cap. ### `updateEnd(crowdloan_id: CrowdloanId, new_end: u32)` - **interface**: `api.tx.crowdloan.updateEnd` - **summary**: Update the end block of a non-finalized crowdloan. - The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. - - **Parameters:** + The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. - - `crowdloan_id`: The id of the crowdloan to update the end block of. - - `new_end`: The new end block. + **Parameters:** + - `crowdloan_id`: The id of the crowdloan to update the end block of. + - `new_end`: The new end block. ### `updateMinContribution(crowdloan_id: CrowdloanId, new_min_contribution: u128)` - **interface**: `api.tx.crowdloan.updateMinContribution` - **summary**: Update the minimum contribution of a non-finalized crowdloan. - The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. + The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. - **Parameters:** - - - `crowdloan_id`: The id of the crowdloan to update the minimum contribution of. - - `new_min_contribution`: The new minimum contribution. + **Parameters:** + - `crowdloan_id`: The id of the crowdloan to update the minimum contribution of. + - `new_min_contribution`: The new minimum contribution. ### `withdraw(crowdloan_id: CrowdloanId)` - **interface**: `api.tx.crowdloan.withdraw` - **summary**: Withdraw a contribution from an active (not yet finalized or dissolved) crowdloan. - Only contributions over the deposit can be withdrawn by the creator. - - The dispatch origin for this call must be _Signed_. - - **Parameters:** + Only contributions over the deposit can be withdrawn by the creator. - - `crowdloan_id`: The id of the crowdloan to withdraw from. + The dispatch origin for this call must be _Signed_. + **Parameters:** + - `crowdloan_id`: The id of the crowdloan to withdraw from. ## `drand` @@ -971,9 +928,8 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.drand.setBeaconConfig` - **summary**: allows the root user to set the beacon configuration generally this would be called from an offchain worker context. there is no verification of configurations, so be careful with this. - - - `origin`: the root user - - `config`: the beacon configuration + - `origin`: the root user + - `config`: the beacon configuration ### `setOldestStoredRound(oldest_round: u64)` @@ -985,7 +941,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.drand.writePulse` - **summary**: Verify and write a pulse from the beacon into the runtime - ## `ethereum` ### `transact(transaction: Transaction)` @@ -993,7 +948,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.ethereum.transact` - **summary**: Transact an Ethereum transaction. - ## `evm` ### `call(source: H160, target: H160, input: Vec, value: U256, gas_limit: u64, max_fee_per_gas: U256, max_priority_fee_per_gas: Option, nonce: Option, access_list: Vec<(H160, Vec)>, authorization_list: AuthorizationList)` @@ -1024,7 +978,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.evm.withdraw` - **summary**: Withdraw balance from EVM into currency/balances pallet. - ## `grandpa` ### `noteStalled(delay: u32, best_finalized_block_number: u32)` @@ -1032,9 +985,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.grandpa.noteStalled` - **summary**: Note that the current authority set of the GRANDPA finality gadget has stalled. - This will trigger a forced authority set change at the beginning of the next session, to be enacted `delay` blocks after that. The `delay` should be high enough to safely assume that the block signalling the forced change will not be re-orged e.g. 1000 blocks. The block production rate (which may be slowed down because of finality lagging) should be taken into account when choosing the `delay`. The GRANDPA voters based on the new authority will start voting on top of `best_finalized_block_number` for new finalized blocks. `best_finalized_block_number` should be the highest of the latest finalized block of all validators of the new authority set. + This will trigger a forced authority set change at the beginning of the next session, to be enacted `delay` blocks after that. The `delay` should be high enough to safely assume that the block signalling the forced change will not be re-orged e.g. 1000 blocks. The block production rate (which may be slowed down because of finality lagging) should be taken into account when choosing the `delay`. The GRANDPA voters based on the new authority will start voting on top of `best_finalized_block_number` for new finalized blocks. `best_finalized_block_number` should be the highest of the latest finalized block of all validators of the new authority set. - Only callable by root. + Only callable by root. ### `reportEquivocation(equivocation_proof: Box>>, key_owner_proof: T::KeyOwnerProof)` @@ -1046,8 +999,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.grandpa.reportEquivocationUnsigned` - **summary**: Report voter equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence will be reported. - This extrinsic must be called unsigned and it is expected that only block authors will call it (validated in `ValidateUnsigned`), as such if the block author is defined it will be defined as the equivocation reporter. - + This extrinsic must be called unsigned and it is expected that only block authors will call it (validated in `ValidateUnsigned`), as such if the block author is defined it will be defined as the equivocation reporter. ## `mevShield` @@ -1056,13 +1008,13 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.mevShield.announceNextKey` - **summary**: Rotate the key chain and announce the current author's ML-KEM encapsulation key. - Called as an inherent every block. `enc_key` is `None` on node failure, which removes the author from future shielded tx eligibility. + Called as an inherent every block. `enc_key` is `None` on node failure, which removes the author from future shielded tx eligibility. - Key rotation order (using pre-update AuthorKeys): - 1. CurrentKey ← PendingKey - 2. PendingKey ← NextKey - 3. NextKey ← next-next author's key (user-facing) - 4. AuthorKeys[current] ← announced key + Key rotation order (using pre-update AuthorKeys): + 1. CurrentKey ← PendingKey + 2. PendingKey ← NextKey + 3. NextKey ← next-next author's key (user-facing) + 4. AuthorKeys[current] ← announced key ### `setMaxExtrinsicWeight(value: u64)` @@ -1094,19 +1046,17 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.mevShield.submitEncrypted` - **summary**: Users submit an encrypted wrapper. - Client‑side: - - 1. Read `NextKey` (ML‑KEM encapsulation key bytes) from storage. - 2. Sign your extrinsic so that it can be executed when added to the pool, - i.e. you may need to increment the nonce if you submit using the same account. - 3. Encrypt: - - plaintext = signed_extrinsic key_hash = xxhash128(NextKey) kem_len = Length of kem_ct in bytes (u16) kem_ct = Ciphertext from ML‑KEM‑768 nonce = Random 24 bytes used for XChaCha20‑Poly1305 aead_ct = Ciphertext from XChaCha20‑Poly1305 + Client‑side: + 1. Read `NextKey` (ML‑KEM encapsulation key bytes) from storage. + 2. Sign your extrinsic so that it can be executed when added to the pool, + i.e. you may need to increment the nonce if you submit using the same account. + 3. Encrypt: - with ML‑KEM‑768 + XChaCha20‑Poly1305, producing + plaintext = signed_extrinsic key_hash = xxhash128(NextKey) kem_len = Length of kem_ct in bytes (u16) kem_ct = Ciphertext from ML‑KEM‑768 nonce = Random 24 bytes used for XChaCha20‑Poly1305 aead_ct = Ciphertext from XChaCha20‑Poly1305 - ciphertext = key_hash || kem_len || kem_ct || nonce || aead_ct + with ML‑KEM‑768 + XChaCha20‑Poly1305, producing + ciphertext = key_hash || kem_len || kem_ct || nonce || aead_ct ## `multisig` @@ -1115,30 +1065,28 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.multisig.approveAsMulti` - **summary**: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. - Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. + Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. - The dispatch origin for this call must be _Signed_. - - - `threshold`: The total number of approvals for this dispatch before it is executed. - - `other_signatories`: The accounts (other than the sender) who can approve this + The dispatch origin for this call must be _Signed_. + - `threshold`: The total number of approvals for this dispatch before it is executed. + - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. - - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. - - `call_hash`: The hash of the call to be executed. - - NOTE: If this is the final approval, you will want to use `as_multi` instead. + - `call_hash`: The hash of the call to be executed. - **Complexity:** + NOTE: If this is the final approval, you will want to use `as_multi` instead. - - ``O(S)``. - - Up to one balance-reserve or unreserve operation. - - One passthrough operation, one insert, both ``O(S)`` where `S` is the number of + **Complexity:** + - `O(S)`. + - Up to one balance-reserve or unreserve operation. + - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. - - One encode & hash, both of complexity ``O(S)``. - - Up to one binary search and insert (``O(logS + S)``). - - I/O: 1 read ``O(S)``, up to 1 mutate ``O(S)``. Up to one remove. - - One event. - - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + - One encode & hash, both of complexity `O(S)`. + - Up to one binary search and insert (`O(logS + S)`). + - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + - One event. + - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit taken for its lifetime of `DepositBase + threshold * DepositFactor`. ### `asMulti(threshold: u16, other_signatories: Vec, maybe_timepoint: Option>>, call: Box, max_weight: Weight)` @@ -1146,36 +1094,34 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.multisig.asMulti` - **summary**: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. - If there are enough, then dispatch the call. - - Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. + If there are enough, then dispatch the call. - The dispatch origin for this call must be _Signed_. + Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. - - `threshold`: The total number of approvals for this dispatch before it is executed. - - `other_signatories`: The accounts (other than the sender) who can approve this + The dispatch origin for this call must be _Signed_. + - `threshold`: The total number of approvals for this dispatch before it is executed. + - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. - - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is + - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. - - `call`: The call to be executed. + - `call`: The call to be executed. - NOTE: Unless this is the final approval, you will generally want to use `approve_as_multi` instead, since it only requires a hash of the call. + NOTE: Unless this is the final approval, you will generally want to use `approve_as_multi` instead, since it only requires a hash of the call. - Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise on success, result is `Ok` and the result from the interior call, if it was executed, may be found in the deposited `MultisigExecuted` event. + Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise on success, result is `Ok` and the result from the interior call, if it was executed, may be found in the deposited `MultisigExecuted` event. - **Complexity:** - - - ``O(S + Z + Call)``. - - Up to one balance-reserve or unreserve operation. - - One passthrough operation, one insert, both ``O(S)`` where `S` is the number of + **Complexity:** + - `O(S + Z + Call)`. + - Up to one balance-reserve or unreserve operation. + - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. - - One call encode & hash, both of complexity ``O(Z)`` where `Z` is tx-len. - - One encode & hash, both of complexity ``O(S)``. - - Up to one binary search and insert (``O(logS + S)``). - - I/O: 1 read ``O(S)``, up to 1 mutate ``O(S)``. Up to one remove. - - One event. - - The weight of the `call`. - - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit + - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + - One encode & hash, both of complexity `O(S)`. + - Up to one binary search and insert (`O(logS + S)`). + - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + - One event. + - The weight of the `call`. + - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit taken for its lifetime of `DepositBase + threshold * DepositFactor`. ### `asMultiThreshold1(other_signatories: Vec, call: Box)` @@ -1183,59 +1129,54 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.multisig.asMultiThreshold1` - **summary**: Immediately dispatch a multi-signature call using a single approval from the caller. - The dispatch origin for this call must be _Signed_. - - - `other_signatories`: The accounts (other than the sender) who are part of the + The dispatch origin for this call must be _Signed_. + - `other_signatories`: The accounts (other than the sender) who are part of the multi-signature, but do not participate in the approval process. - - `call`: The call to be executed. + - `call`: The call to be executed. - Result is equivalent to the dispatched result. + Result is equivalent to the dispatched result. - **Complexity:** + **Complexity:** - `O(Z + C)` where Z is the length of the call and C its execution weight. + `O(Z + C)` where Z is the length of the call and C its execution weight. ### `cancelAsMulti(threshold: u16, other_signatories: Vec, timepoint: Timepoint>, call_hash: [u8; 32])` - **interface**: `api.tx.multisig.cancelAsMulti` - **summary**: Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously for this operation will be unreserved on success. - The dispatch origin for this call must be _Signed_. - - - `threshold`: The total number of approvals for this dispatch before it is executed. - - `other_signatories`: The accounts (other than the sender) who can approve this + The dispatch origin for this call must be _Signed_. + - `threshold`: The total number of approvals for this dispatch before it is executed. + - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. - - `timepoint`: The timepoint (block number and transaction index) of the first approval + - `timepoint`: The timepoint (block number and transaction index) of the first approval transaction for this dispatch. - - `call_hash`: The hash of the call to be executed. - - **Complexity:** + - `call_hash`: The hash of the call to be executed. - - ``O(S)``. - - Up to one balance-reserve or unreserve operation. - - One passthrough operation, one insert, both ``O(S)`` where `S` is the number of + **Complexity:** + - `O(S)`. + - Up to one balance-reserve or unreserve operation. + - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. - - One encode & hash, both of complexity ``O(S)``. - - One event. - - I/O: 1 read ``O(S)``, one remove. - - Storage: removes one item. + - One encode & hash, both of complexity `O(S)`. + - One event. + - I/O: 1 read `O(S)`, one remove. + - Storage: removes one item. ### `pokeDeposit(threshold: u16, other_signatories: Vec, call_hash: [u8; 32])` - **interface**: `api.tx.multisig.pokeDeposit` - **summary**: Poke the deposit reserved for an existing multisig operation. - The dispatch origin for this call must be _Signed_ and must be the original depositor of the multisig operation. + The dispatch origin for this call must be _Signed_ and must be the original depositor of the multisig operation. - The transaction fee is waived if the deposit amount has changed. - - - `threshold`: The total number of approvals needed for this multisig. - - `other_signatories`: The accounts (other than the sender) who are part of the + The transaction fee is waived if the deposit amount has changed. + - `threshold`: The total number of approvals needed for this multisig. + - `other_signatories`: The accounts (other than the sender) who are part of the multisig. - - `call_hash`: The hash of the call this deposit is reserved for. - - Emits `DepositPoked` if successful. + - `call_hash`: The hash of the call this deposit is reserved for. + Emits `DepositPoked` if successful. ## `preimage` @@ -1244,39 +1185,37 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.preimage.ensureUpdated` - **summary**: Ensure that the bulk of pre-images is upgraded. - The caller pays no fee if at least 90% of pre-images were successfully updated. + The caller pays no fee if at least 90% of pre-images were successfully updated. ### `notePreimage(bytes: Vec)` - **interface**: `api.tx.preimage.notePreimage` - **summary**: Register a preimage on-chain. - If the preimage was previously requested, no fees or deposits are taken for providing the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + If the preimage was previously requested, no fees or deposits are taken for providing the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. ### `requestPreimage(hash: H256)` - **interface**: `api.tx.preimage.requestPreimage` - **summary**: Request a preimage be uploaded to the chain without paying any fees or deposits. - If the preimage requests has already been provided on-chain, we unreserve any deposit a user may have paid, and take the control of the preimage out of their hands. + If the preimage requests has already been provided on-chain, we unreserve any deposit a user may have paid, and take the control of the preimage out of their hands. ### `unnotePreimage(hash: H256)` - **interface**: `api.tx.preimage.unnotePreimage` - **summary**: Clear an unrequested preimage from the runtime storage. - If `len` is provided, then it will be a much cheaper operation. - - - `hash`: The hash of the preimage to be removed from the store. - - `len`: The length of the preimage of `hash`. + If `len` is provided, then it will be a much cheaper operation. + - `hash`: The hash of the preimage to be removed from the store. + - `len`: The length of the preimage of `hash`. ### `unrequestPreimage(hash: H256)` - **interface**: `api.tx.preimage.unrequestPreimage` - **summary**: Clear a previously made request for a preimage. - NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. - + NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. ## `proxy` @@ -1285,13 +1224,12 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.proxy.addProxy` - **summary**: Register a proxy account for the sender that is able to make calls on its behalf. - The dispatch origin for this call must be _Signed_. - - **Parameters:** + The dispatch origin for this call must be _Signed_. - - `proxy`: The account that the `caller` would like to make a proxy. - - `proxy_type`: The permissions allowed for this proxy account. - - `delay`: The announcement period required of the initial proxy. Will generally be + **Parameters:** + - `proxy`: The account that the `caller` would like to make a proxy. + - `proxy_type`: The permissions allowed for this proxy account. + - `delay`: The announcement period required of the initial proxy. Will generally be zero. ### `announce(real: MultiAddress, call_hash: CallHashOf)` @@ -1299,156 +1237,146 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.proxy.announce` - **summary**: Publish the hash of a proxy-call that will be made in the future. - This must be called some number of blocks before the corresponding `proxy` is attempted if the delay associated with the proxy relationship is greater than zero. + This must be called some number of blocks before the corresponding `proxy` is attempted if the delay associated with the proxy relationship is greater than zero. - No more than `MaxPending` announcements may be made at any one time. + No more than `MaxPending` announcements may be made at any one time. - This will take a deposit of `AnnouncementDepositFactor` as well as `AnnouncementDepositBase` if there are no other pending announcements. + This will take a deposit of `AnnouncementDepositFactor` as well as `AnnouncementDepositBase` if there are no other pending announcements. - The dispatch origin for this call must be _Signed_ and a proxy of `real`. + The dispatch origin for this call must be _Signed_ and a proxy of `real`. - **Parameters:** - - - `real`: The account that the proxy will make a call on behalf of. - - `call_hash`: The hash of the call to be made by the `real` account. + **Parameters:** + - `real`: The account that the proxy will make a call on behalf of. + - `call_hash`: The hash of the call to be made by the `real` account. ### `createPure(proxy_type: T::ProxyType, delay: u32, index: u16)` - **interface**: `api.tx.proxy.createPure` - **summary**: Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and initialize it with a proxy of `proxy_type` for `origin` sender. - Requires a `Signed` origin. - - - `proxy_type`: The type of the proxy that the sender will be registered as over the + Requires a `Signed` origin. + - `proxy_type`: The type of the proxy that the sender will be registered as over the new account. This will almost always be the most permissive `ProxyType` possible to allow for maximum flexibility. - - `index`: A disambiguation index, in case this is called multiple times in the same + - `index`: A disambiguation index, in case this is called multiple times in the same transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just want to use `0`. - - `delay`: The announcement period required of the initial proxy. Will generally be + - `delay`: The announcement period required of the initial proxy. Will generally be zero. - Fails with `Duplicate` if this has already been called in this transaction, from the same sender, with the same parameters. + Fails with `Duplicate` if this has already been called in this transaction, from the same sender, with the same parameters. - Fails if there are insufficient funds to pay for deposit. + Fails if there are insufficient funds to pay for deposit. ### `killPure(spawner: MultiAddress, proxy_type: T::ProxyType, index: u16, height: u32, ext_index: u32)` - **interface**: `api.tx.proxy.killPure` - **summary**: Removes a previously spawned pure proxy. - WARNING: **All access to this account will be lost.** Any funds held in it will be inaccessible. + WARNING: **All access to this account will be lost.** Any funds held in it will be inaccessible. - Requires a `Signed` origin, and the sender account must have been created by a call to `create_pure` with corresponding parameters. + Requires a `Signed` origin, and the sender account must have been created by a call to `create_pure` with corresponding parameters. + - `spawner`: The account that originally called `create_pure` to create this account. + - `index`: The disambiguation index originally passed to `create_pure`. Probably `0`. + - `proxy_type`: The proxy type originally passed to `create_pure`. + - `height`: The height of the chain when the call to `create_pure` was processed. + - `ext_index`: The extrinsic index in which the call to `create_pure` was processed. - - `spawner`: The account that originally called `create_pure` to create this account. - - `index`: The disambiguation index originally passed to `create_pure`. Probably `0`. - - `proxy_type`: The proxy type originally passed to `create_pure`. - - `height`: The height of the chain when the call to `create_pure` was processed. - - `ext_index`: The extrinsic index in which the call to `create_pure` was processed. - - Fails with `NoPermission` in case the caller is not a previously created pure account whose `create_pure` call has corresponding parameters. + Fails with `NoPermission` in case the caller is not a previously created pure account whose `create_pure` call has corresponding parameters. ### `pokeDeposit()` - **interface**: `api.tx.proxy.pokeDeposit` - **summary**: Poke / Adjust deposits made for proxies and announcements based on current values. This can be used by accounts to possibly lower their locked amount. - The dispatch origin for this call must be _Signed_. + The dispatch origin for this call must be _Signed_. - The transaction fee is waived if the deposit amount has changed. + The transaction fee is waived if the deposit amount has changed. - Emits `DepositPoked` if successful. + Emits `DepositPoked` if successful. ### `proxy(real: MultiAddress, force_proxy_type: Option, call: Box)` - **interface**: `api.tx.proxy.proxy` - **summary**: Dispatch the given `call` from an account that the sender is authorised for through `add_proxy`. - The dispatch origin for this call must be _Signed_. - - **Parameters:** + The dispatch origin for this call must be _Signed_. - - `real`: The account that the proxy will make a call on behalf of. - - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. - - `call`: The call to be made by the `real` account. + **Parameters:** + - `real`: The account that the proxy will make a call on behalf of. + - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + - `call`: The call to be made by the `real` account. ### `proxyAnnounced(delegate: MultiAddress, real: MultiAddress, force_proxy_type: Option, call: Box)` - **interface**: `api.tx.proxy.proxyAnnounced` - **summary**: Dispatch the given `call` from an account that the sender is authorized for through `add_proxy`. - Removes any corresponding announcement(s). - - The dispatch origin for this call must be _Signed_. + Removes any corresponding announcement(s). - **Parameters:** + The dispatch origin for this call must be _Signed_. - - `real`: The account that the proxy will make a call on behalf of. - - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. - - `call`: The call to be made by the `real` account. + **Parameters:** + - `real`: The account that the proxy will make a call on behalf of. + - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + - `call`: The call to be made by the `real` account. ### `rejectAnnouncement(delegate: MultiAddress, call_hash: CallHashOf)` - **interface**: `api.tx.proxy.rejectAnnouncement` - **summary**: Remove the given announcement of a delegate. - May be called by a target (proxied) account to remove a call that one of their delegates (`delegate`) has announced they want to execute. The deposit is returned. + May be called by a target (proxied) account to remove a call that one of their delegates (`delegate`) has announced they want to execute. The deposit is returned. - The dispatch origin for this call must be _Signed_. + The dispatch origin for this call must be _Signed_. - **Parameters:** - - - `delegate`: The account that previously announced the call. - - `call_hash`: The hash of the call to be made. + **Parameters:** + - `delegate`: The account that previously announced the call. + - `call_hash`: The hash of the call to be made. ### `removeAnnouncement(real: MultiAddress, call_hash: CallHashOf)` - **interface**: `api.tx.proxy.removeAnnouncement` - **summary**: Remove a given announcement. - May be called by a proxy account to remove a call they previously announced and return the deposit. - - The dispatch origin for this call must be _Signed_. + May be called by a proxy account to remove a call they previously announced and return the deposit. - **Parameters:** + The dispatch origin for this call must be _Signed_. - - `real`: The account that the proxy will make a call on behalf of. - - `call_hash`: The hash of the call to be made by the `real` account. + **Parameters:** + - `real`: The account that the proxy will make a call on behalf of. + - `call_hash`: The hash of the call to be made by the `real` account. ### `removeProxies()` - **interface**: `api.tx.proxy.removeProxies` - **summary**: Unregister all proxy accounts for the sender. - The dispatch origin for this call must be _Signed_. + The dispatch origin for this call must be _Signed_. - WARNING: This may be called on accounts created by `create_pure`, however if done, then the unreserved fees will be inaccessible. **All access to this account will be lost.** + WARNING: This may be called on accounts created by `create_pure`, however if done, then the unreserved fees will be inaccessible. **All access to this account will be lost.** ### `removeProxy(delegate: MultiAddress, proxy_type: T::ProxyType, delay: u32)` - **interface**: `api.tx.proxy.removeProxy` - **summary**: Unregister a proxy account for the sender. - The dispatch origin for this call must be _Signed_. - - **Parameters:** + The dispatch origin for this call must be _Signed_. - - `proxy`: The account that the `caller` would like to remove as a proxy. - - `proxy_type`: The permissions currently enabled for the removed proxy account. + **Parameters:** + - `proxy`: The account that the `caller` would like to remove as a proxy. + - `proxy_type`: The permissions currently enabled for the removed proxy account. ### `setRealPaysFee(delegate: MultiAddress, pays_fee: bool)` - **interface**: `api.tx.proxy.setRealPaysFee` - **summary**: Set whether the real account pays transaction fees for proxy calls made by a specific delegate. - The dispatch origin for this call must be _Signed_ and must be the real (delegator) account that has an existing proxy relationship with the delegate. + The dispatch origin for this call must be _Signed_ and must be the real (delegator) account that has an existing proxy relationship with the delegate. - **Parameters:** - - - `delegate`: The proxy account for which to set the fee payment preference. - - `pays_fee`: If `true`, the real account will pay fees for proxy calls made by + **Parameters:** + - `delegate`: The proxy account for which to set the fee payment preference. + - `pays_fee`: If `true`, the real account will pay fees for proxy calls made by this delegate. If `false`, the delegate pays (default behavior). - ## `registry` ### `clearIdentity(identified: AccountId)` @@ -1461,7 +1389,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.registry.setIdentity` - **summary**: Register an identity for an account. This will overwrite any existing identity. - ## `safeMode` ### `enter()` @@ -1469,75 +1396,74 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.safeMode.enter` - **summary**: Enter safe-mode permissionlessly for [`Config::EnterDuration`] blocks. - Reserves [`Config::EnterDepositAmount`] from the caller's account. Emits an [`Event::Entered`] event on success. Errors with [`Error::Entered`] if the safe-mode is already entered. Errors with [`Error::NotConfigured`] if the deposit amount is `None`. + Reserves [`Config::EnterDepositAmount`] from the caller's account. Emits an [`Event::Entered`] event on success. Errors with [`Error::Entered`] if the safe-mode is already entered. Errors with [`Error::NotConfigured`] if the deposit amount is `None`. ### `extend()` - **interface**: `api.tx.safeMode.extend` - **summary**: Extend the safe-mode permissionlessly for [`Config::ExtendDuration`] blocks. - This accumulates on top of the current remaining duration. Reserves [`Config::ExtendDepositAmount`] from the caller's account. Emits an [`Event::Extended`] event on success. Errors with [`Error::Exited`] if the safe-mode is entered. Errors with [`Error::NotConfigured`] if the deposit amount is `None`. + This accumulates on top of the current remaining duration. Reserves [`Config::ExtendDepositAmount`] from the caller's account. Emits an [`Event::Extended`] event on success. Errors with [`Error::Exited`] if the safe-mode is entered. Errors with [`Error::NotConfigured`] if the deposit amount is `None`. - This may be called by any signed origin with [`Config::ExtendDepositAmount`] free currency to reserve. This call can be disabled for all origins by configuring [`Config::ExtendDepositAmount`] to `None`. + This may be called by any signed origin with [`Config::ExtendDepositAmount`] free currency to reserve. This call can be disabled for all origins by configuring [`Config::ExtendDepositAmount`] to `None`. ### `forceEnter()` - **interface**: `api.tx.safeMode.forceEnter` - **summary**: Enter safe-mode by force for a per-origin configured number of blocks. - Emits an [`Event::Entered`] event on success. Errors with [`Error::Entered`] if the safe-mode is already entered. + Emits an [`Event::Entered`] event on success. Errors with [`Error::Entered`] if the safe-mode is already entered. - Can only be called by the [`Config::ForceEnterOrigin`] origin. + Can only be called by the [`Config::ForceEnterOrigin`] origin. ### `forceExit()` - **interface**: `api.tx.safeMode.forceExit` - **summary**: Exit safe-mode by force. - Emits an [`Event::Exited`] with [`ExitReason::Force`] event on success. Errors with [`Error::Exited`] if the safe-mode is inactive. + Emits an [`Event::Exited`] with [`ExitReason::Force`] event on success. Errors with [`Error::Exited`] if the safe-mode is inactive. - Note: `safe-mode` will be automatically deactivated by [`Pallet::on_initialize`] hook after the block height is greater than the [`EnteredUntil`] storage item. Emits an [`Event::Exited`] with [`ExitReason::Timeout`] event when deactivated in the hook. + Note: `safe-mode` will be automatically deactivated by [`Pallet::on_initialize`] hook after the block height is greater than the [`EnteredUntil`] storage item. Emits an [`Event::Exited`] with [`ExitReason::Timeout`] event when deactivated in the hook. ### `forceExtend()` - **interface**: `api.tx.safeMode.forceExtend` - **summary**: Extend the safe-mode by force for a per-origin configured number of blocks. - Emits an [`Event::Extended`] event on success. Errors with [`Error::Exited`] if the safe-mode is inactive. + Emits an [`Event::Extended`] event on success. Errors with [`Error::Exited`] if the safe-mode is inactive. - Can only be called by the [`Config::ForceExtendOrigin`] origin. + Can only be called by the [`Config::ForceExtendOrigin`] origin. ### `forceReleaseDeposit(account: AccountId, block: u32)` - **interface**: `api.tx.safeMode.forceReleaseDeposit` - **summary**: Force to release a deposit for an account that entered safe-mode at a given historical block. - This can be called while safe-mode is still entered. + This can be called while safe-mode is still entered. - Emits a [`Event::DepositReleased`] event on success. Errors with [`Error::Entered`] if safe-mode is entered. Errors with [`Error::NoDeposit`] if the payee has no reserved currency at the specified block. + Emits a [`Event::DepositReleased`] event on success. Errors with [`Error::Entered`] if safe-mode is entered. Errors with [`Error::NoDeposit`] if the payee has no reserved currency at the specified block. - Can only be called by the [`Config::ForceDepositOrigin`] origin. + Can only be called by the [`Config::ForceDepositOrigin`] origin. ### `forceSlashDeposit(account: AccountId, block: u32)` - **interface**: `api.tx.safeMode.forceSlashDeposit` - **summary**: Slash a deposit for an account that entered or extended safe-mode at a given historical block. - This can only be called while safe-mode is entered. + This can only be called while safe-mode is entered. - Emits a [`Event::DepositSlashed`] event on success. Errors with [`Error::Entered`] if safe-mode is entered. + Emits a [`Event::DepositSlashed`] event on success. Errors with [`Error::Entered`] if safe-mode is entered. - Can only be called by the [`Config::ForceDepositOrigin`] origin. + Can only be called by the [`Config::ForceDepositOrigin`] origin. ### `releaseDeposit(account: AccountId, block: u32)` - **interface**: `api.tx.safeMode.releaseDeposit` - **summary**: Permissionlessly release a deposit for an account that entered safe-mode at a given historical block. - The call can be completely disabled by setting [`Config::ReleaseDelay`] to `None`. This cannot be called while safe-mode is entered and not until [`Config::ReleaseDelay`] blocks have passed since safe-mode was entered. - - Emits a [`Event::DepositReleased`] event on success. Errors with [`Error::Entered`] if the safe-mode is entered. Errors with [`Error::CannotReleaseYet`] if [`Config::ReleaseDelay`] block have not passed since safe-mode was entered. Errors with [`Error::NoDeposit`] if the payee has no reserved currency at the block specified. + The call can be completely disabled by setting [`Config::ReleaseDelay`] to `None`. This cannot be called while safe-mode is entered and not until [`Config::ReleaseDelay`] blocks have passed since safe-mode was entered. + Emits a [`Event::DepositReleased`] event on success. Errors with [`Error::Entered`] if the safe-mode is entered. Errors with [`Error::CannotReleaseYet`] if [`Config::ReleaseDelay`] block have not passed since safe-mode was entered. Errors with [`Error::NoDeposit`] if the payee has no reserved currency at the block specified. ## `scheduler` @@ -1586,19 +1512,18 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.scheduler.setRetry` - **summary**: Set a retry configuration for a task so that, in case its scheduled run fails, it will be retried after `period` blocks, for a total amount of `retries` retries or until it succeeds. - Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying. + Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying. - Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic clones of the original task. Their retry configuration will be derived from the original task's configuration, but will have a lower value for `remaining` than the original `total_retries`. + Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic clones of the original task. Their retry configuration will be derived from the original task's configuration, but will have a lower value for `remaining` than the original `total_retries`. ### `setRetryNamed(id: TaskName, retries: u8, period: u32)` - **interface**: `api.tx.scheduler.setRetryNamed` - **summary**: Set a retry configuration for a named task so that, in case its scheduled run fails, it will be retried after `period` blocks, for a total amount of `retries` retries or until it succeeds. - Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying. - - Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic clones of the original task. Their retry configuration will be derived from the original task's configuration, but will have a lower value for `remaining` than the original `total_retries`. + Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying. + Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic clones of the original task. Their retry configuration will be derived from the original task's configuration, but will have a lower value for `remaining` than the original `total_retries`. ## `subtensorModule` @@ -1607,25 +1532,22 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.addStake` - **summary**: Adds stake to a hotkey. The call is made from a coldkey account. This delegates stake to the hotkey. - Note: the coldkey account may own the hotkey, in which case they are delegating to themselves. - - **Args:** - - - `origin` — (\Origin): — The signature of the caller's coldkey. - - `hotkey` (T::AccountId) — The associated hotkey account. - - `netuid` (u16) — Subnetwork UID - - `amount_staked` (u64) — The amount of stake to be added to the hotkey staking account. + Note: the coldkey account may own the hotkey, in which case they are delegating to themselves. - **Event:** + **Args:** + - `origin` — (\Origin): — The signature of the caller's coldkey. + - `hotkey` (T::AccountId) — The associated hotkey account. + - `netuid` (u16) — Subnetwork UID + - `amount_staked` (u64) — The amount of stake to be added to the hotkey staking account. - - StakeAdded; + **Event:** + - StakeAdded; On the successfully adding stake to a global account. - **Raises:** - - - `NotEnoughBalanceToStake` — Not enough balance on the coldkey to add onto the global account. - - `NonAssociatedColdKey` — The calling coldkey is not associated with this hotkey. - - `BalanceWithdrawalError` — Errors stemming from transaction pallet. + **Raises:** + - `NotEnoughBalanceToStake` — Not enough balance on the coldkey to add onto the global account. + - `NonAssociatedColdKey` — The calling coldkey is not associated with this hotkey. + - `BalanceWithdrawalError` — Errors stemming from transaction pallet. ### `addStakeBurn(hotkey: AccountId, netuid: NetUid, amount: TaoBalance, limit: Option)` @@ -1637,98 +1559,91 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.addStakeLimit` - **summary**: Adds stake to a hotkey on a subnet with a price limit. This extrinsic allows to specify the limit price for alpha token at which or better (lower) the staking should execute. - In case if slippage occurs and the price shall move beyond the limit price, the staking order may execute only partially or not execute at all. - - **Args:** + In case if slippage occurs and the price shall move beyond the limit price, the staking order may execute only partially or not execute at all. - - `origin` — (\Origin): — The signature of the caller's coldkey. - - `hotkey` (T::AccountId) — The associated hotkey account. - - `netuid` (u16) — Subnetwork UID - - `amount_staked` (u64) — The amount of stake to be added to the hotkey staking account. - - `limit_price` (u64) — The limit price expressed in units of RAO per one Alpha. - - `allow_partial` (bool) — Allows partial execution of the amount. If set to false, this becomes + **Args:** + - `origin` — (\Origin): — The signature of the caller's coldkey. + - `hotkey` (T::AccountId) — The associated hotkey account. + - `netuid` (u16) — Subnetwork UID + - `amount_staked` (u64) — The amount of stake to be added to the hotkey staking account. + - `limit_price` (u64) — The limit price expressed in units of RAO per one Alpha. + - `allow_partial` (bool) — Allows partial execution of the amount. If set to false, this becomes fill or kill type or order. - **Event:** - - - StakeAdded; + **Event:** + - StakeAdded; On the successfully adding stake to a global account. - **Raises:** - - - `NotEnoughBalanceToStake` — Not enough balance on the coldkey to add onto the global account. - - `NonAssociatedColdKey` — The calling coldkey is not associated with this hotkey. - - `BalanceWithdrawalError` — Errors stemming from transaction pallet. + **Raises:** + - `NotEnoughBalanceToStake` — Not enough balance on the coldkey to add onto the global account. + - `NonAssociatedColdKey` — The calling coldkey is not associated with this hotkey. + - `BalanceWithdrawalError` — Errors stemming from transaction pallet. ### `announceColdkeySwap(new_coldkey_hash: H256)` - **interface**: `api.tx.subtensorModule.announceColdkeySwap` - **summary**: Announces a coldkey swap using BlakeTwo256 hash of the new coldkey. - This is required before the coldkey swap can be performed after the delay period. - - It can be reannounced after a delay of `ColdkeySwapReannouncementDelay` following the first valid execution block of the original announcement. + This is required before the coldkey swap can be performed after the delay period. - The dispatch origin of this call must be the original coldkey that made the announcement. + It can be reannounced after a delay of `ColdkeySwapReannouncementDelay` following the first valid execution block of the original announcement. - - `new_coldkey_hash`: The hash of the new coldkey using BlakeTwo256. + The dispatch origin of this call must be the original coldkey that made the announcement. + - `new_coldkey_hash`: The hash of the new coldkey using BlakeTwo256. - The `ColdkeySwapAnnounced` event is emitted on successful announcement. + The `ColdkeySwapAnnounced` event is emitted on successful announcement. ### `associateEvmKey(netuid: NetUid, evm_key: H160, block_number: u64, signature: Signature)` - **interface**: `api.tx.subtensorModule.associateEvmKey` - **summary**: Attempts to associate a hotkey with an EVM key. - The signature will be checked to see if the recovered public key matches the `evm_key` provided. - - The EVM key is expected to sign the message according to this formula to produce the signature: ```text keccak_256(hotkey ++ keccak_256(block_number)) ``` + The signature will be checked to see if the recovered public key matches the `evm_key` provided. - **Arguments:** + The EVM key is expected to sign the message according to this formula to produce the signature: `text keccak_256(hotkey ++ keccak_256(block_number)) ` - - `origin` — The origin of the transaction, which must be signed by the `hotkey`. - - `netuid` — The netuid that the `hotkey` belongs to. - - `evm_key` — The EVM key to associate with the `hotkey`. - - `block_number` — The block number used in the `signature`. - - `signature` — A signed message by the `evm_key` containing the `hotkey` and the hashed `block_number`. + **Arguments:** + - `origin` — The origin of the transaction, which must be signed by the `hotkey`. + - `netuid` — The netuid that the `hotkey` belongs to. + - `evm_key` — The EVM key to associate with the `hotkey`. + - `block_number` — The block number used in the `signature`. + - `signature` — A signed message by the `evm_key` containing the `hotkey` and the hashed `block_number`. - **Errors:** + **Errors:** - Returns an error if: - - The transaction is not signed. - - The hotkey does not belong to the subnet identified by the netuid. - - The EVM key cannot be recovered from the signature. - - The EVM key recovered from the signature does not match the given EVM key. + Returns an error if: + - The transaction is not signed. + - The hotkey does not belong to the subnet identified by the netuid. + - The EVM key cannot be recovered from the signature. + - The EVM key recovered from the signature does not match the given EVM key. - **Events:** + **Events:** - May emit a `EvmKeyAssociated` event on success + May emit a `EvmKeyAssociated` event on success ### `batchCommitWeights(netuids: Vec>, commit_hashes: Vec)` - **interface**: `api.tx.subtensorModule.batchCommitWeights` - **summary**: Allows a hotkey to commit weight hashes for multiple netuids as a batch. - **Args:** - - - `origin`: (\Origin): + **Args:** + - `origin`: (\Origin): The caller, a hotkey who wishes to set their weights. - - `netuids` (Vec\>): + - `netuids` (Vec\>): The network uids we are setting these weights on. - - `commit_hashes` (Vec\): + - `commit_hashes` (Vec\): The commit hashes to commit. - **Event:** - - - WeightsSet; + **Event:** + - WeightsSet; On successfully setting the weights on chain. - - BatchWeightsCompleted; + - BatchWeightsCompleted; On success of the batch. - - BatchCompletedWithErrors; + - BatchCompletedWithErrors; On failure of any of the weights in the batch. - - BatchWeightItemFailed; + - BatchWeightItemFailed; On failure for each failed item in the batch. ### `batchRevealWeights(netuid: NetUid, uids_list: Vec>, values_list: Vec>, salts_list: Vec>, version_keys: Vec)` @@ -1736,44 +1651,42 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.batchRevealWeights` - **summary**: - The implementation for batch revealing committed weights. - **Args:** - - - `origin`: (`::RuntimeOrigin`): + **Args:** + - `origin`: (`::RuntimeOrigin`): The signature of the revealing hotkey. - - `netuid` (`u16`): + - `netuid` (`u16`): The u16 network identifier. - - `uids_list` (`Vec>`): + - `uids_list` (`Vec>`): A list of uids for each set of weights being revealed. - - `values_list` (`Vec>`): + - `values_list` (`Vec>`): A list of values for each set of weights being revealed. - - `salts_list` (`Vec>`): + - `salts_list` (`Vec>`): A list of salts used to generate the commit hashes. - - `version_keys` (`Vec`): + - `version_keys` (`Vec`): A list of network version keys. - **Raises:** - - - `CommitRevealDisabled`: + **Raises:** + - `CommitRevealDisabled`: Attempting to reveal weights when the commit-reveal mechanism is disabled. - - `NoWeightsCommitFound`: + - `NoWeightsCommitFound`: Attempting to reveal weights without an existing commit. - - `ExpiredWeightCommit`: + - `ExpiredWeightCommit`: Attempting to reveal a weight commit that has expired. - - `RevealTooEarly`: + - `RevealTooEarly`: Attempting to reveal weights outside the valid reveal period. - - `InvalidRevealCommitHashNotMatch`: + - `InvalidRevealCommitHashNotMatch`: The revealed hash does not match any committed hash. - - `InvalidInputLengths`: + - `InvalidInputLengths`: The input vectors are of mismatched lengths. ### `batchSetWeights(netuids: Vec>, weights: Vec, Compact)>>, version_keys: Vec>)` @@ -1781,29 +1694,27 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.batchSetWeights` - **summary**: Allows a hotkey to set weights for multiple netuids as a batch. - **Args:** - - - `origin`: (\Origin): + **Args:** + - `origin`: (\Origin): The caller, a hotkey who wishes to set their weights. - - `netuids` (Vec\>): + - `netuids` (Vec\>): The network uids we are setting these weights on. - - `weights` (Vec\, Compact\)>): + - `weights` (Vec\, Compact\)>): The weights to set for each network. [(uid, weight), ...] - - `version_keys` (Vec\>): + - `version_keys` (Vec\>): The network version keys to check if the validator is up to date. - **Event:** - - - WeightsSet; + **Event:** + - WeightsSet; On successfully setting the weights on chain. - - BatchWeightsCompleted; + - BatchWeightsCompleted; On success of the batch. - - BatchCompletedWithErrors; + - BatchCompletedWithErrors; On failure of any of the weights in the batch. - - BatchWeightItemFailed; + - BatchWeightItemFailed; On failure for each failed item in the batch. ### `burnAlpha(hotkey: AccountId, amount: AlphaBalance, netuid: NetUid)` @@ -1811,16 +1722,15 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.burnAlpha` - **summary**: Burns alpha from a cold/hot key pair without reducing `AlphaOut` - **Arguments:** - - - `origin` — The origin of the call (must be signed by the coldkey) - - `hotkey` — The hotkey account - - `amount` — The amount of alpha to burn - - `netuid` — The subnet ID + **Arguments:** + - `origin` — The origin of the call (must be signed by the coldkey) + - `hotkey` — The hotkey account + - `amount` — The amount of alpha to burn + - `netuid` — The subnet ID - **Events:** + **Events:** - Emits a `TokensBurned` event on success. + Emits a `TokensBurned` event on success. ### `burnedRegister(netuid: NetUid, hotkey: AccountId)` @@ -1832,86 +1742,78 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.claimRoot` - **summary**: Claims the root emissions for a coldkey. - **Args:** + **Args:** + - `origin` — (\Origin): — The signature of the caller's coldkey. - - `origin` — (\Origin): — The signature of the caller's coldkey. - - **Event:** - - - RootClaimed; + **Event:** + - RootClaimed; On the successfully claiming the root emissions for a coldkey. - **Raises:** + **Raises:** ### `clearColdkeySwapAnnouncement()` - **interface**: `api.tx.subtensorModule.clearColdkeySwapAnnouncement` - **summary**: Clears a coldkey swap announcement after the reannouncement delay if it has not been disputed. - The `ColdkeySwapCleared` event is emitted on successful clear. + The `ColdkeySwapCleared` event is emitted on successful clear. ### `commitCrv3MechanismWeights(netuid: NetUid, mecid: MechId, commit: BoundedVec>, reveal_round: u64)` - **interface**: `api.tx.subtensorModule.commitCrv3MechanismWeights` - **summary**: - Used to commit encrypted commit-reveal v3 weight values to later be revealed. - **Args:** - - - `origin`: (`::RuntimeOrigin`): + **Args:** + - `origin`: (`::RuntimeOrigin`): The committing hotkey. - - `netuid` (`u16`): + - `netuid` (`u16`): The u16 network identifier. - - `commit` (`Vec`): + - `commit` (`Vec`): The encrypted compressed commit. The steps for this are: - 1. Instantiate [`WeightsTlockPayload`] - 2. Serialize it using the `parity_scale_codec::Encode` trait - 3. Encrypt it following the steps (here)[https://github.com/ideal-lab5/tle/blob/f8e6019f0fb02c380ebfa6b30efb61786dede07b/timelock/src/tlock.rs#L283-L336] - to produce a [`TLECiphertext`] type. - 4. Serialize and compress using the `ark-serialize` `CanonicalSerialize` trait. - - - reveal_round (`u64`): + 1. Instantiate [`WeightsTlockPayload`] + 2. Serialize it using the `parity_scale_codec::Encode` trait + 3. Encrypt it following the steps (here)[https://github.com/ideal-lab5/tle/blob/f8e6019f0fb02c380ebfa6b30efb61786dede07b/timelock/src/tlock.rs#L283-L336] + to produce a [`TLECiphertext`] type. + 4. Serialize and compress using the `ark-serialize` `CanonicalSerialize` trait. + - reveal_round (`u64`): The drand reveal round which will be avaliable during epoch `n+1` from the current epoch. - **Raises:** - - - `CommitRevealV3Disabled`: + **Raises:** + - `CommitRevealV3Disabled`: Attempting to commit when the commit-reveal mechanism is disabled. - - `TooManyUnrevealedCommits`: + - `TooManyUnrevealedCommits`: Attempting to commit when the user has more than the allowed limit of unrevealed commits. - ---- Used to commit encrypted commit-reveal v3 weight values to later be revealed for mechanisms. - - **Args:** + ---- Used to commit encrypted commit-reveal v3 weight values to later be revealed for mechanisms. - - `origin`: (`::RuntimeOrigin`): + **Args:** + - `origin`: (`::RuntimeOrigin`): The committing hotkey. - - `netuid` (`u16`): + - `netuid` (`u16`): The u16 network identifier. - - `mecid` (`u8`): + - `mecid` (`u8`): The u8 mechanism identifier. - - `commit` (`Vec`): + - `commit` (`Vec`): The encrypted compressed commit. The steps for this are: - 1. Instantiate [`WeightsTlockPayload`] - 2. Serialize it using the `parity_scale_codec::Encode` trait - 3. Encrypt it following the steps (here)[https://github.com/ideal-lab5/tle/blob/f8e6019f0fb02c380ebfa6b30efb61786dede07b/timelock/src/tlock.rs#L283-L336] - to produce a [`TLECiphertext`] type. - 4. Serialize and compress using the `ark-serialize` `CanonicalSerialize` trait. - - - reveal_round (`u64`): + 1. Instantiate [`WeightsTlockPayload`] + 2. Serialize it using the `parity_scale_codec::Encode` trait + 3. Encrypt it following the steps (here)[https://github.com/ideal-lab5/tle/blob/f8e6019f0fb02c380ebfa6b30efb61786dede07b/timelock/src/tlock.rs#L283-L336] + to produce a [`TLECiphertext`] type. + 4. Serialize and compress using the `ark-serialize` `CanonicalSerialize` trait. + - reveal_round (`u64`): The drand reveal round which will be avaliable during epoch `n+1` from the current epoch. - **Raises:** - - - `CommitRevealV3Disabled`: + **Raises:** + - `CommitRevealV3Disabled`: Attempting to commit when the commit-reveal mechanism is disabled. - - `TooManyUnrevealedCommits`: + - `TooManyUnrevealedCommits`: Attempting to commit when the user has more than the allowed limit of unrevealed commits. ### `commitMechanismWeights(netuid: NetUid, mecid: MechId, commit_hash: H256)` @@ -1919,26 +1821,24 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.commitMechanismWeights` - **summary**: - Used to commit a hash of your weight values to later be revealed for mechanisms. - **Args:** - - - `origin`: (`::RuntimeOrigin`): + **Args:** + - `origin`: (`::RuntimeOrigin`): The signature of the committing hotkey. - - `netuid` (`u16`): + - `netuid` (`u16`): The u16 network identifier. - - `mecid` (`u8`): + - `mecid` (`u8`): The u8 mechanism identifier. - - `commit_hash` (`H256`): + - `commit_hash` (`H256`): The hash representing the committed weights. - **Raises:** - - - `CommitRevealDisabled`: + **Raises:** + - `CommitRevealDisabled`: Attempting to commit when the commit-reveal mechanism is disabled. - - `TooManyUnrevealedCommits`: + - `TooManyUnrevealedCommits`: Attempting to commit when the user has more than the allowed limit of unrevealed commits. ### `commitTimelockedMechanismWeights(netuid: NetUid, mecid: MechId, commit: BoundedVec>, reveal_round: u64, commit_reveal_version: u16)` @@ -1946,29 +1846,27 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.commitTimelockedMechanismWeights` - **summary**: - Used to commit timelock encrypted commit-reveal weight values to later be revealed for a mechanism. - **Args:** - - - `origin`: (`::RuntimeOrigin`): + **Args:** + - `origin`: (`::RuntimeOrigin`): The committing hotkey. - - `netuid` (`u16`): + - `netuid` (`u16`): The u16 network identifier. - - `mecid` (`u8`): + - `mecid` (`u8`): The u8 mechanism identifier. - - `commit` (`Vec`): + - `commit` (`Vec`): The encrypted compressed commit. The steps for this are: - 1. Instantiate [`WeightsTlockPayload`] - 2. Serialize it using the `parity_scale_codec::Encode` trait - 3. Encrypt it following the steps (here)[https://github.com/ideal-lab5/tle/blob/f8e6019f0fb02c380ebfa6b30efb61786dede07b/timelock/src/tlock.rs#L283-L336] - to produce a [`TLECiphertext`] type. - 4. Serialize and compress using the `ark-serialize` `CanonicalSerialize` trait. - - - reveal_round (`u64`): + 1. Instantiate [`WeightsTlockPayload`] + 2. Serialize it using the `parity_scale_codec::Encode` trait + 3. Encrypt it following the steps (here)[https://github.com/ideal-lab5/tle/blob/f8e6019f0fb02c380ebfa6b30efb61786dede07b/timelock/src/tlock.rs#L283-L336] + to produce a [`TLECiphertext`] type. + 4. Serialize and compress using the `ark-serialize` `CanonicalSerialize` trait. + - reveal_round (`u64`): The drand reveal round which will be avaliable during epoch `n+1` from the current epoch. - - commit_reveal_version (`u16`): + - commit_reveal_version (`u16`): The client (bittensor-drand) version ### `commitTimelockedWeights(netuid: NetUid, commit: BoundedVec>, reveal_round: u64, commit_reveal_version: u16)` @@ -1976,26 +1874,24 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.commitTimelockedWeights` - **summary**: - Used to commit timelock encrypted commit-reveal weight values to later be revealed. - **Args:** - - - `origin`: (`::RuntimeOrigin`): + **Args:** + - `origin`: (`::RuntimeOrigin`): The committing hotkey. - - `netuid` (`u16`): + - `netuid` (`u16`): The u16 network identifier. - - `commit` (`Vec`): + - `commit` (`Vec`): The encrypted compressed commit. The steps for this are: - 1. Instantiate [`WeightsTlockPayload`] - 2. Serialize it using the `parity_scale_codec::Encode` trait - 3. Encrypt it following the steps (here)[https://github.com/ideal-lab5/tle/blob/f8e6019f0fb02c380ebfa6b30efb61786dede07b/timelock/src/tlock.rs#L283-L336] - to produce a [`TLECiphertext`] type. - 4. Serialize and compress using the `ark-serialize` `CanonicalSerialize` trait. - - - reveal_round (`u64`): + 1. Instantiate [`WeightsTlockPayload`] + 2. Serialize it using the `parity_scale_codec::Encode` trait + 3. Encrypt it following the steps (here)[https://github.com/ideal-lab5/tle/blob/f8e6019f0fb02c380ebfa6b30efb61786dede07b/timelock/src/tlock.rs#L283-L336] + to produce a [`TLECiphertext`] type. + 4. Serialize and compress using the `ark-serialize` `CanonicalSerialize` trait. + - reveal_round (`u64`): The drand reveal round which will be avaliable during epoch `n+1` from the current epoch. - - commit_reveal_version (`u16`): + - commit_reveal_version (`u16`): The client (bittensor-drand) version ### `commitWeights(netuid: NetUid, commit_hash: H256)` @@ -2003,23 +1899,21 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.commitWeights` - **summary**: - Used to commit a hash of your weight values to later be revealed. - **Args:** - - - `origin`: (`::RuntimeOrigin`): + **Args:** + - `origin`: (`::RuntimeOrigin`): The signature of the committing hotkey. - - `netuid` (`u16`): + - `netuid` (`u16`): The u16 network identifier. - - `commit_hash` (`H256`): + - `commit_hash` (`H256`): The hash representing the committed weights. - **Raises:** - - - `CommitRevealDisabled`: + **Raises:** + - `CommitRevealDisabled`: Attempting to commit when the commit-reveal mechanism is disabled. - - `TooManyUnrevealedCommits`: + - `TooManyUnrevealedCommits`: Attempting to commit when the user has more than the allowed limit of unrevealed commits. ### `decreaseTake(hotkey: AccountId, take: u16)` @@ -2027,51 +1921,45 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.decreaseTake` - **summary**: Allows delegates to decrease its take value. - **Args:** - - - `origin` — (\::Origin): — The signature of the caller's coldkey. - - `hotkey` (T::AccountId) — The hotkey we are delegating (must be owned by the coldkey.) - - `netuid` (u16) — Subnet ID to decrease take for - - `take` (u16) — The new stake proportion that this hotkey takes from delegations. + **Args:** + - `origin` — (\::Origin): — The signature of the caller's coldkey. + - `hotkey` (T::AccountId) — The hotkey we are delegating (must be owned by the coldkey.) + - `netuid` (u16) — Subnet ID to decrease take for + - `take` (u16) — The new stake proportion that this hotkey takes from delegations. The new value can be between 0 and 11_796 and should be strictly lower than the previous value. It T is the new value (rational number), the the parameter is calculated as [65535 * T]. For example, 1% would be [0.01 * 65535] = [655.35] = 655 - **Event:** - - - TakeDecreased; + **Event:** + - TakeDecreased; On successfully setting a decreased take for this hotkey. - **Raises:** - - - `NotRegistered` — The hotkey we are delegating is not registered on the network. - - `NonAssociatedColdKey` — The hotkey we are delegating is not owned by the calling coldkey. - - `DelegateTakeTooLow` — The delegate is setting a take which is not lower than the previous. + **Raises:** + - `NotRegistered` — The hotkey we are delegating is not registered on the network. + - `NonAssociatedColdKey` — The hotkey we are delegating is not owned by the calling coldkey. + - `DelegateTakeTooLow` — The delegate is setting a take which is not lower than the previous. ### `disableVotingPowerTracking(netuid: NetUid)` - **interface**: `api.tx.subtensorModule.disableVotingPowerTracking` - **summary**: Schedules disabling of voting power tracking for a subnet. - This function can be called by the subnet owner or root. Voting power tracking will continue for 14 days (grace period) after this call, then automatically disable and clear all VotingPower entries for the subnet. - - **Arguments:** + This function can be called by the subnet owner or root. Voting power tracking will continue for 14 days (grace period) after this call, then automatically disable and clear all VotingPower entries for the subnet. - - `origin` — The origin of the call, must be subnet owner or root. - - `netuid` — The subnet to schedule disabling voting power tracking for. + **Arguments:** + - `origin` — The origin of the call, must be subnet owner or root. + - `netuid` — The subnet to schedule disabling voting power tracking for. - **Errors:** - - - `SubnetNotExist` — If the subnet does not exist. - - `NotSubnetOwner` — If the caller is not the subnet owner or root. - - `VotingPowerTrackingNotEnabled` — If voting power tracking is not enabled. + **Errors:** + - `SubnetNotExist` — If the subnet does not exist. + - `NotSubnetOwner` — If the caller is not the subnet owner or root. + - `VotingPowerTrackingNotEnabled` — If voting power tracking is not enabled. ### `disputeColdkeySwap()` - **interface**: `api.tx.subtensorModule.disputeColdkeySwap` - **summary**: Dispute a coldkey swap. - This will prevent any further actions on the coldkey swap until triumvirate step in to resolve the issue. - - - `coldkey`: The coldkey to dispute the swap for. + This will prevent any further actions on the coldkey swap until triumvirate step in to resolve the issue. + - `coldkey`: The coldkey to dispute the swap for. ### `dissolveNetwork(coldkey: AccountId, netuid: NetUid)` @@ -2083,64 +1971,58 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.enableVotingPowerTracking` - **summary**: Enables voting power tracking for a subnet. - This function can be called by the subnet owner or root. When enabled, voting power EMA is updated every epoch for all validators. Voting power starts at 0 and increases over epochs. - - **Arguments:** + This function can be called by the subnet owner or root. When enabled, voting power EMA is updated every epoch for all validators. Voting power starts at 0 and increases over epochs. - - `origin` — The origin of the call, must be subnet owner or root. - - `netuid` — The subnet to enable voting power tracking for. + **Arguments:** + - `origin` — The origin of the call, must be subnet owner or root. + - `netuid` — The subnet to enable voting power tracking for. - **Errors:** - - - `SubnetNotExist` — If the subnet does not exist. - - `NotSubnetOwner` — If the caller is not the subnet owner or root. + **Errors:** + - `SubnetNotExist` — If the subnet does not exist. + - `NotSubnetOwner` — If the caller is not the subnet owner or root. ### `increaseTake(hotkey: AccountId, take: u16)` - **interface**: `api.tx.subtensorModule.increaseTake` - **summary**: Allows delegates to increase its take value. This call is rate-limited. - **Args:** - - - `origin` — (\::Origin): — The signature of the caller's coldkey. - - `hotkey` (T::AccountId) — The hotkey we are delegating (must be owned by the coldkey.) - - `take` (u16) — The new stake proportion that this hotkey takes from delegations. + **Args:** + - `origin` — (\::Origin): — The signature of the caller's coldkey. + - `hotkey` (T::AccountId) — The hotkey we are delegating (must be owned by the coldkey.) + - `take` (u16) — The new stake proportion that this hotkey takes from delegations. The new value can be between 0 and 11_796 and should be strictly greater than the previous value. T is the new value (rational number), the the parameter is calculated as [65535 * T]. For example, 1% would be [0.01 * 65535] = [655.35] = 655 - **Event:** - - - TakeIncreased; + **Event:** + - TakeIncreased; On successfully setting a increased take for this hotkey. - **Raises:** - - - `NotRegistered` — The hotkey we are delegating is not registered on the network. - - `NonAssociatedColdKey` — The hotkey we are delegating is not owned by the calling coldkey. - - `DelegateTakeTooHigh` — The delegate is setting a take which is not greater than the previous. + **Raises:** + - `NotRegistered` — The hotkey we are delegating is not registered on the network. + - `NonAssociatedColdKey` — The hotkey we are delegating is not owned by the calling coldkey. + - `DelegateTakeTooHigh` — The delegate is setting a take which is not greater than the previous. ### `moveStake(origin_hotkey: AccountId, destination_hotkey: AccountId, origin_netuid: NetUid, destination_netuid: NetUid, alpha_amount: AlphaBalance)` - **interface**: `api.tx.subtensorModule.moveStake` - **summary**: - The implementation for the extrinsic move_stake: Moves specified amount of stake from a hotkey to another across subnets. - **Args:** - - - `origin` — (\::Origin): + **Args:** + - `origin` — (\::Origin): The signature of the caller's coldkey. - - `origin_hotkey` (T::AccountId): + - `origin_hotkey` (T::AccountId): The hotkey account to move stake from. - - `destination_hotkey` (T::AccountId): + - `destination_hotkey` (T::AccountId): The hotkey account to move stake to. - - `origin_netuid` (T::AccountId): + - `origin_netuid` (T::AccountId): The subnet ID to move stake from. - - `destination_netuid` (T::AccountId): + - `destination_netuid` (T::AccountId): The subnet ID to move stake to. - - `alpha_amount` (T::AccountId): + - `alpha_amount` (T::AccountId): The alpha stake amount to move. ### `recycleAlpha(hotkey: AccountId, amount: AlphaBalance, netuid: NetUid)` @@ -2148,64 +2030,59 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.recycleAlpha` - **summary**: Recycles alpha from a cold/hot key pair, reducing AlphaOut on a subnet - **Arguments:** - - - `origin` — The origin of the call (must be signed by the coldkey) - - `hotkey` — The hotkey account - - `amount` — The amount of alpha to recycle - - `netuid` — The subnet ID + **Arguments:** + - `origin` — The origin of the call (must be signed by the coldkey) + - `hotkey` — The hotkey account + - `amount` — The amount of alpha to recycle + - `netuid` — The subnet ID - **Events:** + **Events:** - Emits a `TokensRecycled` event on success. + Emits a `TokensRecycled` event on success. ### `register(netuid: NetUid, block_number: u64, nonce: u64, work: Vec, hotkey: AccountId, coldkey: AccountId)` - **interface**: `api.tx.subtensorModule.register` - **summary**: - Registers a new neuron to the subnetwork. - **Args:** - - - `origin` — (\Origin): — The signature of the calling hotkey. - - `netuid` (u16) — The u16 network identifier. - - `block_number` (u64) — Block hash used to prove work done. - - `nonce` (u64) — Positive integer nonce used in POW. - - `work` (Vec\) — Vector encoded bytes representing work done. - - `hotkey` (T::AccountId) — Hotkey to be registered to the network. - - `coldkey` (T::AccountId) — Associated coldkey account. - - **Event:** - - - NeuronRegistered; + **Args:** + - `origin` — (\Origin): — The signature of the calling hotkey. + - `netuid` (u16) — The u16 network identifier. + - `block_number` (u64) — Block hash used to prove work done. + - `nonce` (u64) — Positive integer nonce used in POW. + - `work` (Vec\) — Vector encoded bytes representing work done. + - `hotkey` (T::AccountId) — Hotkey to be registered to the network. + - `coldkey` (T::AccountId) — Associated coldkey account. + + **Event:** + - NeuronRegistered; On successfully registering a uid to a neuron slot on a subnetwork. - **Raises:** - - - `MechanismDoesNotExist` — Attempting to register to a non existent network. - - `TooManyRegistrationsThisBlock` — This registration exceeds the total allowed on this network this block. - - `HotKeyAlreadyRegisteredInSubNet` — The hotkey is already registered on this network. - - `InvalidWorkBlock` — The work has been performed on a stale, future, or non existent block. - - `InvalidDifficulty` — The work does not match the difficulty. - - `InvalidSeal` — The seal is incorrect. + **Raises:** + - `MechanismDoesNotExist` — Attempting to register to a non existent network. + - `TooManyRegistrationsThisBlock` — This registration exceeds the total allowed on this network this block. + - `HotKeyAlreadyRegisteredInSubNet` — The hotkey is already registered on this network. + - `InvalidWorkBlock` — The work has been performed on a stale, future, or non existent block. + - `InvalidDifficulty` — The work does not match the difficulty. + - `InvalidSeal` — The seal is incorrect. ### `registerLeasedNetwork(emissions_share: Percent, end_block: Option>)` - **interface**: `api.tx.subtensorModule.registerLeasedNetwork` - **summary**: Register a new leased network. - The crowdloan's contributions are used to compute the share of the emissions that the contributors will receive as dividends. + The crowdloan's contributions are used to compute the share of the emissions that the contributors will receive as dividends. - The leftover cap is refunded to the contributors and the beneficiary. + The leftover cap is refunded to the contributors and the beneficiary. - **Args:** - - - `origin` — (\::Origin): + **Args:** + - `origin` — (\::Origin): The signature of the caller's coldkey. - - `emissions_share` (Percent): + - `emissions_share` (Percent): The share of the emissions that the contributors will receive as dividends. - - `end_block` (Option\>): + - `end_block` (Option\>): The block at which the lease will end. If not defined, the lease is perpetual. ### `registerLimit(netuid: NetUid, hotkey: AccountId, limit_price: u64)` @@ -2213,7 +2090,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.registerLimit` - **summary**: User register a new subnetwork via burning token, but only if the on-chain burn price for this block is \<= `limit_price`. - `limit_price` is expressed in the same TaoCurrency/u64 units as `Burn`. + `limit_price` is expressed in the same TaoCurrency/u64 units as `Burn`. ### `registerNetwork(hotkey: AccountId)` @@ -2230,23 +2107,20 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.removeStake` - **summary**: Remove stake from the staking account. The call must be made from the coldkey account attached to the neuron metadata. Only this key has permission to make staking and unstaking requests. - **Args:** - - - `origin` — (\Origin): — The signature of the caller's coldkey. - - `hotkey` (T::AccountId) — The associated hotkey account. - - `netuid` (u16) — Subnetwork UID - - `amount_unstaked` (u64) — The amount of stake to be added to the hotkey staking account. - - **Event:** + **Args:** + - `origin` — (\Origin): — The signature of the caller's coldkey. + - `hotkey` (T::AccountId) — The associated hotkey account. + - `netuid` (u16) — Subnetwork UID + - `amount_unstaked` (u64) — The amount of stake to be added to the hotkey staking account. - - StakeRemoved; + **Event:** + - StakeRemoved; On the successfully removing stake from the hotkey account. - **Raises:** - - - `NotRegistered` — Thrown if the account we are attempting to unstake from is non existent. - - `NonAssociatedColdKey` — Thrown if the coldkey does not own the hotkey we are unstaking from. - - `NotEnoughStakeToWithdraw` — Thrown if there is not enough stake on the hotkey to withdwraw this amount. + **Raises:** + - `NotRegistered` — Thrown if the account we are attempting to unstake from is non existent. + - `NonAssociatedColdKey` — Thrown if the coldkey does not own the hotkey we are unstaking from. + - `NotEnoughStakeToWithdraw` — Thrown if there is not enough stake on the hotkey to withdwraw this amount. ### `removeStakeFullLimit(hotkey: AccountId, netuid: NetUid, limit_price: Option)` @@ -2258,81 +2132,75 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.removeStakeLimit` - **summary**: Removes stake from a hotkey on a subnet with a price limit. This extrinsic allows to specify the limit price for alpha token at which or better (higher) the staking should execute. - In case if slippage occurs and the price shall move beyond the limit price, the staking order may execute only partially or not execute at all. - - **Args:** + In case if slippage occurs and the price shall move beyond the limit price, the staking order may execute only partially or not execute at all. - - `origin` — (\Origin): — The signature of the caller's coldkey. - - `hotkey` (T::AccountId) — The associated hotkey account. - - `netuid` (u16) — Subnetwork UID - - `amount_unstaked` (u64) — The amount of stake to be added to the hotkey staking account. - - `limit_price` (u64) — The limit price expressed in units of RAO per one Alpha. - - `allow_partial` (bool) — Allows partial execution of the amount. If set to false, this becomes + **Args:** + - `origin` — (\Origin): — The signature of the caller's coldkey. + - `hotkey` (T::AccountId) — The associated hotkey account. + - `netuid` (u16) — Subnetwork UID + - `amount_unstaked` (u64) — The amount of stake to be added to the hotkey staking account. + - `limit_price` (u64) — The limit price expressed in units of RAO per one Alpha. + - `allow_partial` (bool) — Allows partial execution of the amount. If set to false, this becomes fill or kill type or order. - **Event:** - - - StakeRemoved; + **Event:** + - StakeRemoved; On the successfully removing stake from the hotkey account. - **Raises:** - - - `NotRegistered` — Thrown if the account we are attempting to unstake from is non existent. - - `NonAssociatedColdKey` — Thrown if the coldkey does not own the hotkey we are unstaking from. - - `NotEnoughStakeToWithdraw` — Thrown if there is not enough stake on the hotkey to withdwraw this amount. + **Raises:** + - `NotRegistered` — Thrown if the account we are attempting to unstake from is non existent. + - `NonAssociatedColdKey` — Thrown if the coldkey does not own the hotkey we are unstaking from. + - `NotEnoughStakeToWithdraw` — Thrown if there is not enough stake on the hotkey to withdwraw this amount. ### `resetColdkeySwap(coldkey: AccountId)` - **interface**: `api.tx.subtensorModule.resetColdkeySwap` - **summary**: Reset a coldkey swap by clearing the announcement and dispute status. - The dispatch origin of this call must be root. - - - `coldkey`: The coldkey to reset the swap for. + The dispatch origin of this call must be root. + - `coldkey`: The coldkey to reset the swap for. ### `revealMechanismWeights(netuid: NetUid, mecid: MechId, uids: Vec, values: Vec, salt: Vec, version_key: u64)` - **interface**: `api.tx.subtensorModule.revealMechanismWeights` - **summary**: - Used to reveal the weights for a previously committed hash for mechanisms. - **Args:** - - - `origin`: (`::RuntimeOrigin`): + **Args:** + - `origin`: (`::RuntimeOrigin`): The signature of the revealing hotkey. - - `netuid` (`u16`): + - `netuid` (`u16`): The u16 network identifier. - - `mecid` (`u8`): + - `mecid` (`u8`): The u8 mechanism identifier. - - `uids` (`Vec`): + - `uids` (`Vec`): The uids for the weights being revealed. - - `values` (`Vec`): + - `values` (`Vec`): The values of the weights being revealed. - - `salt` (`Vec`): + - `salt` (`Vec`): The salt used to generate the commit hash. - - `version_key` (`u64`): + - `version_key` (`u64`): The network version key. - **Raises:** - - - `CommitRevealDisabled`: + **Raises:** + - `CommitRevealDisabled`: Attempting to reveal weights when the commit-reveal mechanism is disabled. - - `NoWeightsCommitFound`: + - `NoWeightsCommitFound`: Attempting to reveal weights without an existing commit. - - `ExpiredWeightCommit`: + - `ExpiredWeightCommit`: Attempting to reveal a weight commit that has expired. - - `RevealTooEarly`: + - `RevealTooEarly`: Attempting to reveal weights outside the valid reveal period. - - `InvalidRevealCommitHashNotMatch`: + - `InvalidRevealCommitHashNotMatch`: The revealed hash does not match any committed hash. ### `revealWeights(netuid: NetUid, uids: Vec, values: Vec, salt: Vec, version_key: u64)` @@ -2340,41 +2208,39 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.revealWeights` - **summary**: - Used to reveal the weights for a previously committed hash. - **Args:** - - - `origin`: (`::RuntimeOrigin`): + **Args:** + - `origin`: (`::RuntimeOrigin`): The signature of the revealing hotkey. - - `netuid` (`u16`): + - `netuid` (`u16`): The u16 network identifier. - - `uids` (`Vec`): + - `uids` (`Vec`): The uids for the weights being revealed. - - `values` (`Vec`): + - `values` (`Vec`): The values of the weights being revealed. - - `salt` (`Vec`): + - `salt` (`Vec`): The salt used to generate the commit hash. - - `version_key` (`u64`): + - `version_key` (`u64`): The network version key. - **Raises:** - - - `CommitRevealDisabled`: + **Raises:** + - `CommitRevealDisabled`: Attempting to reveal weights when the commit-reveal mechanism is disabled. - - `NoWeightsCommitFound`: + - `NoWeightsCommitFound`: Attempting to reveal weights without an existing commit. - - `ExpiredWeightCommit`: + - `ExpiredWeightCommit`: Attempting to reveal a weight commit that has expired. - - `RevealTooEarly`: + - `RevealTooEarly`: Attempting to reveal weights outside the valid reveal period. - - `InvalidRevealCommitHashNotMatch`: + - `InvalidRevealCommitHashNotMatch`: The revealed hash does not match any committed hash. ### `rootDissolveNetwork(netuid: NetUid)` @@ -2392,82 +2258,75 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.scheduleSwapColdkey` - **summary**: Schedules a coldkey swap operation to be executed at a future block. - WARNING: This function is deprecated, please migrate to `announce_coldkey_swap`/`coldkey_swap` + WARNING: This function is deprecated, please migrate to `announce_coldkey_swap`/`coldkey_swap` ### `serveAxon(netuid: NetUid, version: u32, ip: u128, port: u16, ip_type: u8, protocol: u8, placeholder1: u8, placeholder2: u8)` - **interface**: `api.tx.subtensorModule.serveAxon` - **summary**: 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. - **Args:** - - - `origin` — (\Origin): — The signature of the caller. - - `netuid` (u16) — The u16 network identifier. - - `version` (u64) — The bittensor version identifier. - - `ip` (u64) — The endpoint ip information as a u128 encoded integer. - - `port` (u16) — The endpoint port information as a u16 encoded integer. - - `ip_type` (u8) — The endpoint ip version as a u8, 4 or 6. - - `protocol` (u8) — UDP:1 or TCP:0 - - `placeholder1` (u8) — Placeholder for further extra params. - - `placeholder2` (u8) — Placeholder for further extra params. - - **Event:** - - - AxonServed; + **Args:** + - `origin` — (\Origin): — The signature of the caller. + - `netuid` (u16) — The u16 network identifier. + - `version` (u64) — The bittensor version identifier. + - `ip` (u64) — The endpoint ip information as a u128 encoded integer. + - `port` (u16) — The endpoint port information as a u16 encoded integer. + - `ip_type` (u8) — The endpoint ip version as a u8, 4 or 6. + - `protocol` (u8) — UDP:1 or TCP:0 + - `placeholder1` (u8) — Placeholder for further extra params. + - `placeholder2` (u8) — Placeholder for further extra params. + + **Event:** + - AxonServed; On successfully serving the axon info. - **Raises:** - - - `MechanismDoesNotExist` — Attempting to set weights on a non-existent network. - - `NotRegistered` — Attempting to set weights from a non registered account. - - `InvalidIpType` — The ip type is not 4 or 6. - - `InvalidIpAddress` — The numerically encoded ip address does not resolve to a proper ip. - - `ServingRateLimitExceeded` — Attempting to set prometheus information withing the rate limit min. + **Raises:** + - `MechanismDoesNotExist` — Attempting to set weights on a non-existent network. + - `NotRegistered` — Attempting to set weights from a non registered account. + - `InvalidIpType` — The ip type is not 4 or 6. + - `InvalidIpAddress` — The numerically encoded ip address does not resolve to a proper ip. + - `ServingRateLimitExceeded` — Attempting to set prometheus information withing the rate limit min. ### `serveAxonTls(netuid: NetUid, version: u32, ip: u128, port: u16, ip_type: u8, protocol: u8, placeholder1: u8, placeholder2: u8, certificate: Vec)` - **interface**: `api.tx.subtensorModule.serveAxonTls` - **summary**: 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. - **Args:** - - - `origin` — (\Origin): — The signature of the caller. - - `netuid` (u16) — The u16 network identifier. - - `version` (u64) — The bittensor version identifier. - - `ip` (u64) — The endpoint ip information as a u128 encoded integer. - - `port` (u16) — The endpoint port information as a u16 encoded integer. - - `ip_type` (u8) — The endpoint ip version as a u8, 4 or 6. - - `protocol` (u8) — UDP:1 or TCP:0 - - `placeholder1` (u8) — Placeholder for further extra params. - - `placeholder2` (u8) — Placeholder for further extra params. - - `certificate` (Vec\) — TLS certificate for inter neuron communitation. - - **Event:** - - - AxonServed; + **Args:** + - `origin` — (\Origin): — The signature of the caller. + - `netuid` (u16) — The u16 network identifier. + - `version` (u64) — The bittensor version identifier. + - `ip` (u64) — The endpoint ip information as a u128 encoded integer. + - `port` (u16) — The endpoint port information as a u16 encoded integer. + - `ip_type` (u8) — The endpoint ip version as a u8, 4 or 6. + - `protocol` (u8) — UDP:1 or TCP:0 + - `placeholder1` (u8) — Placeholder for further extra params. + - `placeholder2` (u8) — Placeholder for further extra params. + - `certificate` (Vec\) — TLS certificate for inter neuron communitation. + + **Event:** + - AxonServed; On successfully serving the axon info. - **Raises:** - - - `MechanismDoesNotExist` — Attempting to set weights on a non-existent network. - - `NotRegistered` — Attempting to set weights from a non registered account. - - `InvalidIpType` — The ip type is not 4 or 6. - - `InvalidIpAddress` — The numerically encoded ip address does not resolve to a proper ip. - - `ServingRateLimitExceeded` — Attempting to set prometheus information withing the rate limit min. + **Raises:** + - `MechanismDoesNotExist` — Attempting to set weights on a non-existent network. + - `NotRegistered` — Attempting to set weights from a non registered account. + - `InvalidIpType` — The ip type is not 4 or 6. + - `InvalidIpAddress` — The numerically encoded ip address does not resolve to a proper ip. + - `ServingRateLimitExceeded` — Attempting to set prometheus information withing the rate limit min. ### `servePrometheus(netuid: NetUid, version: u32, ip: u128, port: u16, ip_type: u8)` - **interface**: `api.tx.subtensorModule.servePrometheus` - **summary**: - Set prometheus information for the neuron. - **Args:** - - - `origin` — (\Origin): — The signature of the calling hotkey. - - `netuid` (u16) — The u16 network identifier. - - `version` (u16) — The bittensor version identifier. - - `ip` (u128) — The prometheus ip information as a u128 encoded integer. - - `port` (u16) — The prometheus port information as a u16 encoded integer. - - `ip_type` (u8) — The ip type v4 or v6. + **Args:** + - `origin` — (\Origin): — The signature of the calling hotkey. + - `netuid` (u16) — The u16 network identifier. + - `version` (u16) — The bittensor version identifier. + - `ip` (u128) — The prometheus ip information as a u128 encoded integer. + - `port` (u16) — The prometheus port information as a u16 encoded integer. + - `ip_type` (u8) — The ip type v4 or v6. ### `setAutoParentDelegationEnabled(hotkey: AccountId, enabled: bool)` @@ -2479,31 +2338,28 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.setChildkeyTake` - **summary**: Sets the childkey take for a given hotkey. - This function allows a coldkey to set the childkey take for a given hotkey. The childkey take determines the proportion of stake that the hotkey keeps for itself when distributing stake to its children. - - **Arguments:** + This function allows a coldkey to set the childkey take for a given hotkey. The childkey take determines the proportion of stake that the hotkey keeps for itself when distributing stake to its children. - - `origin` (\::RuntimeOrigin): + **Arguments:** + - `origin` (\::RuntimeOrigin): The signature of the calling coldkey. Setting childkey take can only be done by the coldkey. - - `hotkey` (T::AccountId): + - `hotkey` (T::AccountId): The hotkey for which the childkey take will be set. - - `take` (u16): + - `take` (u16): The new childkey take value. This is a percentage represented as a value between 0 and 10000, where 10000 represents 100%. - **Events:** - - - `ChildkeyTakeSet`: + **Events:** + - `ChildkeyTakeSet`: On successfully setting the childkey take for a hotkey. - **Errors:** - - - `NonAssociatedColdKey`: + **Errors:** + - `NonAssociatedColdKey`: The coldkey does not own the hotkey. - - `InvalidChildkeyTake`: + - `InvalidChildkeyTake`: The provided take value is invalid (greater than the maximum allowed take). - - `TxChildkeyTakeRateLimitExceeded`: + - `TxChildkeyTakeRateLimitExceeded`: The rate limit for changing childkey take has been exceeded. ### `setChildren(hotkey: AccountId, netuid: NetUid, children: Vec<(u64, T::AccountId)>)` @@ -2511,65 +2367,60 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.setChildren` - **summary**: Set a single child for a given hotkey on a specified network. - This function allows a coldkey to set a single child for a given hotkey on a specified network. The proportion of the hotkey's stake to be allocated to the child is also specified. - - **Arguments:** + This function allows a coldkey to set a single child for a given hotkey on a specified network. The proportion of the hotkey's stake to be allocated to the child is also specified. - - `origin` (\::RuntimeOrigin): + **Arguments:** + - `origin` (\::RuntimeOrigin): The signature of the calling coldkey. Setting a hotkey child can only be done by the coldkey. - - `hotkey` (T::AccountId): + - `hotkey` (T::AccountId): The hotkey which will be assigned the child. - - `child` (T::AccountId): + - `child` (T::AccountId): The child which will be assigned to the hotkey. - - `netuid` (u16): + - `netuid` (u16): The u16 network identifier where the childkey will exist. - - `proportion` (u64): + - `proportion` (u64): Proportion of the hotkey's stake to be given to the child, the value must be u64 normalized. - **Events:** - - - `ChildAddedSingular`: + **Events:** + - `ChildAddedSingular`: On successfully registering a child to a hotkey. - **Errors:** - - - `MechanismDoesNotExist`: + **Errors:** + - `MechanismDoesNotExist`: Attempting to register to a non-existent network. - - `RegistrationNotPermittedOnRootSubnet`: + - `RegistrationNotPermittedOnRootSubnet`: Attempting to register a child on the root network. - - `NonAssociatedColdKey`: + - `NonAssociatedColdKey`: The coldkey does not own the hotkey or the child is the same as the hotkey. - - `HotKeyAccountNotExists`: + - `HotKeyAccountNotExists`: The hotkey account does not exist. - **Detailed Explanation of Checks:** - - 1. **Signature Verification**: Ensures that the caller has signed the transaction, verifying the coldkey. - 2. **Root Network Check**: Ensures that the delegation is not on the root network, as child hotkeys are not valid on the root. - 3. **Network Existence Check**: Ensures that the specified network exists. - 4. **Ownership Verification**: Ensures that the coldkey owns the hotkey. - 5. **Hotkey Account Existence Check**: Ensures that the hotkey account already exists. - 6. **Child-Hotkey Distinction**: Ensures that the child is not the same as the hotkey. - 7. **Old Children Cleanup**: Removes the hotkey from the parent list of its old children. - 8. **New Children Assignment**: Assigns the new child to the hotkey and updates the parent list for the new child. + **Detailed Explanation of Checks:** + 1. **Signature Verification**: Ensures that the caller has signed the transaction, verifying the coldkey. + 2. **Root Network Check**: Ensures that the delegation is not on the root network, as child hotkeys are not valid on the root. + 3. **Network Existence Check**: Ensures that the specified network exists. + 4. **Ownership Verification**: Ensures that the coldkey owns the hotkey. + 5. **Hotkey Account Existence Check**: Ensures that the hotkey account already exists. + 6. **Child-Hotkey Distinction**: Ensures that the child is not the same as the hotkey. + 7. **Old Children Cleanup**: Removes the hotkey from the parent list of its old children. + 8. **New Children Assignment**: Assigns the new child to the hotkey and updates the parent list for the new child. ### `setColdkeyAutoStakeHotkey(netuid: NetUid, hotkey: AccountId)` - **interface**: `api.tx.subtensorModule.setColdkeyAutoStakeHotkey` - **summary**: Set the autostake destination hotkey for a coldkey. - The caller selects a hotkey where all future rewards will be automatically staked. - - **Args:** + The caller selects a hotkey where all future rewards will be automatically staked. - - `origin` — (\::Origin): + **Args:** + - `origin` — (\::Origin): The signature of the caller's coldkey. - - `hotkey` (T::AccountId): + - `hotkey` (T::AccountId): The hotkey account to designate as the autostake destination. ### `setIdentity(name: Vec, url: Vec, github_repo: Vec, image: Vec, discord: Vec, description: Vec, additional: Vec)` @@ -2577,56 +2428,52 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.setIdentity` - **summary**: - Set prometheus information for the neuron. - **Args:** - - - `origin` — (\Origin): — The signature of the calling hotkey. - - `netuid` (u16) — The u16 network identifier. - - `version` (u16) — The bittensor version identifier. - - `ip` (u128) — The prometheus ip information as a u128 encoded integer. - - `port` (u16) — The prometheus port information as a u16 encoded integer. - - `ip_type` (u8) — The ip type v4 or v6. + **Args:** + - `origin` — (\Origin): — The signature of the calling hotkey. + - `netuid` (u16) — The u16 network identifier. + - `version` (u16) — The bittensor version identifier. + - `ip` (u128) — The prometheus ip information as a u128 encoded integer. + - `port` (u16) — The prometheus port information as a u16 encoded integer. + - `ip_type` (u8) — The ip type v4 or v6. ### `setMechanismWeights(netuid: NetUid, mecid: MechId, dests: Vec, weights: Vec, version_key: u64)` - **interface**: `api.tx.subtensorModule.setMechanismWeights` - **summary**: Sets the caller weights for the incentive mechanism for mechanisms. The call can be made from the hotkey account so is potentially insecure, however, the damage of changing weights is minimal if caught early. This function includes all the checks that the passed weights meet the requirements. Stored as u16s they represent rational values in the range [0,1] which sum to 1 and can be interpreted as probabilities. The specific weights determine how inflation propagates outward from this peer. - Note: The 16 bit integers weights should represent 1.0 as the max u16. However, the function normalizes all integers to u16_max anyway. This means that if the sum of all elements is larger or smaller than the amount of elements * u16_max, all elements will be corrected for this deviation. - - **Args:** + Note: The 16 bit integers weights should represent 1.0 as the max u16. However, the function normalizes all integers to u16_max anyway. This means that if the sum of all elements is larger or smaller than the amount of elements \* u16_max, all elements will be corrected for this deviation. - - `origin`: (\Origin): + **Args:** + - `origin`: (\Origin): The caller, a hotkey who wishes to set their weights. - - `netuid` (u16): + - `netuid` (u16): The network uid we are setting these weights on. - - `mecid` (`u8`): + - `mecid` (`u8`): The u8 mechnism identifier. - - `dests` (Vec\): + - `dests` (Vec\): The edge endpoint for the weight, i.e. j for w_ij. - - `weights` (Vec\) — The u16 integer encoded weights. Interpreted as rational + - `weights` (Vec\) — The u16 integer encoded weights. Interpreted as rational values in the range [0,1]. They must sum to in32::MAX. - - `version_key` (u64) — The network version key to check if the validator is up to date. + - `version_key` (u64) — The network version key to check if the validator is up to date. - **Event:** - - - WeightsSet; + **Event:** + - WeightsSet; On successfully setting the weights on chain. - **Raises:** - - - `MechanismDoesNotExist` — Attempting to set weights on a non-existent network. - - `NotRegistered` — Attempting to set weights from a non registered account. - - `WeightVecNotEqualSize` — Attempting to set weights with uids not of same length. - - `DuplicateUids` — Attempting to set weights with duplicate uids. - - `UidsLengthExceedUidsInSubNet` — Attempting to set weights above the max allowed uids. - - `UidVecContainInvalidOne` — Attempting to set weights with invalid uids. - - `WeightVecLengthIsLow` — Attempting to set weights with fewer weights than min. - - `MaxWeightExceeded` — Attempting to set weights with max value exceeding limit. + **Raises:** + - `MechanismDoesNotExist` — Attempting to set weights on a non-existent network. + - `NotRegistered` — Attempting to set weights from a non registered account. + - `WeightVecNotEqualSize` — Attempting to set weights with uids not of same length. + - `DuplicateUids` — Attempting to set weights with duplicate uids. + - `UidsLengthExceedUidsInSubNet` — Attempting to set weights above the max allowed uids. + - `UidVecContainInvalidOne` — Attempting to set weights with invalid uids. + - `WeightVecLengthIsLow` — Attempting to set weights with fewer weights than min. + - `MaxWeightExceeded` — Attempting to set weights with max value exceeding limit. ### `setPendingChildkeyCooldown(cooldown: u64)` @@ -2638,13 +2485,11 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.setRootClaimType` - **summary**: Sets the root claim type for the coldkey. - **Args:** + **Args:** + - `origin` — (\Origin): — The signature of the caller's coldkey. - - `origin` — (\Origin): — The signature of the caller's coldkey. - - **Event:** - - - RootClaimTypeSet; + **Event:** + - RootClaimTypeSet; On the successfully setting the root claim type for the coldkey. ### `setSubnetIdentity(netuid: NetUid, subnet_name: Vec, github_repo: Vec, subnet_contact: Vec, subnet_url: Vec, discord: Vec, description: Vec, logo_url: Vec, additional: Vec)` @@ -2652,21 +2497,20 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.setSubnetIdentity` - **summary**: - Set the identity information for a subnet. - **Args:** - - - `origin` — (\::Origin): + **Args:** + - `origin` — (\::Origin): The signature of the calling coldkey, which must be the owner of the subnet. - - `netuid` (u16): + - `netuid` (u16): The unique network identifier of the subnet. - - `subnet_name` (Vec\): + - `subnet_name` (Vec\): The name of the subnet. - - `github_repo` (Vec\): + - `github_repo` (Vec\): The GitHub repository associated with the subnet identity. - - `subnet_contact` (Vec\): + - `subnet_contact` (Vec\): The contact information for the subnet. ### `setWeights(netuid: NetUid, dests: Vec, weights: Vec, version_key: u64)` @@ -2674,85 +2518,77 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.setWeights` - **summary**: Sets the caller weights for the incentive mechanism. The call can be made from the hotkey account so is potentially insecure, however, the damage of changing weights is minimal if caught early. This function includes all the checks that the passed weights meet the requirements. Stored as u16s they represent rational values in the range [0,1] which sum to 1 and can be interpreted as probabilities. The specific weights determine how inflation propagates outward from this peer. - Note: The 16 bit integers weights should represent 1.0 as the max u16. However, the function normalizes all integers to u16_max anyway. This means that if the sum of all elements is larger or smaller than the amount of elements * u16_max, all elements will be corrected for this deviation. + Note: The 16 bit integers weights should represent 1.0 as the max u16. However, the function normalizes all integers to u16_max anyway. This means that if the sum of all elements is larger or smaller than the amount of elements \* u16_max, all elements will be corrected for this deviation. - **Args:** - - - `origin`: (\Origin): + **Args:** + - `origin`: (\Origin): The caller, a hotkey who wishes to set their weights. - - `netuid` (u16): + - `netuid` (u16): The network uid we are setting these weights on. - - `dests` (Vec\): + - `dests` (Vec\): The edge endpoint for the weight, i.e. j for w_ij. - - `weights` (Vec\) — The u16 integer encoded weights. Interpreted as rational + - `weights` (Vec\) — The u16 integer encoded weights. Interpreted as rational values in the range [0,1]. They must sum to in32::MAX. - - `version_key` (u64) — The network version key to check if the validator is up to date. - - **Event:** + - `version_key` (u64) — The network version key to check if the validator is up to date. - - WeightsSet; + **Event:** + - WeightsSet; On successfully setting the weights on chain. - **Raises:** - - - `MechanismDoesNotExist` — Attempting to set weights on a non-existent network. - - `NotRegistered` — Attempting to set weights from a non registered account. - - `WeightVecNotEqualSize` — Attempting to set weights with uids not of same length. - - `DuplicateUids` — Attempting to set weights with duplicate uids. - - `UidsLengthExceedUidsInSubNet` — Attempting to set weights above the max allowed uids. - - `UidVecContainInvalidOne` — Attempting to set weights with invalid uids. - - `WeightVecLengthIsLow` — Attempting to set weights with fewer weights than min. - - `MaxWeightExceeded` — Attempting to set weights with max value exceeding limit. + **Raises:** + - `MechanismDoesNotExist` — Attempting to set weights on a non-existent network. + - `NotRegistered` — Attempting to set weights from a non registered account. + - `WeightVecNotEqualSize` — Attempting to set weights with uids not of same length. + - `DuplicateUids` — Attempting to set weights with duplicate uids. + - `UidsLengthExceedUidsInSubNet` — Attempting to set weights above the max allowed uids. + - `UidVecContainInvalidOne` — Attempting to set weights with invalid uids. + - `WeightVecLengthIsLow` — Attempting to set weights with fewer weights than min. + - `MaxWeightExceeded` — Attempting to set weights with max value exceeding limit. ### `startCall(netuid: NetUid)` - **interface**: `api.tx.subtensorModule.startCall` - **summary**: Initiates a call on a subnet. - **Arguments:** - - - `origin` — The origin of the call, which must be signed by the subnet owner. - - `netuid` — The unique identifier of the subnet on which the call is being initiated. + **Arguments:** + - `origin` — The origin of the call, which must be signed by the subnet owner. + - `netuid` — The unique identifier of the subnet on which the call is being initiated. - **Events:** + **Events:** - Emits a `FirstEmissionBlockNumberSet` event on success. + Emits a `FirstEmissionBlockNumberSet` event on success. ### `sudoSetMaxChildkeyTake(take: u16)` - **interface**: `api.tx.subtensorModule.sudoSetMaxChildkeyTake` - **summary**: Sets the maximum allowed childkey take. - This function can only be called by the root origin. + This function can only be called by the root origin. - **Arguments:** + **Arguments:** + - `origin` — The origin of the call, must be root. + - `take` — The new maximum childkey take value. - - `origin` — The origin of the call, must be root. - - `take` — The new maximum childkey take value. - - **Errors:** - - - `BadOrigin` — If the origin is not root. + **Errors:** + - `BadOrigin` — If the origin is not root. ### `sudoSetMinChildkeyTake(take: u16)` - **interface**: `api.tx.subtensorModule.sudoSetMinChildkeyTake` - **summary**: Sets the minimum allowed childkey take. - This function can only be called by the root origin. - - **Arguments:** + This function can only be called by the root origin. - - `origin` — The origin of the call, must be root. - - `take` — The new minimum childkey take value. + **Arguments:** + - `origin` — The origin of the call, must be root. + - `take` — The new minimum childkey take value. - **Errors:** - - - `BadOrigin` — If the origin is not root. + **Errors:** + - `BadOrigin` — If the origin is not root. ### `sudoSetNumRootClaims(new_value: u64)` @@ -2769,66 +2605,60 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.sudoSetTxChildkeyTakeRateLimit` - **summary**: Sets the transaction rate limit for changing childkey take. - This function can only be called by the root origin. - - **Arguments:** + This function can only be called by the root origin. - - `origin` — The origin of the call, must be root. - - `tx_rate_limit` — The new rate limit in blocks. + **Arguments:** + - `origin` — The origin of the call, must be root. + - `tx_rate_limit` — The new rate limit in blocks. - **Errors:** - - - `BadOrigin` — If the origin is not root. + **Errors:** + - `BadOrigin` — If the origin is not root. ### `sudoSetVotingPowerEmaAlpha(netuid: NetUid, alpha: u64)` - **interface**: `api.tx.subtensorModule.sudoSetVotingPowerEmaAlpha` - **summary**: Sets the EMA alpha value for voting power calculation on a subnet. - This function can only be called by root (sudo). Higher alpha = faster response to stake changes. Alpha is stored as u64 with 18 decimal precision (1.0 = 10^18). - - **Arguments:** + This function can only be called by root (sudo). Higher alpha = faster response to stake changes. Alpha is stored as u64 with 18 decimal precision (1.0 = 10^18). - - `origin` — The origin of the call, must be root. - - `netuid` — The subnet to set the alpha for. - - `alpha` — The new alpha value (u64 with 18 decimal precision). + **Arguments:** + - `origin` — The origin of the call, must be root. + - `netuid` — The subnet to set the alpha for. + - `alpha` — The new alpha value (u64 with 18 decimal precision). - **Errors:** - - - `BadOrigin` — If the origin is not root. - - `SubnetNotExist` — If the subnet does not exist. - - `InvalidVotingPowerEmaAlpha` — If alpha is greater than 10^18 (1.0). + **Errors:** + - `BadOrigin` — If the origin is not root. + - `SubnetNotExist` — If the subnet does not exist. + - `InvalidVotingPowerEmaAlpha` — If alpha is greater than 10^18 (1.0). ### `swapColdkey(old_coldkey: AccountId, new_coldkey: AccountId, swap_cost: TaoBalance)` - **interface**: `api.tx.subtensorModule.swapColdkey` - **summary**: Performs an arbitrary coldkey swap for any coldkey. - Only callable by root as it doesn't require an announcement and can be used to swap any coldkey. + Only callable by root as it doesn't require an announcement and can be used to swap any coldkey. ### `swapColdkeyAnnounced(new_coldkey: AccountId)` - **interface**: `api.tx.subtensorModule.swapColdkeyAnnounced` - **summary**: Performs a coldkey swap if an announcement has been made. - The dispatch origin of this call must be the original coldkey that made the announcement. - - - `new_coldkey`: The new coldkey to swap to. The BlakeTwo256 hash of the new coldkey must be + The dispatch origin of this call must be the original coldkey that made the announcement. + - `new_coldkey`: The new coldkey to swap to. The BlakeTwo256 hash of the new coldkey must be the same as the announced coldkey hash. - The `ColdkeySwapped` event is emitted on successful swap. + The `ColdkeySwapped` event is emitted on successful swap. ### `swapHotkey(hotkey: AccountId, new_hotkey: AccountId, netuid: Option)` - **interface**: `api.tx.subtensorModule.swapHotkey` - **summary**: - The extrinsic for user to change its hotkey in subnet or all subnets. - **Arguments:** - - - `origin` — The origin of the transaction (must be signed by the coldkey). - - `hotkey` — The old hotkey to be swapped. - - `new_hotkey` — The new hotkey to replace the old one. - - `netuid` — Optional subnet ID. If `Some`, swap only on that subnet; if `None`, swap on all subnets. + **Arguments:** + - `origin` — The origin of the transaction (must be signed by the coldkey). + - `hotkey` — The old hotkey to be swapped. + - `new_hotkey` — The new hotkey to replace the old one. + - `netuid` — Optional subnet ID. If `Some`, swap only on that subnet; if `None`, swap on all subnets. is transferred to the new hotkey. ### `swapHotkeyV2(hotkey: AccountId, new_hotkey: AccountId, netuid: Option, keep_stake: bool)` @@ -2836,13 +2666,12 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.swapHotkeyV2` - **summary**: - The extrinsic for user to change its hotkey in subnet or all subnets. This extrinsic is similar to swap_hotkey, but with keep_stake parameter bo be able to keep the stake when swapping a root key to a child key - **Arguments:** - - - `origin` — The origin of the transaction (must be signed by the coldkey). - - `hotkey` — The old hotkey to be swapped. - - `new_hotkey` — The new hotkey to replace the old one. - - `netuid` — Optional subnet ID. If `Some`, swap only on that subnet; if `None`, swap on all subnets. - - `keep_stake` — If `true`, stake remains on the old hotkey and the rest metadata + **Arguments:** + - `origin` — The origin of the transaction (must be signed by the coldkey). + - `hotkey` — The old hotkey to be swapped. + - `new_hotkey` — The new hotkey to replace the old one. + - `netuid` — Optional subnet ID. If `Some`, swap only on that subnet; if `None`, swap on all subnets. + - `keep_stake` — If `true`, stake remains on the old hotkey and the rest metadata is transferred to the new hotkey. ### `swapStake(hotkey: AccountId, origin_netuid: NetUid, destination_netuid: NetUid, alpha_amount: AlphaBalance)` @@ -2850,73 +2679,70 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.swapStake` - **summary**: Swaps a specified amount of stake from one subnet to another, while keeping the same coldkey and hotkey. - **Arguments:** - - - `origin` — The origin of the transaction, which must be signed by the coldkey that owns the `hotkey`. - - `hotkey` — The hotkey whose stake is being swapped. - - `origin_netuid` — The network/subnet ID from which stake is removed. - - `destination_netuid` — The network/subnet ID to which stake is added. - - `alpha_amount` — The amount of stake to swap. + **Arguments:** + - `origin` — The origin of the transaction, which must be signed by the coldkey that owns the `hotkey`. + - `hotkey` — The hotkey whose stake is being swapped. + - `origin_netuid` — The network/subnet ID from which stake is removed. + - `destination_netuid` — The network/subnet ID to which stake is added. + - `alpha_amount` — The amount of stake to swap. - **Errors:** + **Errors:** - Returns an error if: - - The transaction is not signed by the correct coldkey (i.e., `coldkey_owns_hotkey` fails). - - Either `origin_netuid` or `destination_netuid` does not exist. - - The hotkey does not exist. - - There is insufficient stake on `(coldkey, hotkey, origin_netuid)`. - - The swap amount is below the minimum stake requirement. + Returns an error if: + - The transaction is not signed by the correct coldkey (i.e., `coldkey_owns_hotkey` fails). + - Either `origin_netuid` or `destination_netuid` does not exist. + - The hotkey does not exist. + - There is insufficient stake on `(coldkey, hotkey, origin_netuid)`. + - The swap amount is below the minimum stake requirement. - **Events:** + **Events:** - May emit a `StakeSwapped` event on success. + May emit a `StakeSwapped` event on success. ### `swapStakeLimit(hotkey: AccountId, origin_netuid: NetUid, destination_netuid: NetUid, alpha_amount: AlphaBalance, limit_price: TaoBalance, allow_partial: bool)` - **interface**: `api.tx.subtensorModule.swapStakeLimit` - **summary**: Swaps a specified amount of stake from one subnet to another, while keeping the same coldkey and hotkey. - **Arguments:** - - - `origin` — The origin of the transaction, which must be signed by the coldkey that owns the `hotkey`. - - `hotkey` — The hotkey whose stake is being swapped. - - `origin_netuid` — The network/subnet ID from which stake is removed. - - `destination_netuid` — The network/subnet ID to which stake is added. - - `alpha_amount` — The amount of stake to swap. - - `limit_price` — The limit price expressed in units of RAO per one Alpha. - - `allow_partial` — Allows partial execution of the amount. If set to false, this becomes fill or kill type or order. + **Arguments:** + - `origin` — The origin of the transaction, which must be signed by the coldkey that owns the `hotkey`. + - `hotkey` — The hotkey whose stake is being swapped. + - `origin_netuid` — The network/subnet ID from which stake is removed. + - `destination_netuid` — The network/subnet ID to which stake is added. + - `alpha_amount` — The amount of stake to swap. + - `limit_price` — The limit price expressed in units of RAO per one Alpha. + - `allow_partial` — Allows partial execution of the amount. If set to false, this becomes fill or kill type or order. - **Errors:** + **Errors:** - Returns an error if: - - The transaction is not signed by the correct coldkey (i.e., `coldkey_owns_hotkey` fails). - - Either `origin_netuid` or `destination_netuid` does not exist. - - The hotkey does not exist. - - There is insufficient stake on `(coldkey, hotkey, origin_netuid)`. - - The swap amount is below the minimum stake requirement. + Returns an error if: + - The transaction is not signed by the correct coldkey (i.e., `coldkey_owns_hotkey` fails). + - Either `origin_netuid` or `destination_netuid` does not exist. + - The hotkey does not exist. + - There is insufficient stake on `(coldkey, hotkey, origin_netuid)`. + - The swap amount is below the minimum stake requirement. - **Events:** + **Events:** - May emit a `StakeSwapped` event on success. + May emit a `StakeSwapped` event on success. ### `terminateLease(lease_id: LeaseId, hotkey: AccountId)` - **interface**: `api.tx.subtensorModule.terminateLease` - **summary**: Terminate a lease. - The beneficiary can terminate the lease after the end block has passed and get the subnet ownership. The subnet is transferred to the beneficiary and the lease is removed from storage. + The beneficiary can terminate the lease after the end block has passed and get the subnet ownership. The subnet is transferred to the beneficiary and the lease is removed from storage. - **The hotkey must be owned by the beneficiary coldkey.** + **The hotkey must be owned by the beneficiary coldkey.** - **Args:** - - - `origin` — (\::Origin): + **Args:** + - `origin` — (\::Origin): The signature of the caller's coldkey. - - `lease_id` (LeaseId): + - `lease_id` (LeaseId): The ID of the lease to terminate. - - `hotkey` (T::AccountId): + - `hotkey` (T::AccountId): The hotkey of the beneficiary to mark as subnet owner hotkey. ### `transferStake(destination_coldkey: AccountId, hotkey: AccountId, origin_netuid: NetUid, destination_netuid: NetUid, alpha_amount: AlphaBalance)` @@ -2924,72 +2750,67 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.transferStake` - **summary**: Transfers a specified amount of stake from one coldkey to another, optionally across subnets, while keeping the same hotkey. - **Arguments:** - - - `origin` — The origin of the transaction, which must be signed by the `origin_coldkey`. - - `destination_coldkey` — The coldkey to which the stake is transferred. - - `hotkey` — The hotkey associated with the stake. - - `origin_netuid` — The network/subnet ID to move stake from. - - `destination_netuid` — The network/subnet ID to move stake to (for cross-subnet transfer). - - `alpha_amount` — The amount of stake to transfer. + **Arguments:** + - `origin` — The origin of the transaction, which must be signed by the `origin_coldkey`. + - `destination_coldkey` — The coldkey to which the stake is transferred. + - `hotkey` — The hotkey associated with the stake. + - `origin_netuid` — The network/subnet ID to move stake from. + - `destination_netuid` — The network/subnet ID to move stake to (for cross-subnet transfer). + - `alpha_amount` — The amount of stake to transfer. - **Errors:** + **Errors:** - Returns an error if: - - The origin is not signed by the correct coldkey. - - Either subnet does not exist. - - The hotkey does not exist. - - There is insufficient stake on `(origin_coldkey, hotkey, origin_netuid)`. - - The transfer amount is below the minimum stake requirement. + Returns an error if: + - The origin is not signed by the correct coldkey. + - Either subnet does not exist. + - The hotkey does not exist. + - There is insufficient stake on `(origin_coldkey, hotkey, origin_netuid)`. + - The transfer amount is below the minimum stake requirement. - **Events:** + **Events:** - May emit a `StakeTransferred` event on success. + May emit a `StakeTransferred` event on success. ### `tryAssociateHotkey(hotkey: AccountId)` - **interface**: `api.tx.subtensorModule.tryAssociateHotkey` - **summary**: Attempts to associate a hotkey with a coldkey. - **Arguments:** - - - `origin` — The origin of the transaction, which must be signed by the coldkey that owns the `hotkey`. - - `hotkey` — The hotkey to associate with the coldkey. + **Arguments:** + - `origin` — The origin of the transaction, which must be signed by the coldkey that owns the `hotkey`. + - `hotkey` — The hotkey to associate with the coldkey. - **Note:** + **Note:** - Will charge based on the weight even if the hotkey is already associated with a coldkey. + Will charge based on the weight even if the hotkey is already associated with a coldkey. ### `unstakeAll(hotkey: AccountId)` - **interface**: `api.tx.subtensorModule.unstakeAll` - **summary**: - The implementation for the extrinsic unstake_all: Removes all stake from a hotkey account across all subnets and adds it onto a coldkey. - **Args:** - - - `origin` — (\::Origin): + **Args:** + - `origin` — (\::Origin): The signature of the caller's coldkey. - - `hotkey` (T::AccountId): + - `hotkey` (T::AccountId): The associated hotkey account. - **Event:** - - - StakeRemoved; + **Event:** + - StakeRemoved; On the successfully removing stake from the hotkey account. - **Raises:** - - - `NotRegistered`: + **Raises:** + - `NotRegistered`: Thrown if the account we are attempting to unstake from is non existent. - - `NonAssociatedColdKey`: + - `NonAssociatedColdKey`: Thrown if the coldkey does not own the hotkey we are unstaking from. - - `NotEnoughStakeToWithdraw`: + - `NotEnoughStakeToWithdraw`: Thrown if there is not enough stake on the hotkey to withdraw this amount. - - `TxRateLimitExceeded`: + - `TxRateLimitExceeded`: Thrown if key has hit transaction rate limit ### `unstakeAllAlpha(hotkey: AccountId)` @@ -2997,31 +2818,28 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.unstakeAllAlpha` - **summary**: - The implementation for the extrinsic unstake_all: Removes all stake from a hotkey account across all subnets and adds it onto a coldkey. - **Args:** - - - `origin` — (\::Origin): + **Args:** + - `origin` — (\::Origin): The signature of the caller's coldkey. - - `hotkey` (T::AccountId): + - `hotkey` (T::AccountId): The associated hotkey account. - **Event:** - - - StakeRemoved; + **Event:** + - StakeRemoved; On the successfully removing stake from the hotkey account. - **Raises:** - - - `NotRegistered`: + **Raises:** + - `NotRegistered`: Thrown if the account we are attempting to unstake from is non existent. - - `NonAssociatedColdKey`: + - `NonAssociatedColdKey`: Thrown if the coldkey does not own the hotkey we are unstaking from. - - `NotEnoughStakeToWithdraw`: + - `NotEnoughStakeToWithdraw`: Thrown if there is not enough stake on the hotkey to withdraw this amount. - - `TxRateLimitExceeded`: + - `TxRateLimitExceeded`: Thrown if key has hit transaction rate limit ### `updateSymbol(netuid: NetUid, symbol: Vec)` @@ -3029,23 +2847,21 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.subtensorModule.updateSymbol` - **summary**: Updates the symbol for a subnet. - **Arguments:** - - - `origin` — The origin of the call, which must be the subnet owner or root. - - `netuid` — The unique identifier of the subnet on which the symbol is being set. - - `symbol` — The symbol to set for the subnet. + **Arguments:** + - `origin` — The origin of the call, which must be the subnet owner or root. + - `netuid` — The unique identifier of the subnet on which the symbol is being set. + - `symbol` — The symbol to set for the subnet. - **Errors:** + **Errors:** - Returns an error if: - - The transaction is not signed by the subnet owner. - - The symbol does not exist. - - The symbol is already in use by another subnet. + Returns an error if: + - The transaction is not signed by the subnet owner. + - The symbol does not exist. + - The symbol is already in use by another subnet. - **Events:** - - Emits a `SymbolUpdated` event on success. + **Events:** + Emits a `SymbolUpdated` event on success. ## `sudo` @@ -3054,7 +2870,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.sudo.removeKey` - **summary**: Permanently removes the sudo key. - **This cannot be un-done.** + **This cannot be un-done.** ### `setKey(new: MultiAddress)` @@ -3071,15 +2887,14 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.sudo.sudoAs` - **summary**: Authenticates the sudo key and dispatches a function call with `Signed` origin from a given account. - The dispatch origin for this call must be _Signed_. + The dispatch origin for this call must be _Signed_. ### `sudoUncheckedWeight(call: Box, weight: Weight)` - **interface**: `api.tx.sudo.sudoUncheckedWeight` - **summary**: Authenticates the sudo key and dispatches a function call with `Root` origin. This function does not check the weight of the call, and instead allows the Sudo user to specify the weight of the call. - The dispatch origin for this call must be _Signed_. - + The dispatch origin for this call must be _Signed_. ## `swap` @@ -3088,64 +2903,60 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.swap.addLiquidity` - **summary**: Add liquidity to a specific price range for a subnet. - **Parameters:** - - - origin: The origin of the transaction - - netuid: Subnet ID - - tick_low: Lower bound of the price range - - tick_high: Upper bound of the price range - - liquidity: Amount of liquidity to add + **Parameters:** + - origin: The origin of the transaction + - netuid: Subnet ID + - tick_low: Lower bound of the price range + - tick_high: Upper bound of the price range + - liquidity: Amount of liquidity to add - Emits `Event::LiquidityAdded` on success + Emits `Event::LiquidityAdded` on success ### `disableLp()` - **interface**: `api.tx.swap.disableLp` - **summary**: Disable user liquidity in all subnets. - Emits `Event::UserLiquidityToggled` on success + Emits `Event::UserLiquidityToggled` on success ### `modifyPosition(hotkey: AccountId, netuid: NetUid, position_id: PositionId, liquidity_delta: i64)` - **interface**: `api.tx.swap.modifyPosition` - **summary**: Modify a liquidity position. - **Parameters:** + **Parameters:** + - origin: The origin of the transaction + - netuid: Subnet ID + - position_id: ID of the position to remove + - liquidity_delta: Liquidity to add (if positive) or remove (if negative) - - origin: The origin of the transaction - - netuid: Subnet ID - - position_id: ID of the position to remove - - liquidity_delta: Liquidity to add (if positive) or remove (if negative) - - Emits `Event::LiquidityRemoved` on success + Emits `Event::LiquidityRemoved` on success ### `removeLiquidity(hotkey: AccountId, netuid: NetUid, position_id: PositionId)` - **interface**: `api.tx.swap.removeLiquidity` - **summary**: Remove liquidity from a specific position. - **Parameters:** - - - origin: The origin of the transaction - - netuid: Subnet ID - - position_id: ID of the position to remove + **Parameters:** + - origin: The origin of the transaction + - netuid: Subnet ID + - position_id: ID of the position to remove - Emits `Event::LiquidityRemoved` on success + Emits `Event::LiquidityRemoved` on success ### `setFeeRate(netuid: NetUid, rate: u16)` - **interface**: `api.tx.swap.setFeeRate` - **summary**: Set the fee rate for swaps on a specific subnet (normalized value). For example, 0.3% is approximately 196. - Only callable by the admin origin + Only callable by the admin origin ### `toggleUserLiquidity(netuid: NetUid, enable: bool)` - **interface**: `api.tx.swap.toggleUserLiquidity` - **summary**: Enable user liquidity operations for a specific subnet. This switches the subnet from V2 to V3 swap mode. Thereafter, adding new user liquidity can be disabled by toggling this flag to false, but the swap mode will remain V3 because of existing user liquidity until all users withdraw their liquidity. - Only sudo or subnet owner can enable user liquidity. Only sudo can disable user liquidity. - + Only sudo or subnet owner can enable user liquidity. Only sudo can disable user liquidity. ## `system` @@ -3154,35 +2965,35 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.system.applyAuthorizedUpgrade` - **summary**: Provide the preimage (runtime binary) `code` for an upgrade that has been authorized. - If the authorization required a version check, this call will ensure the spec name remains unchanged and that the spec version has increased. + If the authorization required a version check, this call will ensure the spec name remains unchanged and that the spec version has increased. - Depending on the runtime's `OnSetCode` configuration, this function may directly apply the new `code` in the same block or attempt to schedule the upgrade. + Depending on the runtime's `OnSetCode` configuration, this function may directly apply the new `code` in the same block or attempt to schedule the upgrade. - All origins are allowed. + All origins are allowed. ### `authorizeUpgrade(code_hash: H256)` - **interface**: `api.tx.system.authorizeUpgrade` - **summary**: Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied later. - This call requires Root origin. + This call requires Root origin. ### `authorizeUpgradeWithoutChecks(code_hash: H256)` - **interface**: `api.tx.system.authorizeUpgradeWithoutChecks` - **summary**: Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied later. - WARNING: This authorizes an upgrade that will take place without any safety checks, for example that the spec name remains the same and that the version number increases. Not recommended for normal use. Use `authorize_upgrade` instead. + WARNING: This authorizes an upgrade that will take place without any safety checks, for example that the spec name remains the same and that the version number increases. Not recommended for normal use. Use `authorize_upgrade` instead. - This call requires Root origin. + This call requires Root origin. ### `killPrefix(prefix: Key, subkeys: u32)` - **interface**: `api.tx.system.killPrefix` - **summary**: Kill all storage items with a key that starts with the given prefix. - **NOTE:** We rely on the Root origin to provide us the number of subkeys under - the prefix we are removing to accurately calculate the weight of this function. + **NOTE:** We rely on the Root origin to provide us the number of subkeys under + the prefix we are removing to accurately calculate the weight of this function. ### `killStorage(keys: Vec)` @@ -3194,7 +3005,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.system.remark` - **summary**: Make some on-chain remark. - Can be executed by every `origin`. + Can be executed by every `origin`. ### `remarkWithEvent(remark: Vec)` @@ -3211,7 +3022,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.system.setCodeWithoutChecks` - **summary**: Set the new runtime code without doing any checks of the given `code`. - Note that runtime upgrades will not run if this is called with a not-increasing spec version! + Note that runtime upgrades will not run if this is called with a not-increasing spec version! ### `setHeapPages(pages: u64)` @@ -3223,7 +3034,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.system.setStorage` - **summary**: Set some items of storage. - ## `timestamp` ### `set(now: u64)` @@ -3231,21 +3041,19 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.timestamp.set` - **summary**: Set the current time. - This call should be invoked exactly once per block. It will panic at the finalization phase, if this call hasn't been invoked by that time. - - The timestamp should be greater than the previous one by the amount specified by [`Config::MinimumPeriod`]. + This call should be invoked exactly once per block. It will panic at the finalization phase, if this call hasn't been invoked by that time. - The dispatch origin for this call must be _None_. + The timestamp should be greater than the previous one by the amount specified by [`Config::MinimumPeriod`]. - This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware that changing the complexity of this call could result exhausting the resources in a block to execute any other calls. + The dispatch origin for this call must be _None_. - **Complexity:** + This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware that changing the complexity of this call could result exhausting the resources in a block to execute any other calls. - - ``O(1)`` (Note that implementations of `OnTimestampSet` must also be ``O(1)``) - - 1 storage read and 1 storage mutation (codec ``O(1)`` because of `DidUpdate::take` in + **Complexity:** + - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) + - 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in `on_finalize`) - - 1 event handler `on_timestamp_set`. Must be ``O(1)``. - + - 1 event handler `on_timestamp_set`. Must be `O(1)`. ## `utility` @@ -3254,106 +3062,96 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.utility.asDerivative` - **summary**: Send a call through an indexed pseudonym of the sender. - Filter from origin are passed along. The call will be dispatched with an origin which use the same filter as the origin of this call. + Filter from origin are passed along. The call will be dispatched with an origin which use the same filter as the origin of this call. - NOTE: If you need to ensure that any account-based filtering is not honored (i.e. because you expect `proxy` to have been used prior in the call stack and you do not want the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` in the Multisig pallet instead. + NOTE: If you need to ensure that any account-based filtering is not honored (i.e. because you expect `proxy` to have been used prior in the call stack and you do not want the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` in the Multisig pallet instead. - NOTE: Prior to version *12, this was called `as_limited_sub`. + NOTE: Prior to version \*12, this was called `as_limited_sub`. - The dispatch origin for this call must be _Signed_. + The dispatch origin for this call must be _Signed_. ### `batch(calls: Vec)` - **interface**: `api.tx.utility.batch` - **summary**: Send a batch of dispatch calls. - May be called from any origin except `None`. - - - `calls`: The calls to be dispatched from the same origin. The number of call must not + May be called from any origin except `None`. + - `calls`: The calls to be dispatched from the same origin. The number of call must not exceed the constant: `batched_calls_limit` (available in constant metadata). - If origin is root then the calls are dispatched without checking origin filter. (This includes bypassing `frame_system::Config::BaseCallFilter`). + If origin is root then the calls are dispatched without checking origin filter. (This includes bypassing `frame_system::Config::BaseCallFilter`). - **Complexity:** + **Complexity:** + - `O(C)` where C is the number of calls to be batched. - - `O(C)` where C is the number of calls to be batched. - - This will return `Ok` in all circumstances. To determine the success of the batch, an event is deposited. If a call failed and the batch was interrupted, then the `BatchInterrupted` event is deposited, along with the number of successful calls made and the error of the failed call. If all were successful, then the `BatchCompleted` event is deposited. + This will return `Ok` in all circumstances. To determine the success of the batch, an event is deposited. If a call failed and the batch was interrupted, then the `BatchInterrupted` event is deposited, along with the number of successful calls made and the error of the failed call. If all were successful, then the `BatchCompleted` event is deposited. ### `batchAll(calls: Vec)` - **interface**: `api.tx.utility.batchAll` - **summary**: Send a batch of dispatch calls and atomically execute them. The whole transaction will rollback and fail if any of the calls failed. - May be called from any origin except `None`. - - - `calls`: The calls to be dispatched from the same origin. The number of call must not + May be called from any origin except `None`. + - `calls`: The calls to be dispatched from the same origin. The number of call must not exceed the constant: `batched_calls_limit` (available in constant metadata). - If origin is root then the calls are dispatched without checking origin filter. (This includes bypassing `frame_system::Config::BaseCallFilter`). - - **Complexity:** + If origin is root then the calls are dispatched without checking origin filter. (This includes bypassing `frame_system::Config::BaseCallFilter`). - - `O(C)` where C is the number of calls to be batched. + **Complexity:** + - `O(C)` where C is the number of calls to be batched. ### `dispatchAs(as_origin: Box, call: Box)` - **interface**: `api.tx.utility.dispatchAs` - **summary**: Dispatches a function call with a provided origin. - The dispatch origin for this call must be _Root_. + The dispatch origin for this call must be _Root_. - **Complexity:** - - - `O(1)`. + **Complexity:** + - `O(1)`. ### `dispatchAsFallible(as_origin: Box, call: Box)` - **interface**: `api.tx.utility.dispatchAsFallible` - **summary**: Dispatches a function call with a provided origin. - Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call. + Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call. - The dispatch origin for this call must be _Root_. + The dispatch origin for this call must be _Root_. ### `forceBatch(calls: Vec)` - **interface**: `api.tx.utility.forceBatch` - **summary**: Send a batch of dispatch calls. Unlike `batch`, it allows errors and won't interrupt. - May be called from any origin except `None`. - - - `calls`: The calls to be dispatched from the same origin. The number of call must not + May be called from any origin except `None`. + - `calls`: The calls to be dispatched from the same origin. The number of call must not exceed the constant: `batched_calls_limit` (available in constant metadata). - If origin is root then the calls are dispatch without checking origin filter. (This includes bypassing `frame_system::Config::BaseCallFilter`). - - **Complexity:** + If origin is root then the calls are dispatch without checking origin filter. (This includes bypassing `frame_system::Config::BaseCallFilter`). - - `O(C)` where C is the number of calls to be batched. + **Complexity:** + - `O(C)` where C is the number of calls to be batched. ### `ifElse(main: Box, fallback: Box)` - **interface**: `api.tx.utility.ifElse` - **summary**: Dispatch a fallback call in the event the main call fails to execute. May be called from any origin except `None`. - This function first attempts to dispatch the `main` call. If the `main` call fails, the `fallback` is attemted. if the fallback is successfully dispatched, the weights of both calls are accumulated and an event containing the main call error is deposited. + This function first attempts to dispatch the `main` call. If the `main` call fails, the `fallback` is attemted. if the fallback is successfully dispatched, the weights of both calls are accumulated and an event containing the main call error is deposited. - In the event of a fallback failure the whole call fails with the weights returned. + In the event of a fallback failure the whole call fails with the weights returned. + - `main`: The main call to be dispatched. This is the primary action to execute. + - `fallback`: The fallback call to be dispatched in case the `main` call fails. - - `main`: The main call to be dispatched. This is the primary action to execute. - - `fallback`: The fallback call to be dispatched in case the `main` call fails. - - **Dispatch Logic:** - - - If the origin is `root`, both the main and fallback calls are executed without + **Dispatch Logic:** + - If the origin is `root`, both the main and fallback calls are executed without applying any origin filters. - - If the origin is not `root`, the origin filter is applied to both the `main` and + - If the origin is not `root`, the origin filter is applied to both the `main` and `fallback` calls. - **Use Case:** - - - Some use cases might involve submitting a `batch` type call in either main, fallback + **Use Case:** + - Some use cases might involve submitting a `batch` type call in either main, fallback or both. ### `withWeight(call: Box, weight: Weight)` @@ -3361,6 +3159,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.tx.utility.withWeight` - **summary**: Dispatch a function call with a specified weight. - This function does not check the weight of the call, and instead allows the Root origin to specify the weight of the call. + This function does not check the weight of the call, and instead allows the Root origin to specify the weight of the call. - The dispatch origin for this call must be _Root_. + The dispatch origin for this call must be _Root_. diff --git a/docs/subtensor-api/rpc.md b/docs/subtensor-api/rpc.md index 14685631..3d701d6b 100644 --- a/docs/subtensor-api/rpc.md +++ b/docs/subtensor-api/rpc.md @@ -1,6 +1,11 @@ +--- +title: RPC +description: "This page shows JSON-RPC methods available on the Subtensor node." +--- + # RPC -This page shows JSON-RPC methods available on a Bittensor (Subtensor) node. Accessible via `api.rpc..`. +This page shows JSON-RPC methods available on the Subtensor node. Accessible via `api.rpc..`. :::info Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Connected to: `wss://entrypoint-finney.opentensor.ai:443` @@ -66,7 +71,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.rpc.author.submitExtrinsic` - **summary**: Submit a fully formatted extrinsic for block inclusion - ## `chain` ### `getBlock(hash?: BlockHash)`: `SignedBlock` @@ -107,7 +111,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **jsonrpc**: subscription - **summary**: Retrieves the best header via subscription - ## `childstate` ### `getKeys(childKey: PrefixedStorageKey, prefix: StorageKey, at?: Hash)`: `Vec` @@ -140,7 +143,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.rpc.childstate.getStorageSize` - **summary**: Returns the size of a child storage entry at a block state - ## `eth` ### `accounts()`: `Vec` @@ -354,7 +356,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.rpc.eth.uninstallFilter` - **summary**: Uninstalls filter. - ## `net` ### `listening()`: `bool` @@ -372,7 +373,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.rpc.net.version` - **summary**: Returns protocol version. - ## `offchain` ### `localStorageGet(kind: StorageKind, key: Bytes)`: `Option` @@ -387,7 +387,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **unsafe**: this method is flagged as unsafe - **summary**: Set offchain local storage under given key and prefix - ## `payment` ### `queryFeeDetails(extrinsic: Bytes, at?: BlockHash)`: `FeeDetails` @@ -400,7 +399,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.rpc.payment.queryInfo` - **summary**: Retrieves the fee information for an encoded extrinsic - ## `rpc` ### `methods()`: `RpcMethods` @@ -408,7 +406,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.rpc.rpc.methods` - **summary**: Retrieves the list of RPC methods that are exposed by the node - ## `state` ### `call(method: Text, data: Bytes, at?: BlockHash)`: `Bytes` @@ -496,7 +493,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **unsafe**: this method is flagged as unsafe - **summary**: Provides a way to trace the re-execution of a single block - ## `system` ### `accountNextIndex(accountId: AccountId)`: `Index` @@ -601,7 +597,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.rpc.system.version` - **summary**: Retrieves the version of the node - ## `web3` ### `clientVersion()`: `Text` diff --git a/docs/subtensor-api/runtime.md b/docs/subtensor-api/runtime.md index d6404c82..508214f2 100644 --- a/docs/subtensor-api/runtime.md +++ b/docs/subtensor-api/runtime.md @@ -1,6 +1,11 @@ +--- +title: Runtime Calls +description: "This page includes runtime API calls exposed by the Subtensor runtime." +--- + # Runtime Calls -This page includes runtime API calls exposed by the Bittensor (Subtensor) runtime. Accessible via `api.call..`. +This page includes runtime API calls exposed by the Subtensor runtime. Accessible via `api.call..`. :::info Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Connected to: `wss://entrypoint-finney.opentensor.ai:443` @@ -28,7 +33,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.call.accountNonceApi.accountNonce` - ## `auraApi` ### `authorities()`: `Vec` @@ -39,7 +43,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.call.auraApi.slotDuration` - ## `babeApi` ### `configuration()`: `BabeGenesisConfiguration` @@ -66,7 +69,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.call.babeApi.submitReportEquivocationUnsignedExtrinsic` - ## `blockBuilder` ### `applyExtrinsic(extrinsic: Extrinsic)`: `ApplyExtrinsicResult` @@ -85,7 +87,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.call.blockBuilder.inherentExtrinsics` - ## `contractsApi` ### `call(origin: AccountId, dest: AccountId, value: Balance, gasLimit: Option, storageDepositLimit: Option, inputData: Vec)`: `ContractExecResult` @@ -104,14 +105,12 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.call.contractsApi.uploadCode` - ## `convertTransactionRuntimeApi` ### `convertTransaction(transaction: TransactionV2)`: `Extrinsic` - **interface**: `api.call.convertTransactionRuntimeApi.convertTransaction` - ## `core` ### `executeBlock(block: Block)`: `Null` @@ -126,7 +125,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.call.core.version` - ## `genesisBuilder` ### `buildConfig(json: Vec)`: `Result<(), GenesisBuildErr>` @@ -137,7 +135,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.call.genesisBuilder.createDefaultConfig` - ## `grandpaApi` ### `currentSetId()`: `SetId` @@ -156,7 +153,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.call.grandpaApi.submitReportEquivocationUnsignedExtrinsic` - ## `metadata` ### `metadata()`: `OpaqueMetadata` @@ -171,14 +167,12 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.call.metadata.metadataVersions` - ## `offchainWorkerApi` ### `offchainWorker(header: Header)`: `Null` - **interface**: `api.call.offchainWorkerApi.offchainWorker` - ## `sessionKeys` ### `decodeSessionKeys(encoded: Bytes)`: `Option>` @@ -189,14 +183,12 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.call.sessionKeys.generateSessionKeys` - ## `taggedTransactionQueue` ### `validateTransaction(source: TransactionSource, tx: Extrinsic, blockHash: BlockHash)`: `TransactionValidity` - **interface**: `api.call.taggedTransactionQueue.validateTransaction` - ## `transactionPaymentApi` ### `queryFeeDetails(uxt: Extrinsic, len: u32)`: `FeeDetails` @@ -215,7 +207,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.call.transactionPaymentApi.queryWeightToFee` - ## `transactionPaymentCallApi` ### `queryCallFeeDetails(call: Call, len: u32)`: `FeeDetails` diff --git a/docs/subtensor-api/storage.md b/docs/subtensor-api/storage.md index 0841c18e..043d35e5 100644 --- a/docs/subtensor-api/storage.md +++ b/docs/subtensor-api/storage.md @@ -1,6 +1,11 @@ +--- +title: Storage +description: "This page contains storage query definitions for the Subtensor runtime." +--- + # Storage -This page contains storage query definitions for the Bittensor (Subtensor) runtime. Accessible via `api.query..`. +This page contains storage query definitions for the Subtensor runtime. Accessible via `api.query..`. :::info Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Connected to: `wss://entrypoint-finney.opentensor.ai:443` @@ -47,7 +52,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.adminUtils.precompileEnable` - **summary**: Map PrecompileEnum --> enabled - ## `aura` ### `authorities`: `Vec` @@ -60,7 +64,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.aura.currentSlot` - **summary**: The current slot of this block. - This will be set in `on_initialize`. + This will be set in `on_initialize`. ### `palletVersion`: `u16` @@ -68,7 +72,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Required` - **summary**: Returns the current pallet version from storage - ## `balances` ### `account(AccountId32)`: `AccountData` @@ -76,17 +79,17 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.balances.account` - **summary**: The Balances pallet example of storing the balance of an account. - **Example:** + **Example:** - ```nocompile impl pallet_balances::Config for Runtime { type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData> } ``` + `nocompile impl pallet_balances::Config for Runtime { type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData> } ` - You can also store the balance of an account in the `System` pallet. + You can also store the balance of an account in the `System` pallet. - **Example:** + **Example:** - ```nocompile impl pallet_balances::Config for Runtime { type AccountStore = System } ``` + `nocompile impl pallet_balances::Config for Runtime { type AccountStore = System } ` - But this comes with tradeoffs, storing account balances in the system pallet stores `frame_system` data alongside the account data contrary to storing account balances in the `Balances` pallet, which uses a `StorageMap` to store balances data only. NOTE: This is only used in the case that this pallet is used to store balances. + But this comes with tradeoffs, storing account balances in the system pallet stores `frame_system` data alongside the account data contrary to storing account balances in the `Balances` pallet, which uses a `StorageMap` to store balances data only. NOTE: This is only used in the case that this pallet is used to store balances. ### `freezes(AccountId32)`: `Vec` @@ -108,7 +111,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.balances.locks` - **summary**: Any liquidity locks on some account balances. NOTE: Should only be accessed when setting, changing and freeing a lock. - Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` + Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` ### `palletVersion`: `u16` @@ -121,14 +124,13 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.balances.reserves` - **summary**: Named reserves on some account balances. - Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` + Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` ### `totalIssuance`: `u64` - **interface**: `api.query.balances.totalIssuance` - **summary**: The total units issued in the system. - ## `baseFee` ### `baseFeePerGas`: `U256` @@ -145,7 +147,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Required` - **summary**: Returns the current pallet version from storage - ## `commitments` ### `commitmentOf(u16, AccountId32)`: `Registration` @@ -190,7 +191,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: Maps (netuid, who) -> usage (how many “bytes” they've committed) in the RateLimit window - ## `contracts` ### `codeInfoOf(H256)`: `CodeInfo` @@ -205,7 +205,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: The code associated with a given account. - TWOX-NOTE: SAFE since `AccountId` is a secure hash. + TWOX-NOTE: SAFE since `AccountId` is a secure hash. ### `deletionQueue(u32)`: `Bytes` @@ -213,7 +213,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: Evicted contracts that await child trie deletion. - Child trie deletion is a heavy operation depending on the amount of storage items stored in said trie. Therefore this operation is performed lazily in `on_idle`. + Child trie deletion is a heavy operation depending on the amount of storage items stored in said trie. Therefore this operation is performed lazily in `on_idle`. ### `deletionQueueCounter`: `DeletionQueueManager` @@ -231,17 +231,16 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.contracts.nonce` - **summary**: This is a **monotonic** counter incremented on contract instantiation. - This is used in order to generate unique trie ids for contracts. The trie id of a new contract is calculated from hash(account_id, nonce). The nonce is required because otherwise the following sequence would lead to a possible collision of storage: - - 1. Create a new contract. - 2. Terminate the contract. - 3. Immediately recreate the contract with the same account_id. + This is used in order to generate unique trie ids for contracts. The trie id of a new contract is calculated from hash(account_id, nonce). The nonce is required because otherwise the following sequence would lead to a possible collision of storage: + 1. Create a new contract. + 2. Terminate the contract. + 3. Immediately recreate the contract with the same account_id. - This is bad because the contents of a trie are deleted lazily and there might be storage of the old instantiation still in it when the new contract is created. Please note that we can't replace the counter by the block number because the sequence above can happen in the same block. We also can't keep the account counter in memory only because storage is the only way to communicate across different extrinsics in the same block. + This is bad because the contents of a trie are deleted lazily and there might be storage of the old instantiation still in it when the new contract is created. Please note that we can't replace the counter by the block number because the sequence above can happen in the same block. We also can't keep the account counter in memory only because storage is the only way to communicate across different extrinsics in the same block. - **Note:** + **Note:** - Do not use it to determine the number of contracts. It won't be decremented if a contract is destroyed. + Do not use it to determine the number of contracts. It won't be decremented if a contract is destroyed. ### `palletVersion`: `u16` @@ -255,7 +254,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: A mapping from a contract's code hash to its code. - ## `crowdloan` ### `contributions(u32, AccountId32)`: `u64` @@ -292,7 +290,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Required` - **summary**: Returns the current pallet version from storage - ## `drand` ### `beaconConfig`: `BeaconConfiguration` @@ -314,7 +311,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.drand.nextUnsignedAt` - **summary**: Defines the block when next unsigned transaction will be accepted. - To prevent spam of unsigned (and unpaid!) transactions on the network, we only allow one transaction per block. This storage entry defines when new transaction is going to be accepted. + To prevent spam of unsigned (and unpaid!) transactions on the network, we only allow one transaction per block. This storage entry defines when new transaction is going to be accepted. ### `oldestStoredRound`: `u64` @@ -333,7 +330,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: map round number to pulse - ## `ethereum` ### `blockHash(U256)`: `H256` @@ -375,7 +371,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: Mapping from transaction index to transaction in the current building block. - ## `evm` ### `accountCodes(H160)`: `Bytes` @@ -405,7 +400,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.evm.whitelistedCreators` - ## `evmChainId` ### `chainId`: `u64` @@ -419,7 +413,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Required` - **summary**: Returns the current pallet version from storage - ## `grandpa` ### `authorities`: `Vec<(SpConsensusGrandpaAppPublic,u64)>` @@ -454,11 +447,11 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.grandpa.setIdSession` - **modifier**: `Optional` -- **summary**: A mapping from grandpa set ID to the index of the *most recent* session for which its members were responsible. +- **summary**: A mapping from grandpa set ID to the index of the _most recent_ session for which its members were responsible. - This is only used for validating equivocation proofs. An equivocation proof must contains a key-ownership proof for a given session, therefore we need a way to tie together sessions and GRANDPA set ids, i.e. we need to validate that a validator was the owner of a given key on a given session, and what the active set ID was during that session. + This is only used for validating equivocation proofs. An equivocation proof must contains a key-ownership proof for a given session, therefore we need a way to tie together sessions and GRANDPA set ids, i.e. we need to validate that a validator was the owner of a given key on a given session, and what the active set ID was during that session. - TWOX-NOTE: `SetId` is not under user control. + TWOX-NOTE: `SetId` is not under user control. ### `stalled`: `(u32,u32)` @@ -471,7 +464,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.grandpa.state` - **summary**: State of the current authority set. - ## `mevShield` ### `authorKeys(Public)`: `Bytes` @@ -557,7 +549,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: Block number at which `PendingKey` is no longer valid (exclusive upper bound). Updated every block during rotation. - ## `multisig` ### `multisigs(AccountId32, [u8;32])`: `Multisig` @@ -572,7 +563,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Required` - **summary**: Returns the current pallet version from storage - ## `preimage` ### `palletVersion`: `u16` @@ -598,7 +588,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: The request status of a given hash. - ## `proxy` ### `announcements(AccountId32)`: `(Vec,u64)` @@ -629,7 +618,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: Tracks which (real, delegate) pairs have opted in to the real account paying transaction fees for proxy calls made by the delegate. Existence of an entry means the real account pays; absence means the delegate pays (default). - ## `randomnessCollectiveFlip` ### `palletVersion`: `u16` @@ -643,7 +631,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.randomnessCollectiveFlip.randomMaterial` - **summary**: Series of block headers from the last 81 blocks that acts as random seed material. This is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of the oldest hash. - ## `registry` ### `identityOf(AccountId32)`: `Registration` @@ -658,7 +645,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Required` - **summary**: Returns the current pallet version from storage - ## `safeMode` ### `deposits(AccountId32, u32)`: `u64` @@ -667,7 +653,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: Holds the reserve that was taken from an account at a specific block number. - This helps governance to have an overview of outstanding deposits that should be returned or slashed. + This helps governance to have an overview of outstanding deposits that should be returned or slashed. ### `enteredUntil`: `u32` @@ -675,9 +661,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: Contains the last block number that the safe-mode will remain entered in. - Set to `None` when safe-mode is exited. + Set to `None` when safe-mode is exited. - Safe-mode is automatically exited when the current block number exceeds this value. + Safe-mode is automatically exited when the current block number exceeds this value. ### `palletVersion`: `u16` @@ -685,7 +671,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Required` - **summary**: Returns the current pallet version from storage - ## `scheduler` ### `agenda(u32)`: `Vec>` @@ -705,7 +690,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: Lookup from a name to the block number and index of the task. - For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4 identities. + For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4 identities. ### `palletVersion`: `u16` @@ -719,7 +704,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: Retry configurations for items to be executed, indexed by task address. - ## `substrate` ### `changesTrieConfig`: `u32` @@ -758,7 +742,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Required` - **summary**: Current intra-block entropy (a universally unique `[u8; 32]` value) is stored here. - ## `subtensorModule` ### `accumulatedLeaseDividends(u32)`: `u64` @@ -837,7 +820,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.subtensorModule.autoParentDelegationEnabled` - **summary**: MAP ( hotkey ) --> parent_delegation_enabled - When `true`, this root validator allows auto parent delegation. Defaults to `true`; validators can opt out at any time by calling `set_auto_parent_delegation_enabled(false)`. + When `true`, this root validator allows auto parent delegation. Defaults to `true`; validators can opt out at any time by calling `set_auto_parent_delegation_enabled(false)`. ### `autoStakeDestination(AccountId32, u16)`: `AccountId32` @@ -1068,7 +1051,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne ### `lastAdjustmentBlock(u16)`: `u64` - **interface**: `api.query.subtensorModule.lastAdjustmentBlock` -- **summary**: MAP ( netuid ) --> Block at last adjustment. +- **summary**: MAP ( netuid ) --> Block at last adjustment. ### `lastColdkeyHotkeyStakeBlock(AccountId32, AccountId32)`: `u64` @@ -1383,7 +1366,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.subtensorModule.registeredSubnetCounter` - **summary**: MAP ( netuid ) --> registered_subnet_counter - Monotonic counter incremented on every successful `do_register_network` for a given netuid. Consumers that persist per-netuid state keyed by `(user, netuid)` (e.g. the staking precompile `AllowancesStorage`) can mix the current counter value into their storage key so that entries written under a previous registration of the same netuid become unreachable after the netuid is re-registered, without requiring unbounded storage iteration on deregistration. + Monotonic counter incremented on every successful `do_register_network` for a given netuid. Consumers that persist per-netuid state keyed by `(user, netuid)` (e.g. the staking precompile `AllowancesStorage`) can mix the current counter value into their storage key so that entries written under a previous registration of the same netuid become unreachable after the netuid is re-registered, without requiring unbounded storage iteration on deregistration. ### `registrationsThisBlock(u16)`: `u16` @@ -1449,7 +1432,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne ### `stakeWeight(u16)`: `Vec` - **interface**: `api.query.subtensorModule.stakeWeight` -- **summary**: ======================================= ==== Subnetwork Consensus Storage ==== ======================================= --- DMAP ( netuid ) --> stake_weight | weight for stake used in YC. +- **summary**: ======================================= ==== Subnetwork Consensus Storage ==== ======================================= --- DMAP ( netuid ) --> stake_weight | weight for stake used in YC. ### `stakingColdkeys(AccountId32)`: `u64` @@ -1484,7 +1467,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne ### `subnetAlphaInEmission(u16)`: `u64` - **interface**: `api.query.subtensorModule.subnetAlphaInEmission` -- **summary**: MAP ( netuid ) --> alpha_in_emission | Returns the amount of alph in emission into the pool per block. +- **summary**: MAP ( netuid ) --> alpha_in_emission | Returns the amount of alph in emission into the pool per block. ### `subnetAlphaInProvided(u16)`: `u64` @@ -1529,9 +1512,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.subtensorModule.subnetLimit` - **summary**: ========================== ==== Staking Counters ==== ========================== The Subtensor [`TotalIssuance`] represents the total issuance of tokens on the Bittensor network. - It is comprised of three parts: The total amount of issued tokens, tracked in the TotalIssuance of the Balances pallet The total amount of tokens staked in the system, tracked in [`TotalStake`] The total amount of tokens locked up for subnet reg, tracked in [`TotalSubnetLocked`] attained by iterating over subnet lock. + It is comprised of three parts: The total amount of issued tokens, tracked in the TotalIssuance of the Balances pallet The total amount of tokens staked in the system, tracked in [`TotalStake`] The total amount of tokens locked up for subnet reg, tracked in [`TotalSubnetLocked`] attained by iterating over subnet lock. - Eventually, Bittensor should migrate to using Holds afterwhich time we will not require this separate accounting. --- ITEM ( maximum_number_of_networks ) + Eventually, Bittensor should migrate to using Holds afterwhich time we will not require this separate accounting. --- ITEM ( maximum_number_of_networks ) ### `subnetLocked(u16)`: `u64` @@ -1619,9 +1602,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.subtensorModule.taoWeight` - **summary**: ============================ ==== Staking Variables ==== ============================ The Subtensor [`TotalIssuance`] represents the total issuance of tokens on the Bittensor network. - It is comprised of three parts: The total amount of issued tokens, tracked in the TotalIssuance of the Balances pallet The total amount of tokens staked in the system, tracked in [`TotalStake`] The total amount of tokens locked up for subnet reg, tracked in [`TotalSubnetLocked`] attained by iterating over subnet lock. + It is comprised of three parts: The total amount of issued tokens, tracked in the TotalIssuance of the Balances pallet The total amount of tokens staked in the system, tracked in [`TotalStake`] The total amount of tokens locked up for subnet reg, tracked in [`TotalSubnetLocked`] attained by iterating over subnet lock. - Eventually, Bittensor should migrate to using Holds afterwhich time we will not require this separate accounting. --- ITEM --> Global weight + Eventually, Bittensor should migrate to using Holds afterwhich time we will not require this separate accounting. --- ITEM --> Global weight ### `targetRegistrationsPerInterval(u16)`: `u16` @@ -1780,7 +1763,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.subtensorModule.yuma3On` - **summary**: MAP ( netuid ) --> Whether or not Yuma3 is enabled - ## `sudo` ### `key`: `AccountId32` @@ -1795,7 +1777,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Required` - **summary**: Returns the current pallet version from storage - ## `swap` ### `alphaSqrtPrice(u16)`: `FixedU128` @@ -1874,7 +1855,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Optional` - **summary**: Storage for all ticks, using subnet ID as the primary key and tick index as the secondary key - ## `system` ### `account(AccountId32)`: `AccountInfo` @@ -1919,18 +1899,18 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.system.events` - **summary**: Events deposited for the current block. - NOTE: The item is unbound and should therefore never be read on chain. It could otherwise inflate the PoV size of a block. + NOTE: The item is unbound and should therefore never be read on chain. It could otherwise inflate the PoV size of a block. - Events have a large in-memory size. Box the events to not go out-of-memory just in case someone still reads them from within the runtime. + Events have a large in-memory size. Box the events to not go out-of-memory just in case someone still reads them from within the runtime. ### `eventTopics(H256)`: `Vec<(u32,u32)>` - **interface**: `api.query.system.eventTopics` - **summary**: Mapping between a topic (represented by T::Hash) and a vector of indexes of events in the `>` list. - All topic vectors have deterministic storage locations depending on the topic. This allows light-clients to leverage the changes trie storage tracking mechanism and in case of changes fetch the list of events of interest. + All topic vectors have deterministic storage locations depending on the topic. This allows light-clients to leverage the changes trie storage tracking mechanism and in case of changes fetch the list of events of interest. - The value has the type `(BlockNumberFor, EventIndex)` because if we used only just the `EventIndex` then in case if the topic has the same contents on the next block no notification will be triggered thus the event might be lost. + The value has the type `(BlockNumberFor, EventIndex)` because if we used only just the `EventIndex` then in case if the topic has the same contents on the next block no notification will be triggered thus the event might be lost. ### `executionPhase`: `Phase` @@ -1954,9 +1934,9 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.system.extrinsicWeightReclaimed` - **summary**: The weight reclaimed for the extrinsic. - This information is available until the end of the extrinsic execution. More precisely this information is removed in `note_applied_extrinsic`. + This information is available until the end of the extrinsic execution. More precisely this information is removed in `note_applied_extrinsic`. - Logic doing some post dispatch weight reduction must update this storage to avoid duplicate reduction. + Logic doing some post dispatch weight reduction must update this storage to avoid duplicate reduction. ### `inherentsApplied`: `bool` @@ -1995,7 +1975,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.system.upgradedToU32RefCount` - **summary**: True if we have upgraded so that `type RefCount` is `u32`. False (default) if not. - ## `timestamp` ### `didUpdate`: `bool` @@ -2003,7 +1982,7 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **interface**: `api.query.timestamp.didUpdate` - **summary**: Whether the timestamp has been updated in this block. - This value is updated to `true` upon successful submission of a timestamp by a node. It is then checked at the end of each block execution in the `on_finalize` hook. + This value is updated to `true` upon successful submission of a timestamp by a node. It is then checked at the end of each block execution in the `on_finalize` hook. ### `now`: `u64` @@ -2016,7 +1995,6 @@ Generated from a live snapshot of the Subtensor runtime on **2026-04-24**. Conne - **modifier**: `Required` - **summary**: Returns the current pallet version from storage - ## `transactionPayment` ### `nextFeeMultiplier`: `FixedU128` diff --git a/docs/subtensor-nodes/index.md b/docs/subtensor-nodes/index.md index c39ff251..7f4ae270 100644 --- a/docs/subtensor-nodes/index.md +++ b/docs/subtensor-nodes/index.md @@ -4,7 +4,7 @@ title: "Subtensor Node Basics" import ThemedImage from '@theme/ThemedImage'; import useBaseUrl from '@docusaurus/useBaseUrl'; -import { SdkVersion } from "../sdk/_sdk-version.mdx"; +import { SdkVersion } from "../sdk/\_sdk-version.mdx"; # Subtensor Node Basics @@ -30,49 +30,51 @@ style={{width: 550}} ## Lite node vs archive node -A public subtensor node refers to an internet-connected computer that is synchronized with the Bittensor blockchain database. A **lite node** or an **archive node** is a type of public subtensor node. +A public subtensor node refers to an internet-connected computer that is synchronized with the Bittensor blockchain database. A **lite node** or an **archive node** is a type of public subtensor node. :::tip a subtensor node is not a neuron -A subtensor node is different from a Bittensor neuron. A Bittensor neuron is either a subnet validator node or a subnet miner node—it exists in a subnet, and it does not contain blockchain database. +A subtensor node is different from a Bittensor neuron. A Bittensor neuron is either a subnet validator node or a subnet miner node—it exists in a subnet, and it does not contain blockchain database. ::: Normally, a node in Bittensor blockchain must always be synchronized to the latest blockchain ledger state. Such a blockchain node accomplishes this by holding a copy of the entire Bittensor blockchain database, from the genesis block all the way to the current block. However, holding an entire copy of blockchain ledger state, which is continuously increasing in size, can be expensive. Hence, two types of nodes, a lite node and an archive node, are defined for subtensor, as below: ### Lite node -A **lite node** is configured to perform warp synchronization, which primarily syncs with the blocks that have been finalized, and not the entire blockchain. +A **lite node** is configured to perform warp synchronization, which primarily syncs with the blocks that have been finalized, and not the entire blockchain. They retain only recent data, offer limited historical access, and use significantly less storage. + +A lite node is suitable for miners, most neurons, block validators, and subnet validators. :::tip flags for lite node -Use `--sync=warp` when starting a subtensor node. See [Using Source Code](./using-source.md#run-the-subtensor-node). +Use `--sync=warp` when starting a subtensor node. See [Using Source Code](./run/using-source.md#run-the-subtensor-node). ::: -The lite node warps (jumps) directly to the latest finalized block, downloading the complete blockchain state at that point. The purpose of a lite node is to get up and running quickly and serve, with minimal storage requirements, as a local entry point into the Bittensor mainchain or testchain. +The lite node warps (jumps) directly to the latest finalized block, downloading the complete blockchain state at that point. The purpose of a lite node is to get up and running quickly and serve, with minimal storage requirements, as a local entry point into the Bittensor mainchain or testchain. + +**Verification of chain history**: To ensure blockchain validity, a lite node downloads and verifies finality proofs all the way back to the genesis block (the first block). These proofs confirm the legitimacy of the chain's history without processing every single block. - **Verification of chain history**: To ensure blockchain validity, a lite node downloads and verifies finality proofs all the way back to the genesis block (the first block). These proofs confirm the legitimacy of the chain's history without processing every single block. +**Background fill**: The lite node, while actively participating in the network, still downloads and processes historical blocks in the background to build the complete blockchain database. This download happens when the node is less busy. - **Background fill**: The lite node, while actively participating in the network, still downloads and processes historical blocks in the background to build the complete blockchain database. This download happens when the node is less busy. - - :::tip lite node for a subnet miner - A subnet miner should use a local lite node to communicate with the Bittensor blockchain. - ::: +:::tip lite node for a subnet miner +A subnet miner should use a local lite node to communicate with the Bittensor blockchain. +::: ### Archive node -On the other hand, an **archive node** downloads and validates all the Bittensor blockchain blocks from genesis up to the most recent block. +On the other hand, an **archive node** downloads and validates all the Bittensor blockchain blocks from genesis up to the most recent block. Archive nodes store the entire blockchain history, providing full state access for tasks requiring historical data, such as analytics and audits. + +Archive nodes are suitable for block explorers, indexers, analytics, and querying data older blocks. :::tip flags for archive node -Use `--sync=full` and `--pruning archive` when starting a subtensor node. See [Using Source Code](./using-source.md#run-the-subtensor-node). +Use `--sync=full` and `--pruning archive` when starting a subtensor node. See [Using Source Code](./run/using-source.md#run-the-subtensor-node). ::: The full synchronization performed by an archive node can be significantly slower than warp sync (done by a lite node) as it involves processing every block. Also, archive nodes require substantially more storage space due to the complete historical data. - :::tip archive node for a blockchain explorer - Applications such as Bittensor blockchain explorer, for example, [TAO.app](https://tao.app) that require access to historical blockchain data use an archive node. - ::: - - +:::tip archive node for a blockchain explorer +Applications such as Bittensor blockchain explorer, for example, [TAO.app](https://tao.app) that require access to historical blockchain data use an archive node. +::: -## Query archived data +## Query archived data @@ -89,5 +91,3 @@ print(meta) :::tip See also Also see the [`metagraph` API reference](https://docs.bittensor.com/python-api/html/autoapi/bittensor/metagraph/index.html#bittensor.metagraph.metagraph.sync). ::: - - diff --git a/docs/subtensor-nodes/run/index.md b/docs/subtensor-nodes/run/index.md new file mode 100644 index 00000000..acfba6b7 --- /dev/null +++ b/docs/subtensor-nodes/run/index.md @@ -0,0 +1,26 @@ +--- +title: "Running a Subtensor node" +--- + +# Running a Subtensor node + +This page covers what you need to know before setting up a Subtensor node. + +--- + +A Subtensor node is an internet-connected machine that holds a synchronized copy of the Bittensor blockchain and exposes interfaces for querying state or participating in network operations such as block validation, subnet validation, and mining. + +Running your own node gives you a private, low-latency endpoint instead of depending on a public one, which is recommended for any serious validator, miner, or indexer workload. + +:::info Before you begin +Before you start running a subtensor node, you need to decide on what type of node you want to run. The node type you choose should depend on your available storage capacity and whether your use case requires access to historical chain data. For more information, see [Lite node vs Archive node](../../subtensor-nodes#lite-node-vs-archive-node). +::: + +## Choosing an approach + +There are two supported ways to run a Subtensor node: + +- **Run with Docker**: Runs the node inside a preconfigured container. This provides a faster setup and a consistent, isolated environment for running the Subtensor node. +- **Run with Source Code**: Builds and runs the node directly from the Subtensor repository. Use this approach if you need full control over the build, plan to modify or inspect the runtime, or are debugging or contributing to Subtensor. + +Both approaches result in the same node behavior. The difference is in setup, control, and operational complexity. diff --git a/docs/subtensor-nodes/using-docker.md b/docs/subtensor-nodes/run/using-docker.md similarity index 95% rename from docs/subtensor-nodes/using-docker.md rename to docs/subtensor-nodes/run/using-docker.md index 21f8a49d..80218c44 100644 --- a/docs/subtensor-nodes/using-docker.md +++ b/docs/subtensor-nodes/run/using-docker.md @@ -1,5 +1,5 @@ --- -title: "Using Docker" +title: "Run with Docker" --- import ThemedImage from '@theme/ThemedImage'; @@ -7,7 +7,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -# Using Docker +# Run with Docker To run a subtensor node with Docker, follow the below steps. @@ -62,6 +62,10 @@ Adding a user to the `docker` group is only necessary on Linux, where `sudo` pri Now you can run the subtensor nodes for either mainchain or testchain using any of available options. +:::info Start your docker engine +Before running the command to run the Subtensor node on Docker, ensure that you have a Docker engine running on your device. +::: + ### Using lite nodes A lite node which primarily syncs with the only blocks that have been finalized, and not the entire blockchain. Run a lite node using the command corresponding to your target chain: diff --git a/docs/subtensor-nodes/using-source.md b/docs/subtensor-nodes/run/using-source.md similarity index 88% rename from docs/subtensor-nodes/using-source.md rename to docs/subtensor-nodes/run/using-source.md index 11385ef9..6b6304ba 100644 --- a/docs/subtensor-nodes/using-source.md +++ b/docs/subtensor-nodes/run/using-source.md @@ -1,11 +1,13 @@ --- -title: "Using Source Code" +title: "Run with Source Code" --- import ThemedImage from '@theme/ThemedImage'; import useBaseUrl from '@docusaurus/useBaseUrl'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; -# Using Source Code +# Run with Source Code To install and run a subtensor node by compiling the source code, follow the below steps. @@ -85,34 +87,45 @@ cargo build -p node-subtensor --profile=production --features=metadata-hash You can now run the public subtensor node either as a lite node or as an archive node. See below: -### Lite node on mainchain +### Using lite node + + To run a lite node connected to the mainchain, execute the below command (note the `--sync=warp` flag which runs the subtensor node in lite mode): ```bash ./target/production/node-subtensor --chain ./chainspecs/raw_spec_finney.json --base-path /var/lib/subtensor --sync=warp --port 30333 --max-runtime-instances 32 --database paritydb --db-cache 4096 --trie-cache-size 2048 --rpc-max-response-size 2048 --rpc-cors all --rpc-port 9944 --bootnodes /dns/bootnode.finney.chain.opentensor.ai/tcp/30333/ws/p2p/12D3KooWRwbMb85RWnT8DSXSYMWQtuDwh4LJzndoRrTDotTR5gDC --no-mdns --rpc-external ``` -### Archive node on mainchain - -To run an archive node connected to the mainchain, execute the below command (note the `--sync=full` which syncs the node to the full chain and `--pruning archive` flags, which disables the node's automatic pruning of older historical data): + + +To run a lite node connected to the testchain, execute the below command: ```bash -./target/production/node-subtensor --chain ./chainspecs/raw_spec_finney.json --base-path /var/lib/subtensor --sync=full --pruning archive --port 30333 --max-runtime-instances 32 --rpc-max-response-size 2048 --rpc-cors all --rpc-port 9944 --bootnodes /dns/bootnode.finney.chain.opentensor.ai/tcp/30333/ws/p2p/12D3KooWRwbMb85RWnT8DSXSYMWQtuDwh4LJzndoRrTDotTR5gDC --no-mdns --prometheus-external --rpc-external +./target/production/node-subtensor --chain ./chainspecs/raw_spec_testfinney.json --base-path /var/lib/subtensor --sync=warp --port 30333 --max-runtime-instances 32 --database paritydb --db-cache 4096 --trie-cache-size 2048 --rpc-max-response-size 2048 --rpc-cors all --rpc-port 9944 --bootnodes /dns/bootnode.test.finney.opentensor.ai/tcp/30333/ws/p2p/12D3KooWPM4mLcKJGtyVtkggqdG84zWrd7Rij6PGQDoijh1X86Vr --no-mdns --rpc-external ``` -### Lite node on testchain + + -To run a lite node connected to the testchain, execute the below command: +### Using archive node + + + +To run an archive node connected to the mainchain, execute the below command (note the `--sync=full` which syncs the node to the full chain and `--pruning archive` flags, which disables the node's automatic pruning of older historical data): ```bash -./target/production/node-subtensor --chain ./chainspecs/raw_spec_testfinney.json --base-path /var/lib/subtensor --sync=warp --port 30333 --max-runtime-instances 32 --database paritydb --db-cache 4096 --trie-cache-size 2048 --rpc-max-response-size 2048 --rpc-cors all --rpc-port 9944 --bootnodes /dns/bootnode.test.finney.opentensor.ai/tcp/30333/ws/p2p/12D3KooWPM4mLcKJGtyVtkggqdG84zWrd7Rij6PGQDoijh1X86Vr --no-mdns --rpc-external +./target/production/node-subtensor --chain ./chainspecs/raw_spec_finney.json --base-path /var/lib/subtensor --sync=full --pruning archive --port 30333 --max-runtime-instances 32 --rpc-max-response-size 2048 --rpc-cors all --rpc-port 9944 --bootnodes /dns/bootnode.finney.chain.opentensor.ai/tcp/30333/ws/p2p/12D3KooWRwbMb85RWnT8DSXSYMWQtuDwh4LJzndoRrTDotTR5gDC --no-mdns --prometheus-external --rpc-external ``` -### Archive node on testchain + + To run an archive node connected to the testchain, execute the below command: ```bash ./target/production/node-subtensor --chain ./chainspecs/raw_spec_testfinney.json --base-path /var/lib/subtensor --sync=full --pruning archive --port 30333 --max-runtime-instances 32 --rpc-max-response-size 2048 --rpc-cors all --rpc-port 9944 --bootnodes /dns/bootnode.test.finney.opentensor.ai/tcp/30333/ws/p2p/12D3KooWPM4mLcKJGtyVtkggqdG84zWrd7Rij6PGQDoijh1X86Vr --no-mdns --prometheus-external --rpc-external ``` + + + diff --git a/docs/subtensor-nodes/subtensor-node-requirements.md b/docs/subtensor-nodes/subtensor-node-requirements.md index 22f9e5b0..472e4a74 100644 --- a/docs/subtensor-nodes/subtensor-node-requirements.md +++ b/docs/subtensor-nodes/subtensor-node-requirements.md @@ -1,14 +1,15 @@ --- title: "Subtensor Node Requirements" --- + import ThemedImage from '@theme/ThemedImage'; import useBaseUrl from '@docusaurus/useBaseUrl'; # Subtensor Node Requirements -To run a public subtensor, make sure that your computer satisfies the following system requirements: +To run a public subtensor node, make sure that your computer satisfies the following system requirements: -- Currently only x86_64 Linux architecture and macOS arm64 (Apple Silicon) are supported. +- Currently only x86_64 Linux architecture and macOS arm64 (Apple Silicon) are supported. - Subtensor requires 4 CPU cores and 16GB RAM to run. More resources may be required based on utilization. ## Linux x86_64 @@ -29,10 +30,9 @@ Requirements: - **Lite node**: 128 GB is sufficient. - **Archive node**: Minimum 2 TB for the current size of the chain, as of block # 5029000 on 28 Feb 2025. - ## Network requirements and port settings -After you install the subtensor as per the below instructions, make sure that you open network ports on your subtensor node. This will allow other peer subtensor nodes to connect to your subtensor node. +After you install the subtensor as per the below instructions, make sure that you open network ports on your subtensor node. This will allow other peer subtensor nodes to connect to your subtensor node. - Your subtensor node must have access to the public internet. - Your subtensor node runs in an IPv4 network. @@ -41,8 +41,7 @@ After you install the subtensor as per the below instructions, make sure that yo Make sure that your subtensor node listens on the following ports: -- `9944` - Websocket. This port is used by Bittensor. This port only accepts connections from ``localhost``. Make sure this port is firewalled **off** from the public internet domain. +- `9944` - Websocket. This port is used by Bittensor. This port only accepts connections from `localhost`. Make sure this port is firewalled **off** from the public internet domain. - `9933` - RPC. This port should be opened but it is not used. - `30333` - p2p socket. This port should accept connections from other subtensor nodes on the internet. Make sure your firewall **allows** incoming traffic to this port. - We assume that your default outgoing traffic policy is `ACCEPT`. If not, make sure that outbound traffic on port 30333 is allowed. - diff --git a/docusaurus.config.js b/docusaurus.config.js index 6644ad4c..f29ab6ee 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -205,10 +205,6 @@ const config = { from: "/utilities", to: "/resources/utilities", }, - { - from: "/governance", - to: "/governance", - }, { from: "/senate", to: "/governance/senate", @@ -221,6 +217,14 @@ const config = { from: "/media-assets", to: "/resources/media-assets", }, + { + from: "/subtensor-nodes/using-docker", + to: "/subtensor-nodes/run/using-docker", + }, + { + from: "/subtensor-nodes/using-source", + to: "/subtensor-nodes/run/using-source", + }, ], }, ], diff --git a/llms.txt b/llms.txt index 76139237..2362247c 100644 --- a/llms.txt +++ b/llms.txt @@ -101,8 +101,8 @@ The primary command-line tool for Bittensor operations. ### Subtensor Nodes - **Node Basics**: https://docs.bittensor.com/subtensor-nodes/ - **Node Requirements**: https://docs.bittensor.com/subtensor-nodes/subtensor-node-requirements -- **Source Installation**: https://docs.bittensor.com/subtensor-nodes/using-source -- **Docker Installation**: https://docs.bittensor.com/subtensor-nodes/using-docker +- **Source Installation**: https://docs.bittensor.com/subtensor-nodes/run/using-docker +- **Docker Installation**: https://docs.bittensor.com/subtensor-nodes/run/using-docker - **Rate Limits**: https://docs.bittensor.com/subtensor-nodes/subtensor-rate-limits - **Storage Queries**: https://docs.bittensor.com/subtensor-nodes/subtensor-storage-query-examples - **Error Messages**: https://docs.bittensor.com/subtensor-nodes/subtensor-error-messages diff --git a/sidebars.js b/sidebars.js index 9f381804..d0ced05b 100644 --- a/sidebars.js +++ b/sidebars.js @@ -262,8 +262,17 @@ const sidebars = { collapsed: true, items: [ "subtensor-nodes/subtensor-node-requirements", - "subtensor-nodes/using-source", - "subtensor-nodes/using-docker", + { + type: "category", + label: "Running a subtensor node", + link: { type: "doc", id: "subtensor-nodes/run/index" }, + collapsible: true, + collapsed: true, + items: [ + "subtensor-nodes/run/using-source", + "subtensor-nodes/run/using-docker", + ], + }, "subtensor-nodes/subtensor-storage-query-examples", ], }, diff --git a/src/subtensor-docs-gen/src/generators/constants.ts b/src/subtensor-docs-gen/src/generators/constants.ts index 529c678d..f39e9b08 100644 --- a/src/subtensor-docs-gen/src/generators/constants.ts +++ b/src/subtensor-docs-gen/src/generators/constants.ts @@ -15,7 +15,7 @@ export function generateConstants(api: ApiPromise, outputDir: string): void { lines.push( fileHeader( "Constants", - "This page contains compile-time runtime constants for the Bittensor (Subtensor) runtime. " + + "This page contains compile-time runtime constants for the Subtensor runtime and their respective values. " + "Accessible via `api.consts..`. Values read live from node.", (api as any)._options?.provider?.endpoint ?? "subtensor node", ), diff --git a/src/subtensor-docs-gen/src/generators/errors.ts b/src/subtensor-docs-gen/src/generators/errors.ts index 90c8b425..718097ae 100644 --- a/src/subtensor-docs-gen/src/generators/errors.ts +++ b/src/subtensor-docs-gen/src/generators/errors.ts @@ -14,7 +14,7 @@ export function generateErrors(api: ApiPromise, outputDir: string): void { lines.push( fileHeader( "Errors", - "This page contains error variants returned by the Bittensor (Subtensor) runtime. " + + "This page contains error variants returned by the Subtensor runtime. " + "Accessible via `api.errors..`.", (api as any)._options?.provider?.endpoint ?? "subtensor node", ), diff --git a/src/subtensor-docs-gen/src/generators/events.ts b/src/subtensor-docs-gen/src/generators/events.ts index 318ff8a4..75bdfa5f 100644 --- a/src/subtensor-docs-gen/src/generators/events.ts +++ b/src/subtensor-docs-gen/src/generators/events.ts @@ -15,7 +15,7 @@ export function generateEvents(api: ApiPromise, outputDir: string): void { lines.push( fileHeader( "Events", - "The following page contains runtime events emitted by the Bittensor (Subtensor) runtime. " + + "The following page contains runtime events emitted by the Subtensor runtime. " + "Accessible via `api.events..`.", (api as any)._options?.provider?.endpoint ?? "subtensor node", ), diff --git a/src/subtensor-docs-gen/src/generators/extrinsics.ts b/src/subtensor-docs-gen/src/generators/extrinsics.ts index 718d32ab..d4e67e65 100644 --- a/src/subtensor-docs-gen/src/generators/extrinsics.ts +++ b/src/subtensor-docs-gen/src/generators/extrinsics.ts @@ -19,8 +19,8 @@ export function generateExtrinsics(api: ApiPromise, outputDir: string): void { lines.push( fileHeader( "Extrinsics", - "The following sections contain Extrinsic methods that are part of the Bittensor " + - "(Subtensor) runtime. On the API, these are exposed via `api.tx..`.", + "The following sections contain Extrinsic methods that are part of the Subtensor " + + "runtime. On the API, these are exposed via `api.tx..`.", (api as any)._options?.provider?.endpoint ?? "subtensor node", ), ); diff --git a/src/subtensor-docs-gen/src/generators/rpc.ts b/src/subtensor-docs-gen/src/generators/rpc.ts index 6e433523..b7f067ff 100644 --- a/src/subtensor-docs-gen/src/generators/rpc.ts +++ b/src/subtensor-docs-gen/src/generators/rpc.ts @@ -70,7 +70,7 @@ export async function generateRpc( lines.push( fileHeader( "RPC", - "This page shows JSON-RPC methods available on a Bittensor (Subtensor) node. " + + "This page shows JSON-RPC methods available on the Subtensor node. " + "Accessible via `api.rpc..`.", (api as any)._options?.provider?.endpoint ?? "subtensor node", ), diff --git a/src/subtensor-docs-gen/src/generators/runtime.ts b/src/subtensor-docs-gen/src/generators/runtime.ts index 88872e9f..e7557a60 100644 --- a/src/subtensor-docs-gen/src/generators/runtime.ts +++ b/src/subtensor-docs-gen/src/generators/runtime.ts @@ -20,7 +20,7 @@ export function generateRuntimeCalls(api: ApiPromise, outputDir: string): void { lines.push( fileHeader( "Runtime Calls", - "This page includes runtime API calls exposed by the Bittensor (Subtensor) runtime. " + + "This page includes runtime API calls exposed by the Subtensor runtime. " + "Accessible via `api.call..`.", (api as any)._options?.provider?.endpoint ?? "subtensor node", ), diff --git a/src/subtensor-docs-gen/src/generators/storage.ts b/src/subtensor-docs-gen/src/generators/storage.ts index 863b27f6..5877edc3 100644 --- a/src/subtensor-docs-gen/src/generators/storage.ts +++ b/src/subtensor-docs-gen/src/generators/storage.ts @@ -207,7 +207,7 @@ export function generateStorage(api: ApiPromise, outputDir: string): void { lines.push( fileHeader( "Storage", - "This page contains storage query definitions for the Bittensor (Subtensor) runtime. " + + "This page contains storage query definitions for the Subtensor runtime. " + "Accessible via `api.query..`.", (api as any)._options?.provider?.endpoint ?? "subtensor node", ), diff --git a/src/subtensor-docs-gen/src/utils.ts b/src/subtensor-docs-gen/src/utils.ts index 35449bf7..8c5f89ef 100644 --- a/src/subtensor-docs-gen/src/utils.ts +++ b/src/subtensor-docs-gen/src/utils.ts @@ -431,7 +431,15 @@ export function today(): string { } export function fileHeader(title: string, description: string, endpoint: string): string { - return `# ${title} + // Use only the first sentence, stripped of Markdown backticks, for frontmatter + const fmDescription = description.split(/\.\s/)[0].replace(/`/g, '') + '.'; + + return `--- +title: ${title} +description: "${fmDescription}" +--- + +# ${title} ${description}