SubnetHyperparams
Composite 656 v393pallet_subtensor::rpc_info::subnet_info::SubnetHyperparams
About This Type
Structured type: SubnetHyperparams.
A struct-like type where each field is encoded in declaration order.
Encoding: Fields encoded consecutively in declaration order, no field names or separators.
Fields (27)
| # | Name | Type |
|---|---|---|
| 0 | rho | Compact<u16> |
| 1 | kappa | Compact<u16> |
| 2 | immunity_period | Compact<u16> |
| 3 | min_allowed_weights | Compact<u16> |
| 4 | max_weights_limit | Compact<u16> |
| 5 | tempo | Compact<u16> |
| 6 | min_difficulty | Compact<u64> |
| 7 | max_difficulty | Compact<u64> |
| 8 | weights_version | Compact<u64> |
| 9 | weights_rate_limit | Compact<u64> |
| 10 | adjustment_interval | Compact<u16> |
| 11 | activity_cutoff | Compact<u16> |
| 12 | registration_allowed | bool |
| 13 | target_regs_per_interval | Compact<u16> |
| 14 | min_burn | Compact<u64> |
| 15 | max_burn | Compact<u64> |
| 16 | bonds_moving_avg | Compact<u64> |
| 17 | max_regs_per_block | Compact<u16> |
| 18 | serving_rate_limit | Compact<u64> |
| 19 | max_validators | Compact<u16> |
| 20 | adjustment_alpha | Compact<u64> |
| 21 | difficulty | Compact<u64> |
| 22 | commit_reveal_period | Compact<u64> |
| 23 | commit_reveal_weights_enabled | bool |
| 24 | alpha_high | Compact<u16> |
| 25 | alpha_low | Compact<u16> |
| 26 | liquid_alpha_enabled | bool |
SCALE Encoding
- Rule
- 27 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 27 fields = rho: Compact<u16>, kappa: Compact<u16>, immunity_period: Compact<u16>, min_allowed_weights: Compact<u16>, max_weights_limit: Compact<u16>, tempo: Compact<u16>, min_difficulty: Compact<u64>, max_difficulty: Compact<u64>, weights_version: Compact<u64>, weights_rate_limit: Compact<u64>, adjustment_interval: Compact<u16>, activity_cutoff: Compact<u16>, registration_allowed: bool, target_regs_per_interval: Compact<u16>, min_burn: Compact<u64>, max_burn: Compact<u64>, bonds_moving_avg: Compact<u64>, max_regs_per_block: Compact<u16>, serving_rate_limit: Compact<u64>, max_validators: Compact<u16>, adjustment_alpha: Compact<u64>, difficulty: Compact<u64>, commit_reveal_period: Compact<u64>, commit_reveal_weights_enabled: bool, alpha_high: Compact<u16>, alpha_low: Compact<u16>, liquid_alpha_enabled: bool
0x<field0><field1><field2><field3><field4><field5><field6><field7><field8><field9><field10><field11><field12><field13><field14><field15><field16><field17><field18><field19><field20><field21><field22><field23><field24><field25><field26>field 0 rho: Compact<u16>field 1 kappa: Compact<u16>field 2 immunity_period: Compact<u16>field 3 min_allowed_weights: Compact<u16>field 4 max_weights_limit: Compact<u16>field 5 tempo: Compact<u16>field 6 min_difficulty: Compact<u64>field 7 max_difficulty: Compact<u64>field 8 weights_version: Compact<u64>field 9 weights_rate_limit: Compact<u64>field 10 adjustment_interval: Compact<u16>field 11 activity_cutoff: Compact<u16>field 12 registration_allowed: boolfield 13 target_regs_per_interval: Compact<u16>field 14 min_burn: Compact<u64>field 15 max_burn: Compact<u64>field 16 bonds_moving_avg: Compact<u64>field 17 max_regs_per_block: Compact<u16>field 18 serving_rate_limit: Compact<u64>field 19 max_validators: Compact<u16>field 20 adjustment_alpha: Compact<u64>field 21 difficulty: Compact<u64>field 22 commit_reveal_period: Compact<u64>field 23 commit_reveal_weights_enabled: boolfield 24 alpha_high: Compact<u16>field 25 alpha_low: Compact<u16>field 26 liquid_alpha_enabled: boolCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode SubnetHyperparams
const value = registry.createType("SubnetHyperparams", {
rho: 0,
kappa: 0,
immunity_period: 0,
min_allowed_weights: 0,
max_weights_limit: 0,
tempo: 0,
min_difficulty: 0,
max_difficulty: 0,
weights_version: 0,
weights_rate_limit: 0,
adjustment_interval: 0,
activity_cutoff: 0,
registration_allowed: true,
target_regs_per_interval: 0,
min_burn: 0,
max_burn: 0,
bonds_moving_avg: 0,
max_regs_per_block: 0,
serving_rate_limit: 0,
max_validators: 0,
adjustment_alpha: 0,
difficulty: 0,
commit_reveal_period: 0,
commit_reveal_weights_enabled: true,
alpha_high: 0,
alpha_low: 0,
liquid_alpha_enabled: true
});
console.log("Hex:", value.toHex());Referenced By (1)
Type Information
- Type ID
- 656
- Kind
- Composite
- Path
- pallet_subtensor::rpc_info::subnet_info::SubnetHyperparams
- Runtime
- v393