Skip to content

SubtensorModule


Calls


add_stake

--- Adds stake to a hotkey. The call is made from the coldkey account linked in the hotkey. Only the associated coldkey is allowed to make staking and unstaking requests. This protects the neuron against attacks on its hotkey running in production code.

# Args: * &#x27;origin&#x27;: (<T as frame_system::Config>Origin): - The signature of the caller&#x27;s coldkey.

  • &#x27;hotkey&#x27; (T::AccountId):

    • The associated hotkey account.
  • &#x27;amount_staked&#x27; (u64):

    • The amount of stake to be added to the hotkey staking account.

# Event: * StakeAdded; - On the successfully adding stake to a global account.

# Raises: * &#x27;NotEnoughBalanceToStake&#x27;: - Not enough balance on the coldkey to add onto the global account.

  • &#x27;NonAssociatedColdKey&#x27;:

    • The calling coldkey is not associated with this hotkey.
  • &#x27;BalanceWithdrawalError&#x27;:

    • Errors stemming from transaction pallet.

Attributes

Name Type
hotkey T::AccountId
amount_staked u64

Python

call = substrate.compose_call(
    'SubtensorModule', 'add_stake', {
    'amount_staked': 'u64',
    'hotkey': 'AccountId',
}
)

adjust_senate

Attempt to adjust the senate membership to include a hotkey

Attributes

Name Type
hotkey T::AccountId

Python

call = substrate.compose_call(
    'SubtensorModule', 'adjust_senate', {'hotkey': 'AccountId'}
)

become_delegate

--- Sets the key as a delegate.

# Args: * &#x27;origin&#x27;: (<T as frame_system::Config>Origin): - The signature of the caller&#x27;s coldkey.

  • &#x27;hotkey&#x27; (T::AccountId):

    • The hotkey we are delegating (must be owned by the coldkey.)
  • &#x27;take&#x27; (u64):

    • The stake proportion that this hotkey takes from delegations.

# Event: * DelegateAdded; - On successfully setting a hotkey as a delegate.

# Raises: * &#x27;NotRegistered&#x27;: - The hotkey we are delegating is not registered on the network.

  • &#x27;NonAssociatedColdKey&#x27;:
    • The hotkey we are delegating is not owned by the calling coldket.

Attributes

Name Type
hotkey T::AccountId

Python

call = substrate.compose_call(
    'SubtensorModule', 'become_delegate', {'hotkey': 'AccountId'}
)

burned_register

User register a new subnetwork via burning token

Attributes

Name Type
netuid u16
hotkey T::AccountId

Python

call = substrate.compose_call(
    'SubtensorModule', 'burned_register', {
    'hotkey': 'AccountId',
    'netuid': 'u16',
}
)

commit_weights

---- Used to commit a hash of your weight values to later be revealed.

# Args: * origin: (&lt;T as frame_system::Config&gt;::RuntimeOrigin): - The signature of the committing hotkey.

  • netuid (u16):
  • The u16 network identifier.

  • commit_hash (H256):

  • The hash representing the committed weights.

# Raises: * WeightsCommitNotAllowed: - Attempting to commit when it is not allowed.

Attributes

Name Type
netuid u16
commit_hash H256

Python

call = substrate.compose_call(
    'SubtensorModule', 'commit_weights', {
    'commit_hash': 'scale_info::13',
    'netuid': 'u16',
}
)

decrease_take

--- Allows delegates to decrease its take value.

# Args: * &#x27;origin&#x27;: (<T as frame_system::Config>::Origin): - The signature of the caller&#x27;s coldkey.

  • &#x27;hotkey&#x27; (T::AccountId):

    • The hotkey we are delegating (must be owned by the coldkey.)
  • &#x27;netuid&#x27; (u16):

    • Subnet ID to decrease take for
  • &#x27;take&#x27; (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; - On successfully setting a decreased take for this hotkey.

# Raises: * &#x27;NotRegistered&#x27;: - The hotkey we are delegating is not registered on the network.

  • &#x27;NonAssociatedColdKey&#x27;:

    • The hotkey we are delegating is not owned by the calling coldkey.
  • &#x27;DelegateTakeTooLow&#x27;:

    • The delegate is setting a take which is not lower than the previous.

Attributes

Name Type
hotkey T::AccountId
take u16

Python

call = substrate.compose_call(
    'SubtensorModule', 'decrease_take', {'hotkey': 'AccountId', 'take': 'u16'}
)

dissolve_network

Remove a user&#x27;s subnetwork The caller must be the owner of the network

Attributes

Name Type
netuid u16

Python

call = substrate.compose_call(
    'SubtensorModule', 'dissolve_network', {'netuid': 'u16'}
)

faucet

Facility extrinsic for user to get taken from faucet It is only available when pow-faucet feature enabled Just deployed in testnet and devnet for testing purpose

Attributes

Name Type
block_number u64
nonce u64
work Vec<u8>

Python

call = substrate.compose_call(
    'SubtensorModule', 'faucet', {
    'block_number': 'u64',
    'nonce': 'u64',
    'work': 'Bytes',
}
)

increase_take

--- Allows delegates to increase its take value. This call is rate-limited.

# Args: * &#x27;origin&#x27;: (<T as frame_system::Config>::Origin): - The signature of the caller&#x27;s coldkey.

  • &#x27;hotkey&#x27; (T::AccountId):

    • The hotkey we are delegating (must be owned by the coldkey.)
  • &#x27;take&#x27; (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; - On successfully setting a increased take for this hotkey.

# Raises: * &#x27;NotRegistered&#x27;: - The hotkey we are delegating is not registered on the network.

  • &#x27;NonAssociatedColdKey&#x27;:

    • The hotkey we are delegating is not owned by the calling coldkey.
  • &#x27;DelegateTakeTooHigh&#x27;:

    • The delegate is setting a take which is not greater than the previous.

Attributes

Name Type
hotkey T::AccountId
take u16

Python

call = substrate.compose_call(
    'SubtensorModule', 'increase_take', {'hotkey': 'AccountId', 'take': 'u16'}
)

register

---- Registers a new neuron to the subnetwork.

# Args: * &#x27;origin&#x27;: (<T as frame_system::Config>Origin): - The signature of the calling hotkey.

  • &#x27;netuid&#x27; (u16):

    • The u16 network identifier.
  • &#x27;block_number&#x27; ( u64 ):

    • Block hash used to prove work done.
  • &#x27;nonce&#x27; ( u64 ):

    • Positive integer nonce used in POW.
  • &#x27;work&#x27; ( Vec<u8> ):

    • Vector encoded bytes representing work done.
  • &#x27;hotkey&#x27; ( T::AccountId ):

    • Hotkey to be registered to the network.
  • &#x27;coldkey&#x27; ( T::AccountId ):

    • Associated coldkey account.

# Event: * NeuronRegistered; - On successfully registering a uid to a neuron slot on a subnetwork.

# Raises: * &#x27;SubNetworkDoesNotExist&#x27;: - Attempting to register to a non existent network.

  • &#x27;TooManyRegistrationsThisBlock&#x27;:

    • This registration exceeds the total allowed on this network this block.
  • &#x27;HotKeyAlreadyRegisteredInSubNet&#x27;:

    • The hotkey is already registered on this network.
  • &#x27;InvalidWorkBlock&#x27;:

    • The work has been performed on a stale, future, or non existent block.
  • &#x27;InvalidDifficulty&#x27;:

    • The work does not match the difficulty.
  • &#x27;InvalidSeal&#x27;:

    • The seal is incorrect.

Attributes

Name Type
netuid u16
block_number u64
nonce u64
work Vec<u8>
hotkey T::AccountId
coldkey T::AccountId

Python

call = substrate.compose_call(
    'SubtensorModule', 'register', {
    'block_number': 'u64',
    'coldkey': 'AccountId',
    'hotkey': 'AccountId',
    'netuid': 'u16',
    'nonce': 'u64',
    'work': 'Bytes',
}
)

register_network

User register a new subnetwork

Attributes

No attributes

Python

call = substrate.compose_call(
    'SubtensorModule', 'register_network', {}
)

remove_stake

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: * &#x27;origin&#x27;: (<T as frame_system::Config>Origin): - The signature of the caller&#x27;s coldkey.

  • &#x27;hotkey&#x27; (T::AccountId):

    • The associated hotkey account.
  • &#x27;amount_unstaked&#x27; (u64):

    • The amount of stake to be added to the hotkey staking account.

# Event: * StakeRemoved; - On the successfully removing stake from the hotkey account.

# Raises: * &#x27;NotRegistered&#x27;: - Thrown if the account we are attempting to unstake from is non existent.

  • &#x27;NonAssociatedColdKey&#x27;:

    • Thrown if the coldkey does not own the hotkey we are unstaking from.
  • &#x27;NotEnoughStakeToWithdraw&#x27;:

    • Thrown if there is not enough stake on the hotkey to withdwraw this amount.

Attributes

Name Type
hotkey T::AccountId
amount_unstaked u64

Python

call = substrate.compose_call(
    'SubtensorModule', 'remove_stake', {
    'amount_unstaked': 'u64',
    'hotkey': 'AccountId',
}
)

reveal_weights

---- Used to reveal the weights for a previously committed hash.

# Args: * origin: (&lt;T as frame_system::Config&gt;::RuntimeOrigin): - The signature of the revealing hotkey.

  • netuid (u16):
  • The u16 network identifier.

  • uids (Vec&lt;u16&gt;):

  • The uids for the weights being revealed.

  • values (Vec&lt;u16&gt;):

  • The values of the weights being revealed.

  • salt (Vec&lt;u8&gt;):

  • The random salt to protect from brute-force guessing attack in case of small weight changes bit-wise.

  • version_key (u64):

  • The network version key.

# Raises: * NoWeightsCommitFound: - Attempting to reveal weights without an existing commit.

  • InvalidRevealCommitHashNotMatchTempo:
  • Attempting to reveal weights outside the valid tempo.

  • InvalidRevealCommitHashNotMatch:

  • The revealed hash does not match the committed hash.

Attributes

Name Type
netuid u16
uids Vec<u16>
values Vec<u16>
salt Vec<u16>
version_key u64

Python

call = substrate.compose_call(
    'SubtensorModule', 'reveal_weights', {
    'netuid': 'u16',
    'salt': ['u16'],
    'uids': ['u16'],
    'values': ['u16'],
    'version_key': 'u64',
}
)

root_register

Register the hotkey to root network

Attributes

Name Type
hotkey T::AccountId

Python

call = substrate.compose_call(
    'SubtensorModule', 'root_register', {'hotkey': 'AccountId'}
)

serve_axon

Serves or updates axon /promethteus 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: * &#x27;origin&#x27;: (<T as frame_system::Config>Origin): - The signature of the caller.

  • &#x27;netuid&#x27; (u16):

    • The u16 network identifier.
  • &#x27;version&#x27; (u64):

    • The bittensor version identifier.
  • &#x27;ip&#x27; (u64):

    • The endpoint ip information as a u128 encoded integer.
  • &#x27;port&#x27; (u16):

    • The endpoint port information as a u16 encoded integer.
  • &#x27;ip_type&#x27; (u8):

    • The endpoint ip version as a u8, 4 or 6.
  • &#x27;protocol&#x27; (u8):

    • UDP:1 or TCP:0
  • &#x27;placeholder1&#x27; (u8):

    • Placeholder for further extra params.
  • &#x27;placeholder2&#x27; (u8):

    • Placeholder for further extra params.

# Event: * AxonServed; - On successfully serving the axon info.

# Raises: * &#x27;SubNetworkDoesNotExist&#x27;: - Attempting to set weights on a non-existent network.

  • &#x27;NotRegistered&#x27;:

    • Attempting to set weights from a non registered account.
  • &#x27;InvalidIpType&#x27;:

    • The ip type is not 4 or 6.
  • &#x27;InvalidIpAddress&#x27;:

    • The numerically encoded ip address does not resolve to a proper ip.
  • &#x27;ServingRateLimitExceeded&#x27;:

    • Attempting to set prometheus information withing the rate limit min.

Attributes

Name Type
netuid u16
version u32
ip u128
port u16
ip_type u8
protocol u8
placeholder1 u8
placeholder2 u8

Python

call = substrate.compose_call(
    'SubtensorModule', 'serve_axon', {
    'ip': 'u128',
    'ip_type': 'u8',
    'netuid': 'u16',
    'placeholder1': 'u8',
    'placeholder2': 'u8',
    'port': 'u16',
    'protocol': 'u8',
    'version': 'u32',
}
)

serve_prometheus

---- Set prometheus information for the neuron. # Args: * &#x27;origin&#x27;: (<T as frame_system::Config>Origin): - The signature of the calling hotkey.

  • &#x27;netuid&#x27; (u16):

    • The u16 network identifier.
  • &#x27;version&#x27; (u16):

    • The bittensor version identifier.
  • &#x27;ip&#x27; (u128):

    • The prometheus ip information as a u128 encoded integer.
  • &#x27;port&#x27; (u16):

    • The prometheus port information as a u16 encoded integer.
  • &#x27;ip_type&#x27; (u8):

    • The ip type v4 or v6.

Attributes

Name Type
netuid u16
version u32
ip u128
port u16
ip_type u8

Python

call = substrate.compose_call(
    'SubtensorModule', 'serve_prometheus', {
    'ip': 'u128',
    'ip_type': 'u8',
    'netuid': 'u16',
    'port': 'u16',
    'version': 'u32',
}
)

set_root_weights

# Args: * origin: (<T as frame_system::Config>Origin): - The caller, a hotkey who wishes to set their weights.

  • netuid (u16):

    • The network uid we are setting these weights on.
  • hotkey (T::AccountId):

    • The hotkey associated with the operation and the calling coldkey.
  • dests (Vec<u16>):

    • The edge endpoint for the weight, i.e. j for w_ij.
  • &#x27;weights&#x27; (Vec<u16>):

    • The u16 integer encoded weights. Interpreted as rational values in the range [0,1]. They must sum to in32::MAX.
  • &#x27;version_key&#x27; ( u64 ):

    • The network version key to check if the validator is up to date.

# Event:

  • WeightsSet;
    • On successfully setting the weights on chain.

# Raises:

  • NonAssociatedColdKey;

    • Attempting to set weights on a non-associated cold key.
  • &#x27;SubNetworkDoesNotExist&#x27;:

    • Attempting to set weights on a non-existent network.
  • &#x27;NotRootSubnet&#x27;:

    • Attempting to set weights on a subnet that is not the root network.
  • &#x27;WeightVecNotEqualSize&#x27;:

    • Attempting to set weights with uids not of same length.
  • &#x27;UidVecContainInvalidOne&#x27;:

    • Attempting to set weights with invalid uids.
  • &#x27;NotRegistered&#x27;:

    • Attempting to set weights from a non registered account.
  • &#x27;WeightVecLengthIsLow&#x27;:

    • Attempting to set weights with fewer weights than min.
  • &#x27;IncorrectWeightVersionKey&#x27;:

    • Attempting to set weights with the incorrect network version key.
  • &#x27;SettingWeightsTooFast&#x27;:

    • Attempting to set weights too fast.
  • &#x27;WeightVecLengthIsLow&#x27;:

    • Attempting to set weights with fewer weights than min.
  • &#x27;MaxWeightExceeded&#x27;:

    • Attempting to set weights with max value exceeding limit.

Attributes

Name Type
netuid u16
hotkey T::AccountId
dests Vec<u16>
weights Vec<u16>
version_key u64

Python

call = substrate.compose_call(
    'SubtensorModule', 'set_root_weights', {
    'dests': ['u16'],
    'hotkey': 'AccountId',
    'netuid': 'u16',
    'version_key': 'u64',
    'weights': ['u16'],
}
)

set_weights

--- 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.

# Args: * origin: (<T as frame_system::Config>Origin): - The caller, a hotkey who wishes to set their weights.

  • netuid (u16):

    • The network uid we are setting these weights on.
  • dests (Vec<u16>):

    • The edge endpoint for the weight, i.e. j for w_ij.
  • &#x27;weights&#x27; (Vec<u16>):

    • The u16 integer encoded weights. Interpreted as rational values in the range [0,1]. They must sum to in32::MAX.
  • &#x27;version_key&#x27; ( u64 ):

    • The network version key to check if the validator is up to date.

# Event: * WeightsSet; - On successfully setting the weights on chain.

# Raises: * &#x27;SubNetworkDoesNotExist&#x27;: - Attempting to set weights on a non-existent network.

  • &#x27;NotRegistered&#x27;:

    • Attempting to set weights from a non registered account.
  • &#x27;WeightVecNotEqualSize&#x27;:

    • Attempting to set weights with uids not of same length.
  • &#x27;DuplicateUids&#x27;:

    • Attempting to set weights with duplicate uids.

    • &#x27;UidsLengthExceedUidsInSubNet&#x27;:

    • Attempting to set weights above the max allowed uids.
  • &#x27;UidVecContainInvalidOne&#x27;:

    • Attempting to set weights with invalid uids.
  • &#x27;WeightVecLengthIsLow&#x27;:

    • Attempting to set weights with fewer weights than min.
  • &#x27;MaxWeightExceeded&#x27;:

    • Attempting to set weights with max value exceeding limit.

Attributes

Name Type
netuid u16
dests Vec<u16>
weights Vec<u16>
version_key u64

Python

call = substrate.compose_call(
    'SubtensorModule', 'set_weights', {
    'dests': ['u16'],
    'netuid': 'u16',
    'version_key': 'u64',
    'weights': ['u16'],
}
)

sudo

Authenticates a council proposal and dispatches a function call with Root origin.

The dispatch origin for this call must be a council majority.

## Complexity - O(1).

Attributes

Name Type
call Box<T::SudoRuntimeCall>

Python

call = substrate.compose_call(
    'SubtensorModule', 'sudo', {'call': 'Call'}
)

sudo_hotfix_swap_coldkey_delegates

Sets values for liquid alpha

Attributes

Name Type
old_coldkey T::AccountId
new_coldkey T::AccountId

Python

call = substrate.compose_call(
    'SubtensorModule', 'sudo_hotfix_swap_coldkey_delegates', {
    'new_coldkey': 'AccountId',
    'old_coldkey': 'AccountId',
}
)

sudo_unchecked_weight

Authenticates a council proposal and dispatches a function call with Root origin. This function does not check the weight of the call, and instead allows the user to specify the weight of the call.

The dispatch origin for this call must be a council majority.

## Complexity - O(1).

Attributes

Name Type
call Box<T::SudoRuntimeCall>
weight Weight

Python

call = substrate.compose_call(
    'SubtensorModule', 'sudo_unchecked_weight', {
    'call': 'Call',
    'weight': {
        'proof_size': 'u64',
        'ref_time': 'u64',
    },
}
)

swap_coldkey

The extrinsic for user to change its hotkey #[pallet::call_index(70)] #[pallet::weight((Weight::from_parts(1_940_000_000, 0) .saturating_add(T::DbWeight::get().reads(272)) .saturating_add(T::DbWeight::get().writes(527)), DispatchClass::Operational, Pays::No))] pub fn swap_hotkey( origin: OriginFor<T>, hotkey: T::AccountId, new_hotkey: T::AccountId, ) -> DispatchResultWithPostInfo { Self::do_swap_hotkey(origin, &hotkey, &new_hotkey) } The extrinsic for user to change the coldkey associated with their account.

# Arguments

  • origin - The origin of the call, must be signed by the old coldkey.
  • old_coldkey - The current coldkey associated with the account.
  • new_coldkey - The new coldkey to be associated with the account.

# Returns

Returns a DispatchResultWithPostInfo indicating success or failure of the operation.

# Weight

Weight is calculated based on the number of database reads and writes.

Attributes

Name Type
new_coldkey T::AccountId

Python

call = substrate.compose_call(
    'SubtensorModule', 'swap_coldkey', {'new_coldkey': 'AccountId'}
)

vote

User vote on a proposal

Attributes

Name Type
hotkey T::AccountId
proposal T::Hash
index u32
approve bool

Python

call = substrate.compose_call(
    'SubtensorModule', 'vote', {
    'approve': 'bool',
    'hotkey': 'AccountId',
    'index': 'u32',
    'proposal': 'scale_info::13',
}
)

Events


ActivityCutoffSet

an activity cutoff is set for a subnet.

Attributes

Name Type Composition
None u16 u16
None u16 u16

AdjustmentAlphaSet

setting the adjustment alpha on a subnet.

Attributes

Name Type Composition
None u16 u16
None u64 u64

AdjustmentIntervalSet

the adjustment interval is set for a subnet.

Attributes

Name Type Composition
None u16 u16
None u16 u16

AllBalanceUnstakedAndTransferredToNewColdkey

All balance of a hotkey has been unstaked and transferred to a new coldkey

Attributes

Name Type Composition
current_coldkey T::AccountId AccountId
new_coldkey T::AccountId AccountId
total_balance `<::Currency as fungible::Inspect<<T as frame_system::
Config>::AccountId,>>::Balance` u64

ArbitrationPeriodExtended

The arbitration period has been extended

Attributes

Name Type Composition
coldkey T::AccountId AccountId

AxonServed

the axon server information is added to the network.

Attributes

Name Type Composition
None u16 u16
None T::AccountId AccountId

BondsMovingAverageSet

bonds moving average is set for a subnet.

Attributes

Name Type Composition
None u16 u16
None u64 u64

BulkBalancesSet

FIXME: Not used yet

Attributes

Name Type Composition
None u16 u16
None u16 u16

BulkNeuronsRegistered

multiple uids have been concurrently registered.

Attributes

Name Type Composition
None u16 u16
None u16 u16

BurnSet

setting burn on a network.

Attributes

Name Type Composition
None u16 u16
None u64 u64

ColdkeySwapScheduled

A coldkey swap has been scheduled

Attributes

Name Type Composition
old_coldkey T::AccountId AccountId
new_coldkey T::AccountId AccountId
arbitration_block u64 u64

ColdkeySwapped

A coldkey has been swapped

Attributes

Name Type Composition
old_coldkey T::AccountId AccountId
new_coldkey T::AccountId AccountId

DefaultTakeSet

the default take is set.

Attributes

Name Type Composition
None u16 u16

DelegateAdded

a hotkey has become a delegate.

Attributes

Name Type Composition
None T::AccountId AccountId
None T::AccountId AccountId
None u16 u16

DifficultySet

the difficulty has been set for a subnet.

Attributes

Name Type Composition
None u16 u16
None u64 u64

EmissionValuesSet

emission ratios for all networks is set.

Attributes

No attributes


Faucet

the faucet it called on the test net.

Attributes

Name Type Composition
None T::AccountId AccountId
None u64 u64

HotkeySwapped

the hotkey is swapped

Attributes

Name Type Composition
coldkey T::AccountId AccountId
old_hotkey T::AccountId AccountId
new_hotkey T::AccountId AccountId

ImmunityPeriodSet

immunity period is set for a subnet.

Attributes

Name Type Composition
None u16 u16
None u16 u16

KappaSet

Kappa is set for a subnet.

Attributes

Name Type Composition
None u16 u16
None u16 u16

MaxAllowedUidsSet

max allowed uids has been set for a subnetwork.

Attributes

Name Type Composition
None u16 u16
None u16 u16

MaxAllowedValidatorsSet

setting the max number of allowed validators on a subnet.

Attributes

Name Type Composition
None u16 u16
None u16 u16

MaxBurnSet

setting max burn on a network.

Attributes

Name Type Composition
None u16 u16
None u64 u64

MaxDelegateTakeSet

maximum delegate take is set by sudo/admin transaction

Attributes

Name Type Composition
None u16 u16

MaxDifficultySet

setting max difficulty on a network.

Attributes

Name Type Composition
None u16 u16
None u64 u64

MaxRegistrationsPerBlockSet

we set max registrations per block.

Attributes

Name Type Composition
None u16 u16
None u16 u16

MaxWeightLimitSet

the max weight limit has been set for a subnetwork.

Attributes

Name Type Composition
None u16 u16
None u16 u16

MinAllowedWeightSet

minimum allowed weight is set for a subnet.

Attributes

Name Type Composition
None u16 u16
None u16 u16

MinBurnSet

setting min burn on a network.

Attributes

Name Type Composition
None u16 u16
None u64 u64

MinDelegateTakeSet

minimum delegate take is set by sudo/admin transaction

Attributes

Name Type Composition
None u16 u16

MinDifficultySet

setting min difficulty on a network.

Attributes

Name Type Composition
None u16 u16
None u64 u64

NetworkAdded

a new network is added.

Attributes

Name Type Composition
None u16 u16
None u16 u16

NetworkImmunityPeriodSet

the network immunity period is set.

Attributes

Name Type Composition
None u64 u64

NetworkLockCostReductionIntervalSet

the lock cost reduction is set

Attributes

Name Type Composition
None u64 u64

NetworkMinLockCostSet

the network minimum locking cost is set.

Attributes

Name Type Composition
None u64 u64

NetworkRateLimitSet

the network creation rate limit is set.

Attributes

Name Type Composition
None u64 u64

NetworkRemoved

a network is removed.

Attributes

Name Type Composition
None u16 u16

NeuronRegistered

a new neuron account has been registered to the chain.

Attributes

Name Type Composition
None u16 u16
None u16 u16
None T::AccountId AccountId

PowRegistrationAllowed

POW registration is allowed/disallowed for a subnet.

Attributes

Name Type Composition
None u16 u16
None bool bool

PrometheusServed

the prometheus server information is added to the network.

Attributes

Name Type Composition
None u16 u16
None T::AccountId AccountId

RAORecycledForRegistrationSet

setting the RAO recycled for registration.

Attributes

Name Type Composition
None u16 u16
None u64 u64

RegistrationAllowed

registration is allowed/disallowed for a subnet.

Attributes

Name Type Composition
None u16 u16
None bool bool

RegistrationPerIntervalSet

registration per interval is set for a subnet.

Attributes

Name Type Composition
None u16 u16
None u16 u16

RhoSet

Rho value is set.

Attributes

Name Type Composition
None u16 u16
None u16 u16

ScalingLawPowerSet

the scaling law power has been set for a subnet.

Attributes

Name Type Composition
None u16 u16
None u16 u16

SenateAdjusted

a member of the senate is adjusted

Attributes

Name Type Composition
old_member Option<T::AccountId> (None, 'AccountId')
new_member T::AccountId AccountId

SenateRequiredStakePercentSet

setting the minimum required stake amount for senate registration.

Attributes

Name Type Composition
None u64 u64

ServingRateLimitSet

setting the prometheus serving rate limit.

Attributes

Name Type Composition
None u16 u16
None u64 u64

StakeAdded

stake has been transferred from the a coldkey account onto the hotkey staking account.

Attributes

Name Type Composition
None T::AccountId AccountId
None u64 u64

StakeRemoved

stake has been removed from the hotkey staking account onto the coldkey account.

Attributes

Name Type Composition
None T::AccountId AccountId
None u64 u64

SubnetLimitSet

the maximum number of subnets is set

Attributes

Name Type Composition
None u16 u16

SubnetOwnerCutSet

the subnet owner cut is set.

Attributes

Name Type Composition
None u16 u16

Sudid

a sudo call is done.

Attributes

Name Type Composition
None DispatchResult {'Ok': (), 'Err': {'Other': None, 'CannotLookup': None, 'BadOrigin': None, 'Module': {'index': 'u8', 'error': '[u8; 4]'}, 'ConsumerRemaining': None, 'NoProviders': None, 'TooManyConsumers': None, 'Token': ('FundsUnavailable', 'OnlyProvider', 'BelowMinimum', 'CannotCreate', 'UnknownAsset', 'Frozen', 'Unsupported', 'CannotCreateHold', 'NotExpendable', 'Blocked'), 'Arithmetic': ('Underflow', 'Overflow', 'DivisionByZero'), 'Transactional': ('LimitReached', 'NoLayer'), 'Exhausted': None, 'Corruption': None, 'Unavailable': None, 'RootNotAllowed': None}}

TakeDecreased

the take for a delegate is decreased.

Attributes

Name Type Composition
None T::AccountId AccountId
None T::AccountId AccountId
None u16 u16

TakeIncreased

the take for a delegate is increased.

Attributes

Name Type Composition
None T::AccountId AccountId
None T::AccountId AccountId
None u16 u16

TargetStakesPerIntervalSet

the target stakes per interval is set by sudo/admin transaction

Attributes

Name Type Composition
None u64 u64

TempoSet

setting tempo on a network

Attributes

Name Type Composition
None u16 u16
None u16 u16

TxDelegateTakeRateLimitSet

setting the delegate take transaction rate limit.

Attributes

Name Type Composition
None u64 u64

TxRateLimitSet

setting the transaction rate limit.

Attributes

Name Type Composition
None u64 u64

ValidatorPruneLenSet

the validator pruning length has been set.

Attributes

Name Type Composition
None u16 u16
None u64 u64

WeightsMinStake

min stake is set for validators to set weights.

Attributes

Name Type Composition
None u64 u64

WeightsSet

a caller successfully sets their weights on a subnetwork.

Attributes

Name Type Composition
None u16 u16
None u16 u16

WeightsSetRateLimitSet

weights set rate limit has been set for a subnet.

Attributes

Name Type Composition
None u16 u16
None u64 u64

WeightsVersionKeySet

weights version key is set for a network.

Attributes

Name Type Composition
None u16 u16
None u64 u64

Storage functions


Active

Python

result = substrate.query(
    'SubtensorModule', 'Active', ['u16']
)

Return value

['bool']

ActivityCutoff

Python

result = substrate.query(
    'SubtensorModule', 'ActivityCutoff', ['u16']
)

Return value

'u16'

AdjustmentAlpha

Python

result = substrate.query(
    'SubtensorModule', 'AdjustmentAlpha', ['u16']
)

Return value

'u64'

AdjustmentInterval

Python

result = substrate.query(
    'SubtensorModule', 'AdjustmentInterval', ['u16']
)

Return value

'u16'

AlphaValues

Python

result = substrate.query(
    'SubtensorModule', 'AlphaValues', ['u16']
)

Return value

('u16', 'u16')

ArbitrationPeriod

Python

result = substrate.query(
    'SubtensorModule', 'ArbitrationPeriod', []
)

Return value

'u64'

Axons

Python

result = substrate.query(
    'SubtensorModule', 'Axons', ['u16', 'AccountId']
)

Return value

{
    'block': 'u64',
    'ip': 'u128',
    'ip_type': 'u8',
    'placeholder1': 'u8',
    'placeholder2': 'u8',
    'port': 'u16',
    'protocol': 'u8',
    'version': 'u32',
}

BaseDifficulty

Python

result = substrate.query(
    'SubtensorModule', 'BaseDifficulty', []
)

Return value

'u64'

BlockAtRegistration

Python

result = substrate.query(
    'SubtensorModule', 'BlockAtRegistration', ['u16', 'u16']
)

Return value

'u64'

BlockEmission

Python

result = substrate.query(
    'SubtensorModule', 'BlockEmission', []
)

Return value

'u64'

BlocksSinceLastStep

Python

result = substrate.query(
    'SubtensorModule', 'BlocksSinceLastStep', ['u16']
)

Return value

'u64'

Bonds

Python

result = substrate.query(
    'SubtensorModule', 'Bonds', ['u16', 'u16']
)

Return value

[('u16', 'u16')]

BondsMovingAverage

Python

result = substrate.query(
    'SubtensorModule', 'BondsMovingAverage', ['u16']
)

Return value

'u64'

Burn

Python

result = substrate.query(
    'SubtensorModule', 'Burn', ['u16']
)

Return value

'u64'

BurnRegistrationsThisInterval

Python

result = substrate.query(
    'SubtensorModule', 'BurnRegistrationsThisInterval', ['u16']
)

Return value

'u16'

ColdkeyArbitrationBlock

Python

result = substrate.query(
    'SubtensorModule', 'ColdkeyArbitrationBlock', ['AccountId']
)

Return value

'u64'

ColdkeySwapDestinations

Python

result = substrate.query(
    'SubtensorModule', 'ColdkeySwapDestinations', ['AccountId']
)

Return value

['AccountId']

ColdkeysToSwapAtBlock

Python

result = substrate.query(
    'SubtensorModule', 'ColdkeysToSwapAtBlock', ['u64']
)

Return value

['AccountId']

CommitRevealWeightsEnabled

Python

result = substrate.query(
    'SubtensorModule', 'CommitRevealWeightsEnabled', ['u16']
)

Return value

'bool'

Consensus

Python

result = substrate.query(
    'SubtensorModule', 'Consensus', ['u16']
)

Return value

['u16']

Delegates

Python

result = substrate.query(
    'SubtensorModule', 'Delegates', ['AccountId']
)

Return value

'u16'

Difficulty

Python

result = substrate.query(
    'SubtensorModule', 'Difficulty', ['u16']
)

Return value

'u64'

Dividends

Python

result = substrate.query(
    'SubtensorModule', 'Dividends', ['u16']
)

Return value

['u16']

Emission

Python

result = substrate.query(
    'SubtensorModule', 'Emission', ['u16']
)

Return value

['u64']

EmissionValues

Python

result = substrate.query(
    'SubtensorModule', 'EmissionValues', ['u16']
)

Return value

'u64'

ImmunityPeriod

Python

result = substrate.query(
    'SubtensorModule', 'ImmunityPeriod', ['u16']
)

Return value

'u16'

Incentive

Python

result = substrate.query(
    'SubtensorModule', 'Incentive', ['u16']
)

Return value

['u16']

IsNetworkMember

Python

result = substrate.query(
    'SubtensorModule', 'IsNetworkMember', ['AccountId', 'u16']
)

Return value

'bool'

Kappa

Python

result = substrate.query(
    'SubtensorModule', 'Kappa', ['u16']
)

Return value

'u16'

Keys

Python

result = substrate.query(
    'SubtensorModule', 'Keys', ['u16', 'u16']
)

Return value

'AccountId'

LastAdjustmentBlock

Python

result = substrate.query(
    'SubtensorModule', 'LastAdjustmentBlock', ['u16']
)

Return value

'u64'

LastMechansimStepBlock

Python

result = substrate.query(
    'SubtensorModule', 'LastMechansimStepBlock', ['u16']
)

Return value

'u64'

LastTxBlock

Python

result = substrate.query(
    'SubtensorModule', 'LastTxBlock', ['AccountId']
)

Return value

'u64'

LastTxBlockDelegateTake

Python

result = substrate.query(
    'SubtensorModule', 'LastTxBlockDelegateTake', ['AccountId']
)

Return value

'u64'

LastUpdate

Python

result = substrate.query(
    'SubtensorModule', 'LastUpdate', ['u16']
)

Return value

['u64']

LiquidAlphaOn

Python

result = substrate.query(
    'SubtensorModule', 'LiquidAlphaOn', ['u16']
)

Return value

'bool'

LoadedEmission

Python

result = substrate.query(
    'SubtensorModule', 'LoadedEmission', ['u16']
)

Return value

[('AccountId', 'u64', 'u64')]

MaxAllowedUids

Python

result = substrate.query(
    'SubtensorModule', 'MaxAllowedUids', ['u16']
)

Return value

'u16'

MaxAllowedValidators

Python

result = substrate.query(
    'SubtensorModule', 'MaxAllowedValidators', ['u16']
)

Return value

'u16'

MaxBurn

Python

result = substrate.query(
    'SubtensorModule', 'MaxBurn', ['u16']
)

Return value

'u64'

MaxDifficulty

Python

result = substrate.query(
    'SubtensorModule', 'MaxDifficulty', ['u16']
)

Return value

'u64'

MaxRegistrationsPerBlock

Python

result = substrate.query(
    'SubtensorModule', 'MaxRegistrationsPerBlock', ['u16']
)

Return value

'u16'

MaxTake

Python

result = substrate.query(
    'SubtensorModule', 'MaxTake', []
)

Return value

'u16'

MaxWeightsLimit

Python

result = substrate.query(
    'SubtensorModule', 'MaxWeightsLimit', ['u16']
)

Return value

'u16'

MinAllowedWeights

Python

result = substrate.query(
    'SubtensorModule', 'MinAllowedWeights', ['u16']
)

Return value

'u16'

MinBurn

Python

result = substrate.query(
    'SubtensorModule', 'MinBurn', ['u16']
)

Return value

'u64'

MinDifficulty

Python

result = substrate.query(
    'SubtensorModule', 'MinDifficulty', ['u16']
)

Return value

'u64'

MinTake

Python

result = substrate.query(
    'SubtensorModule', 'MinTake', []
)

Return value

'u16'

NetworkImmunityPeriod

Python

result = substrate.query(
    'SubtensorModule', 'NetworkImmunityPeriod', []
)

Return value

'u64'

NetworkLastLockCost

Python

result = substrate.query(
    'SubtensorModule', 'NetworkLastLockCost', []
)

Return value

'u64'

NetworkLastRegistered

Python

result = substrate.query(
    'SubtensorModule', 'NetworkLastRegistered', []
)

Return value

'u64'

NetworkLockReductionInterval

Python

result = substrate.query(
    'SubtensorModule', 'NetworkLockReductionInterval', []
)

Return value

'u64'

NetworkMinAllowedUids

Python

result = substrate.query(
    'SubtensorModule', 'NetworkMinAllowedUids', []
)

Return value

'u16'

NetworkMinLockCost

Python

result = substrate.query(
    'SubtensorModule', 'NetworkMinLockCost', []
)

Return value

'u64'

NetworkModality

Python

result = substrate.query(
    'SubtensorModule', 'NetworkModality', ['u16']
)

Return value

'u16'

NetworkPowRegistrationAllowed

Python

result = substrate.query(
    'SubtensorModule', 'NetworkPowRegistrationAllowed', ['u16']
)

Return value

'bool'

NetworkRateLimit

Python

result = substrate.query(
    'SubtensorModule', 'NetworkRateLimit', []
)

Return value

'u64'

NetworkRegisteredAt

Python

result = substrate.query(
    'SubtensorModule', 'NetworkRegisteredAt', ['u16']
)

Return value

'u64'

NetworkRegistrationAllowed

Python

result = substrate.query(
    'SubtensorModule', 'NetworkRegistrationAllowed', ['u16']
)

Return value

'bool'

NetworksAdded

Python

result = substrate.query(
    'SubtensorModule', 'NetworksAdded', ['u16']
)

Return value

'bool'

NeuronsToPruneAtNextEpoch

Python

result = substrate.query(
    'SubtensorModule', 'NeuronsToPruneAtNextEpoch', ['u16']
)

Return value

'u16'

NominatorMinRequiredStake

Python

result = substrate.query(
    'SubtensorModule', 'NominatorMinRequiredStake', []
)

Return value

'u64'

OwnedHotkeys

Python

result = substrate.query(
    'SubtensorModule', 'OwnedHotkeys', ['AccountId']
)

Return value

['AccountId']

Owner

Python

result = substrate.query(
    'SubtensorModule', 'Owner', ['AccountId']
)

Return value

'AccountId'

POWRegistrationsThisInterval

Python

result = substrate.query(
    'SubtensorModule', 'POWRegistrationsThisInterval', ['u16']
)

Return value

'u16'

PendingEmission

Python

result = substrate.query(
    'SubtensorModule', 'PendingEmission', ['u16']
)

Return value

'u64'

Prometheus

Python

result = substrate.query(
    'SubtensorModule', 'Prometheus', ['u16', 'AccountId']
)

Return value

{
    'block': 'u64',
    'ip': 'u128',
    'ip_type': 'u8',
    'port': 'u16',
    'version': 'u32',
}

PruningScores

Python

result = substrate.query(
    'SubtensorModule', 'PruningScores', ['u16']
)

Return value

['u16']

RAORecycledForRegistration

Python

result = substrate.query(
    'SubtensorModule', 'RAORecycledForRegistration', ['u16']
)

Return value

'u64'

Rank

Python

result = substrate.query(
    'SubtensorModule', 'Rank', ['u16']
)

Return value

['u16']

RegistrationsThisBlock

Python

result = substrate.query(
    'SubtensorModule', 'RegistrationsThisBlock', ['u16']
)

Return value

'u16'

RegistrationsThisInterval

Python

result = substrate.query(
    'SubtensorModule', 'RegistrationsThisInterval', ['u16']
)

Return value

'u16'

Rho

Python

result = substrate.query(
    'SubtensorModule', 'Rho', ['u16']
)

Return value

'u16'

ScalingLawPower

Python

result = substrate.query(
    'SubtensorModule', 'ScalingLawPower', ['u16']
)

Return value

'u16'

SenateRequiredStakePercentage

Python

result = substrate.query(
    'SubtensorModule', 'SenateRequiredStakePercentage', []
)

Return value

'u64'

ServingRateLimit

Python

result = substrate.query(
    'SubtensorModule', 'ServingRateLimit', ['u16']
)

Return value

'u64'

Stake

Python

result = substrate.query(
    'SubtensorModule', 'Stake', ['AccountId', 'AccountId']
)

Return value

'u64'

StakeInterval

Python

result = substrate.query(
    'SubtensorModule', 'StakeInterval', []
)

Return value

'u64'

StakingHotkeys

Python

result = substrate.query(
    'SubtensorModule', 'StakingHotkeys', ['AccountId']
)

Return value

['AccountId']

SubnetLimit

Python

result = substrate.query(
    'SubtensorModule', 'SubnetLimit', []
)

Return value

'u16'

SubnetLocked

Python

result = substrate.query(
    'SubtensorModule', 'SubnetLocked', ['u16']
)

Return value

'u64'

SubnetOwner

Python

result = substrate.query(
    'SubtensorModule', 'SubnetOwner', ['u16']
)

Return value

'AccountId'

SubnetOwnerCut

Python

result = substrate.query(
    'SubtensorModule', 'SubnetOwnerCut', []
)

Return value

'u16'

SubnetworkN

Python

result = substrate.query(
    'SubtensorModule', 'SubnetworkN', ['u16']
)

Return value

'u16'

TargetRegistrationsPerInterval

Python

result = substrate.query(
    'SubtensorModule', 'TargetRegistrationsPerInterval', ['u16']
)

Return value

'u16'

TargetStakesPerInterval

Python

result = substrate.query(
    'SubtensorModule', 'TargetStakesPerInterval', []
)

Return value

'u64'

Tempo

Python

result = substrate.query(
    'SubtensorModule', 'Tempo', ['u16']
)

Return value

'u16'

TotalColdkeyStake

Python

result = substrate.query(
    'SubtensorModule', 'TotalColdkeyStake', ['AccountId']
)

Return value

'u64'

TotalHotkeyColdkeyStakesThisInterval

MAP (hot, cold) --> stake | Returns a tuple (u64: stakes, u64: block_number)

Python

result = substrate.query(
    'SubtensorModule', 'TotalHotkeyColdkeyStakesThisInterval', ['AccountId', 'AccountId']
)

Return value

('u64', 'u64')

TotalHotkeyStake

Python

result = substrate.query(
    'SubtensorModule', 'TotalHotkeyStake', ['AccountId']
)

Return value

'u64'

TotalIssuance

Python

result = substrate.query(
    'SubtensorModule', 'TotalIssuance', []
)

Return value

'u64'

TotalNetworks

Python

result = substrate.query(
    'SubtensorModule', 'TotalNetworks', []
)

Return value

'u16'

TotalStake

Python

result = substrate.query(
    'SubtensorModule', 'TotalStake', []
)

Return value

'u64'

Trust

Python

result = substrate.query(
    'SubtensorModule', 'Trust', ['u16']
)

Return value

['u16']

TxDelegateTakeRateLimit

Python

result = substrate.query(
    'SubtensorModule', 'TxDelegateTakeRateLimit', []
)

Return value

'u64'

TxRateLimit

Python

result = substrate.query(
    'SubtensorModule', 'TxRateLimit', []
)

Return value

'u64'

Uids

Python

result = substrate.query(
    'SubtensorModule', 'Uids', ['u16', 'AccountId']
)

Return value

'u16'

UsedWork

Python

result = substrate.query(
    'SubtensorModule', 'UsedWork', ['Bytes']
)

Return value

'u64'

ValidatorPermit

Python

result = substrate.query(
    'SubtensorModule', 'ValidatorPermit', ['u16']
)

Return value

['bool']

ValidatorPruneLen

Python

result = substrate.query(
    'SubtensorModule', 'ValidatorPruneLen', ['u16']
)

Return value

'u64'

ValidatorTrust

Python

result = substrate.query(
    'SubtensorModule', 'ValidatorTrust', ['u16']
)

Return value

['u16']

WeightCommitRevealInterval

Python

result = substrate.query(
    'SubtensorModule', 'WeightCommitRevealInterval', ['u16']
)

Return value

'u64'

WeightCommits

Python

result = substrate.query(
    'SubtensorModule', 'WeightCommits', ['u16', 'AccountId']
)

Return value

('scale_info::13', 'u64')

Weights

Python

result = substrate.query(
    'SubtensorModule', 'Weights', ['u16', 'u16']
)

Return value

[('u16', 'u16')]

WeightsMinStake

Python

result = substrate.query(
    'SubtensorModule', 'WeightsMinStake', []
)

Return value

'u64'

WeightsSetRateLimit

Python

result = substrate.query(
    'SubtensorModule', 'WeightsSetRateLimit', ['u16']
)

Return value

'u64'

WeightsVersionKey

Python

result = substrate.query(
    'SubtensorModule', 'WeightsVersionKey', ['u16']
)

Return value

'u64'

Constants


AlphaHigh

The upper bound for the alpha parameter. Used for Liquid Alpha.

Value

58982

Python

constant = substrate.get_constant('SubtensorModule', 'AlphaHigh')

AlphaLow

The lower bound for the alpha parameter. Used for Liquid Alpha.

Value

45875

Python

constant = substrate.get_constant('SubtensorModule', 'AlphaLow')

InitialActivityCutoff

Activity constant.

Value

5000

Python

constant = substrate.get_constant('SubtensorModule', 'InitialActivityCutoff')

InitialAdjustmentAlpha

Initial adjustment alpha on burn and pow.

Value

0

Python

constant = substrate.get_constant('SubtensorModule', 'InitialAdjustmentAlpha')

InitialAdjustmentInterval

Initial adjustment interval.

Value

100

Python

constant = substrate.get_constant('SubtensorModule', 'InitialAdjustmentInterval')

InitialBaseDifficulty

The base difficulty for proof of work for coldkey swaps

Value

10000000

Python

constant = substrate.get_constant('SubtensorModule', 'InitialBaseDifficulty')

InitialBondsMovingAverage

Initial bonds moving average.

Value

900000

Python

constant = substrate.get_constant('SubtensorModule', 'InitialBondsMovingAverage')

InitialBurn

Initial Burn.

Value

1000000000

Python

constant = substrate.get_constant('SubtensorModule', 'InitialBurn')

InitialDefaultTake

Initial default delegation take.

Value

11796

Python

constant = substrate.get_constant('SubtensorModule', 'InitialDefaultTake')

InitialDifficulty

Initial Difficulty.

Value

10000000

Python

constant = substrate.get_constant('SubtensorModule', 'InitialDifficulty')

InitialEmissionValue

Initial Emission Ratio.

Value

0

Python

constant = substrate.get_constant('SubtensorModule', 'InitialEmissionValue')

InitialImmunityPeriod

Immunity Period Constant.

Value

4096

Python

constant = substrate.get_constant('SubtensorModule', 'InitialImmunityPeriod')

InitialIssuance

================================= ==== Initial Value Constants ==== ================================= Initial currency issuance.

Value

0

Python

constant = substrate.get_constant('SubtensorModule', 'InitialIssuance')

InitialKappa

Kappa constant.

Value

32767

Python

constant = substrate.get_constant('SubtensorModule', 'InitialKappa')

InitialMaxAllowedUids

Max UID constant.

Value

4096

Python

constant = substrate.get_constant('SubtensorModule', 'InitialMaxAllowedUids')

InitialMaxAllowedValidators

Initial maximum allowed validators per network.

Value

128

Python

constant = substrate.get_constant('SubtensorModule', 'InitialMaxAllowedValidators')

InitialMaxBurn

Initial Max Burn.

Value

100000000000

Python

constant = substrate.get_constant('SubtensorModule', 'InitialMaxBurn')

InitialMaxDifficulty

Initial Max Difficulty.

Value

4611686018427387903

Python

constant = substrate.get_constant('SubtensorModule', 'InitialMaxDifficulty')

InitialMaxRegistrationsPerBlock

Initial max registrations per block.

Value

1

Python

constant = substrate.get_constant('SubtensorModule', 'InitialMaxRegistrationsPerBlock')

InitialMaxWeightsLimit

Initial max weight limit.

Value

1000

Python

constant = substrate.get_constant('SubtensorModule', 'InitialMaxWeightsLimit')

InitialMinAllowedWeights

Initial min allowed weights setting.

Value

1024

Python

constant = substrate.get_constant('SubtensorModule', 'InitialMinAllowedWeights')

InitialMinBurn

Initial Min Burn.

Value

1000000000

Python

constant = substrate.get_constant('SubtensorModule', 'InitialMinBurn')

InitialMinDifficulty

Initial Min Difficulty.

Value

10000000

Python

constant = substrate.get_constant('SubtensorModule', 'InitialMinDifficulty')

InitialMinTake

Initial minimum delegation take.

Value

5898

Python

constant = substrate.get_constant('SubtensorModule', 'InitialMinTake')

InitialNetworkImmunityPeriod

Initial network immunity period

Value

50400

Python

constant = substrate.get_constant('SubtensorModule', 'InitialNetworkImmunityPeriod')

InitialNetworkLockReductionInterval

Initial lock reduction interval.

Value

100800

Python

constant = substrate.get_constant('SubtensorModule', 'InitialNetworkLockReductionInterval')

InitialNetworkMinAllowedUids

Initial minimum allowed network UIDs

Value

128

Python

constant = substrate.get_constant('SubtensorModule', 'InitialNetworkMinAllowedUids')

InitialNetworkMinLockCost

Initial network minimum burn cost

Value

1000000000000

Python

constant = substrate.get_constant('SubtensorModule', 'InitialNetworkMinLockCost')

InitialNetworkRateLimit

Initial network creation rate limit

Value

7200

Python

constant = substrate.get_constant('SubtensorModule', 'InitialNetworkRateLimit')

InitialPruningScore

Initial pruning score for each neuron.

Value

65535

Python

constant = substrate.get_constant('SubtensorModule', 'InitialPruningScore')

InitialRAORecycledForRegistration

Initial RAO Recycled.

Value

0

Python

constant = substrate.get_constant('SubtensorModule', 'InitialRAORecycledForRegistration')

InitialRho

Rho constant.

Value

10

Python

constant = substrate.get_constant('SubtensorModule', 'InitialRho')

InitialScalingLawPower

Initial scaling law power.

Value

50

Python

constant = substrate.get_constant('SubtensorModule', 'InitialScalingLawPower')

InitialSenateRequiredStakePercentage

Initial percentage of total stake required to join senate.

Value

1

Python

constant = substrate.get_constant('SubtensorModule', 'InitialSenateRequiredStakePercentage')

InitialServingRateLimit

Initial serving rate limit.

Value

50

Python

constant = substrate.get_constant('SubtensorModule', 'InitialServingRateLimit')

InitialSubnetLimit

Initial max allowed subnets

Value

12

Python

constant = substrate.get_constant('SubtensorModule', 'InitialSubnetLimit')

InitialSubnetOwnerCut

Initial network subnet cut.

Value

11796

Python

constant = substrate.get_constant('SubtensorModule', 'InitialSubnetOwnerCut')

InitialTargetRegistrationsPerInterval

Initial target registrations per interval.

Value

2

Python

constant = substrate.get_constant('SubtensorModule', 'InitialTargetRegistrationsPerInterval')

InitialTargetStakesPerInterval

Initial target stakes per interval issuance.

Value

1

Python

constant = substrate.get_constant('SubtensorModule', 'InitialTargetStakesPerInterval')

InitialTempo

Tempo for each network.

Value

99

Python

constant = substrate.get_constant('SubtensorModule', 'InitialTempo')

InitialTxDelegateTakeRateLimit

Initial delegate take transaction rate limit.

Value

216000

Python

constant = substrate.get_constant('SubtensorModule', 'InitialTxDelegateTakeRateLimit')

InitialTxRateLimit

Initial transaction rate limit.

Value

1000

Python

constant = substrate.get_constant('SubtensorModule', 'InitialTxRateLimit')

InitialValidatorPruneLen

Initial validator context pruning length.

Value

1

Python

constant = substrate.get_constant('SubtensorModule', 'InitialValidatorPruneLen')

InitialWeightsVersionKey

Initial weights version key.

Value

0

Python

constant = substrate.get_constant('SubtensorModule', 'InitialWeightsVersionKey')

KeySwapCost

Cost of swapping a hotkey.

Value

1000000000

Python

constant = substrate.get_constant('SubtensorModule', 'KeySwapCost')

LiquidAlphaOn

A flag to indicate if Liquid Alpha is enabled.

Value

False

Python

constant = substrate.get_constant('SubtensorModule', 'LiquidAlphaOn')

Errors


AllNetworksInImmunity

All subnets are in the immunity period.


AlphaHighTooLow

Alpha high is too low: alpha_high > 0.8


AlphaLowOutOfRange

Alpha low is out of range: alpha_low > 0 && alpha_low < 0.8


BalanceWithdrawalError

The caller is trying to add stake, but for some reason the requested amount could not be withdrawn from the coldkey account.


CanNotSetRootNetworkWeights

Can not set weights for the root network.


ColdKeyAlreadyAssociated

The coldkey has already been swapped


ColdKeySwapTxRateLimitExceeded

The coldkey swap transaction rate limit exceeded


ColdkeyIsInArbitration

The coldkey is in arbitration


ColdkeySwapError

Error thrown on a coldkey swap.


CommitRevealDisabled

Attemtping to commit/reveal weights when disabled.


CommitRevealEnabled

Attempting to call set_weights when commit/reveal is enabled


CouldNotJoinSenate

Not able to join the senate.


DelegateTakeTooHigh

Delegate take is too high.


DelegateTakeTooLow

Delegate take is too low.


DelegateTxRateLimitExceeded

A transactor exceeded the rate limit for delegate transaction.


DuplicateColdkey

The new coldkey is already registered for the drain


DuplicateUids

The caller is attempting to set weights with duplicate UIDs in the weight matrix.


FaucetDisabled

Faucet is disabled.


HotKeyAccountNotExists

The hotkey does not exists


HotKeyAlreadyDelegate

The hotkey is attempting to become a delegate when the hotkey is already a delegate.


HotKeyAlreadyRegisteredInSubNet

The caller is requesting registering a neuron which already exists in the active set.


HotKeyNotDelegateAndSignerNotOwnHotKey

The hotkey is not a delegate and the signer is not the owner of the hotkey.


HotKeyNotRegisteredInNetwork

The hotkey is not registered in any subnet.


HotKeyNotRegisteredInSubNet

The hotkey is not registered in subnet


HotKeySetTxRateLimitExceeded

A transactor exceeded the rate limit for setting or swapping hotkey.


IncorrectWeightVersionKey

A validator is attempting to set weights from a validator with incorrect weight version.


InsufficientBalanceToPerformColdkeySwap

Insufficient Balance to Schedule coldkey swap


InvalidDifficulty

The supplied PoW hash block does not meet the network difficulty.


InvalidIpAddress

An invalid IP address is passed to the serve function.


InvalidIpType

The user is trying to serve an axon which is not of type 4 (IPv4) or 6 (IPv6).


InvalidPort

An invalid port is passed to the serve function.


InvalidRevealCommitHashNotMatch

Committed hash does not equal the hashed reveal data.


InvalidRevealCommitTempo

Not the correct block/range to reveal weights.


InvalidSeal

The supplied PoW hash seal does not match the supplied work.


InvalidWorkBlock

The supplied PoW hash block is in the future or negative.


LiquidAlphaDisabled

Attempting to set alpha high/low while disabled


MaxColdkeyDestinationsReached

The maximum number of coldkey destinations has been reached


MaxWeightExceeded

The dispatch is attempting to set weights on chain with weight value exceeding the MaxWeightLimit (max_weight_limit subnet hyperparameter).


NetworkTxRateLimitExceeded

A transactor exceeded the rate limit for add network transaction.


NeuronNoValidatorPermit

The caller is attempting to set non-self weights without being a permitted validator.


NewColdKeyIsSameWithOld

The new coldkey is the same as the old coldkey


NewHotKeyIsSameWithOld

The new hotkey is the same as old one


NoBalanceToTransfer

No balance to transfer


NoNeuronIdAvailable

No neuron ID is available.


NoWeightsCommitFound

No commit found for the provided hotkey+netuid combination when attempting to reveal the weights.


NomStakeBelowMinimumThreshold

Stake amount below the minimum threshold for nominator validations.


NonAssociatedColdKey

Request to stake, unstake or subscribe is made by a coldkey that is not associated with the hotkey account.


NotEnoughBalanceToPaySwapColdKey

The coldkey balance is not enough to pay for the swap


NotEnoughBalanceToPaySwapHotKey

Not enough balance to pay swapping hotkey.


NotEnoughBalanceToStake

The caller is requesting adding more stake than there exists in the coldkey account. See: "[add_stake()]"


NotEnoughStakeToSetWeights

The caller is requesting to set weights but the caller has less than minimum stake required to set weights (less than WeightsMinStake).


NotEnoughStakeToWithdraw

The caller is requesting removing more stake than there exists in the staking account. See: "[remove_stake()]".


NotExistColdkey

The coldkey does not exist


NotRootSubnet

Netuid does not match for setting root network weights.


NotSenateMember

A hotkey is attempting to do something only senate members can do.


NotSubnetOwner

Not a subnet owner.


RegistrationNotPermittedOnRootSubnet

Operation is not permitted on the root subnet.


RootNetworkDoesNotExist

The root network does not exist.


SameColdkey

Same coldkey


ServingRateLimitExceeded

An axon or prometheus serving exceeded the rate limit for a registered neuron.


SettingWeightsTooFast

A transactor exceeded the rate limit for setting weights.


StakeRateLimitExceeded

A transactor exceeded the rate limit for staking.


StakeToWithdrawIsZero

Stake amount to withdraw is zero.


StakeTooLowForRoot

A hotkey with too little stake is attempting to join the root subnet.


SubNetRegistrationDisabled

Registration is disabled.


SubNetworkDoesNotExist

The subnet does not exist.


TooManyRegistrationsThisBlock

Number of registrations in this block exceeds the allowed number (i.e., exceeds the subnet hyperparameter "max_regs_per_block").


TooManyRegistrationsThisInterval

The number of registration attempts exceeded the allowed number in the interval.


TransactorAccountShouldBeHotKey

The hotkey is required to be the origin.


UidVecContainInvalidOne

The caller is attempting to set weight to at least one UID that does not exist in the metagraph.


UidsLengthExceedUidsInSubNet

The caller is attempting to set weights with more UIDs than allowed.


UnstakeRateLimitExceeded

A transactor exceeded the rate limit for unstaking.


WeightVecLengthIsLow

The dispatch is attempting to set weights on chain with fewer elements than are allowed.


WeightVecNotEqualSize

The caller is attempting to set the weight keys and values but these vectors have different size.


WeightsCommitNotAllowed

Not allowed to commit weights.


ZeroBalanceAfterWithdrawn

Unsuccessfully withdraw, balance could be zero (can not make account exist) after withdrawal.