spec version 126
Breaking Changes
Moved:
set_weights
extrinsic has been moved toSubnetEmissionModule
fromSubspaceModule
.delegate_rootnet_control
extrinsic has been moved toSubnetEmissionModule
fromSubspaceModule
.- Some storages have been moved to
SubnetEmissionModule
fromSubspaceModule
:- WeightEncryptionMap
Deleted:
TrustRatio
New Storages Offchain Worker Module:
-
MeasuredStakeAmount
:- Description: The amount of actual consensus sum stake. Used for a simulated consensus.
- Type: StorageValue
- Default: 5%
-
IrrationalityDelta
:- Description: The amount of delta between cumulative copier dividends and cumulative delegator dividends.
- Type: StorageMap<u16, I64F64>
- Default: None (empty map)
Subnet Emission Module:
-
BannedDecryptionNodes
:- Description: A list of nodes that are banned from decrypting the network weights.
- Type: StorageMap<T::AccountId, u64>
- Default: None (empty map)
-
EncryptedWeights
:- Description: The encrypted weights of the network.
- Type: StorageDoubleMap<u16, u16, Vec>
- Default: None (empty map)
-
Authorities
:- Description: Association of signing public keys with associated rsa encryption public keys.
- Type: StorageValue<BoundedVec<(T::AccountId, PublicKey), T::MaxAuthorities>>
- Default: Empty BoundedVec
-
DecryptionNodes
:- Description: This storage is managed dynamically based on the do_keep_alive offchain worker call. It is built from the authorities storage.
- Type: StorageValue<Vec<DecryptionNodeInfo>>
- Default: Empty Vec
-
SubnetDecryptionData
:- Description: Decryption Node Info assigned to subnet, includes information about the decryption node responsible for the subnet.
- Type: StorageMap<u16, SubnetDecryptionInfo>
- Default: None (empty map)
-
DecryptionNodeCursor
:- Description: Cursor for the decryption node rotation.
- Type: StorageValue
- Default: 0
-
ConsensusParameters
:- Description: Stores all data needed to run consensus.
- Type: StorageDoubleMap<u16, u64, ConsensusParams>
- Default: None (empty map)
-
WeightEncryptionData
:- Description: Stores both the encrypted weight and hash of a validator on a subnet.
- Type: StorageDoubleMap<u16, u16, EncryptionMechanism>
- Default: None (empty double map)
-
DecryptionNodeBanQueue
:- Description: Queue of decryption nodes that will be banned next epoch.
- Type: StorageDoubleMap<u16, T::AccountId, u64>
- Default: None (empty double map)
Subspace Module:
-
MaxEncryptionPeriod
:- Description: The maximum amount of blocks weights can stay encrypted for, a specific subnet.
- Type: StorageMap<u16, u64>
- Default: 2000
- • Part of
SubnetParams
struct, can be updated by the subnet owner
-
CopierMargin
:- Description: Allowed percentage profit margin of rationality above full irrationality for the weight copying strategy.
- Type: StorageMap<u16, I64F64>
- Default: 0
- • Part of
SubnetParams
struct, can be updated by the subnet owner
-
UseWeightsEncryption
:- Description: A flag to enable or disable weights encryption for a specific subnet.
- Type: StorageMap<u16, bool>
- Default: None (empty map)
- • Part of
SubnetParams
struct, can be updated by the subnet owner
-
AlphaValues
:- Description: The alpha values for liquid alpha.
- Type: StorageMap<u16, (u16, u16)>
- Default: (45875, 58982)
New Extrinsics
set_weights_encrypted
inSubnetEmissionModule
New Offchain Worker Extrinsics These extrinsics are meant to be called by offchain workers only and should not be invoked directly:
send_decrypted_weights
inOffworkerModule
send_ping
inOffworkerModule
New Root-Only Extrinsic
add_authorities
inOffworkerModule
Other Changes
- introducing weight copying prevention
- evm functionality was fixed
- linear consensus and yuma consensus were refactored to reuse parts of the same code
- migration of weights to subnet emission module
- general codebase refactor
spec version 125
updated metadata removal variable
spec version 124
enforcing whitelist on genral subnet, lowering the min weights to 1
spec version 123
fix metadata removal upon module registration
spec version 122
- Fixed subnet 2 curator applications
- Deregistered extra modules on subnet 2
- Removed Python-related things from flake
spec version 121
Fixing InsufficientStake
bug in proposal voting
spec version 120
Storages:
MinValidatorStake
storage map introduced: This is a subnet parameter that sets the minimum stake an individual needs to be considered a potential validator on that subnet.MaxAllowedValidators
storage map introduced: This is a subnet parameter that allows subnet owners to control the maximum number of validators on their subnet.MinImmunityStake
storage removed: Replaced by the new logic withMinValidatorStake
.SubnetMetadata
storage map introduced: Maps subnet id to metadata (u16 to BoundedVec<u8, ConstU32<59>>).BurnConfig
storage value removed: Replaced by subnet-specific burn configurations.ModuleBurnConfig
storage map introduced: Maps u16 to GeneralBurnConfiguration for module-specific burn parameters.TargetRegistrationsInterval
storage map removed: Integrated into ModuleBurnConfig.TargetRegistrationsPerInterval
storage map removed: Integrated into ModuleBurnConfig.AdjustmentAlpha
storage map removed: Integrated into ModuleBurnConfig.MaxRegistrationsPerInterval
storage map removed: Integrated into ModuleBurnConfig.DelegationFee
storage map is now bounded to a key and is global (does not take the netuid parameter)
Extrinsics:
register
now does not takenetwork_name
register_subnet
extrinsic now registers a subnet and takes
origin: OriginFor<T>,
name: Vec<u8>,
metadata: Option<Vec<u8>>,
add_global_params_proposal
no longer takesmin_burn
andmax_burn
update_subnet
now takesmin_burn
andmax_burn
'spec_version' 118-119
This branch starts off of the commit hash 95e5d26b550839c24fd367090e02abaa37df3d32
.
diff here
-
Error type
NotRegistered
was renamed toModuleDoesNotExist
. -
Error
InvalidSubnetStakeThreshold
removed. -
Storage value changes:
- MaximumSetWeightCallsPerEpoch lost its
ValueQuery
behavior and returns anOption<u16>
now instead of 0 if missing. SubnetEmission
,PendingEmission
andUnitEmission
were moved to the new subnet_emission pallet.StakeFrom
andStakeTo
lost their subnet id key. Because of this the value type changed fromBTreeMap<T::AcountId,u64>
to justu64
. Their new type isStorageDoubleMap<T::AccountId, T::AcountId, u64>
(other generics ommited for clarity).TotalStake
lost its subnet id key and turned into a simpleStorageValue<u64>
(other generics ommited for clarity).Stake
storage value was removed.MinStake
storage map / subnet parameter was removedSubnetImmunityPeriod
storage value / global parameter was introducedSubnetRegistrationBlock
storage map was introducedTotalSubnets
storage value was removedRootnetControlDelegation
: MAP (netuid, module_key) -> control_delegation, storage map was introduced, which stores information fromdelegate_rootnet_control
extrinsic.MinimumAllowedStake
was introduced. Users cannot stake or unstake a value smaller than this minimum.MinImmunityStake
was introduced. This value is a subnet parameter that can be changed by the subnet owner. A validator (key) with delegated stake higher than or equal to this value is immune to deregistrations. This aims to reduce sudden validator deregistrations, with adaptability to subnet owner's consensus.
- MaximumSetWeightCallsPerEpoch lost its
-
Extrinsics changes:
add_stake
,remove_stake
,add_stake_multiple
,remove_stake_multiple
andtransfer_stake
lost their subnet id parameter.register
no longer takes thestake
parameter- New extrinsic
delegate_rootnet_control: target: T::AccountId,
: Rootnet validators are capable of calling this extrinsic. The weight setting of the calling validator is delegated to the specified target (another validator making rootnet decisions on behalf).
spec_version: 117
This version delivers on the GovernanceProposal.f
This pallet now holds ALL governance-related storages and extrinsics.
DaoTreasury
is now DaoTreasuryAddress
.
This means that the DAO treasury is now a regular wallet address. You can query its balance or send funds to it.
- The following proposal names have been changed:
add_global_params_proposal
add_subnet_params_proposal
add_global_custom_proposal
add_subnet_custom_proposal
The proposals struct keys are now
['id', 'proposer', 'expiration_block', 'data', 'status', 'metadata', 'proposal_cost', 'creation_block']
- Parameter proposals now require at least 40% of the network's or subnet's stake to execute.
- Custom proposals remain at 50%.
- Proposals are resolved at the time of their expiration, not after reaching enough participation.
- Previously, only a maximum of 50% of the network's stake could participate in a proposal. Now, this can be up to 100%.
- The relevant factor is whether the proposal reached the execution threshold at the time of its expiration.
Governance participants are now motivated to participate in governance actions by being allocated rewards, which are funded from the DAO Treasury Address.
The maximum reward allocation per proposal is 10,000 $COMAI (split across the users), with a dynamic decay based on the number of proposals that occurred within the proposal_reward_interval
. After this interval is finished, the allocation decay is restarted.
By default, all users delegate their voting power to the validator they stake to (this is not the case for the validators themselves, who manage this voting power). If you are not comfortable with a validator managing your voting power, you can always toggle this off and on by calling one of the two extrinsics:
- To disable the delegation:
#[pallet::call_index(8)]
#[pallet::weight((Weight::zero(), DispatchClass::Normal, Pays::No))]
pub fn disable_vote_power_delegation(origin: OriginFor<T>) -> DispatchResult {
let key = ensure_signed(origin)?;
Self::update_delegating_voting_power(&key, false)
}
- To enable the delegation:
#[pallet::call_index(7)]
#[pallet::weight((Weight::zero(), DispatchClass::Normal, Pays::No))]
pub fn enable_vote_power_delegation(origin: OriginFor<T>) -> DispatchResult {
let key = ensure_signed(origin)?;
Self::update_delegating_voting_power(&key, true)
}
Note that if you delegate voting power to a validator, the validator will be the one receiving the voting rewards, not you as a delegator.
All of the core functions in the on-initialize hook should now be written in much robust way, to avoid possible panics.
- Adjustement alpha is moving from global parameteres to subnet parameters.
- Moving the
MinBurn
andMaxBurn
storage values to a single storage value, that can be queried atBurnConfig
. - Moving
VoteModeSubne
mode to a GovernanceModule and StorageMapSubnetGovernanceConfig
.
The subnet owner fee floor is now 16%, with subnet 0 taking 20% (of the subnet emission allocated to the treasury) to motivate subnet staking. Old values Floor 8%, SN0 12%.
- Bumps all substrate versions and node to new versions
- Removed the ethereum and EVM pallets
- Fixed max allowed modules
- Fixed panic on YUMA
Fixing migration
Spec version: 114
- Moving Dao Treasury to a normal chain account
- The
GlobalDaoTreasury
will get deleted in the next release, currently used only for migration.
- The
- Deleted, or moved useless code and values of:
- Burn rate (global parameter)
- Min Stake (global parameter)
- The following storage values were deleted and are now accessible through
BurnConfig
:MinBurn
MaxBurn
- The storage value
RemovedSubnets
is now calledSubnetGaps
- Moved Adjustment Alpha parameter under the
SubnetParams
so that subnet owners, can adjust this value at runtime.
Fixing migration
Spec version 114
- Moved global parameters, of:
target_registration_interval
target_registration_per_interval
To subnet owner control
- Decreased
MaxRegistrationPerBlock
from5
->3
- Introduced a new SubnetParam
MaxRegistrationsPerInterval
, which defines how many registraions pertarget_registration_interval
can happen, above are rate limited.
Spec version 114
- Moved global parameters, of:
target_registration_interval
target_registration_per_interval
To subnet owner control
- Decreased
MaxRegistrationPerBlock
from5
->3
- Introduced a new SubnetParam
MaxRegistrationsPerInterval
, which defines how many registraions pertarget_registration_interval
can happen, above are rate limited.
Spec version: 113
- Fix s0 whitelist application cost
Spec version: 112
- Fix total active subnet stake calculation.
Spec version: 111
- Adding log messages.
Spec version: 110
- Introducing minimum founder share.
- DAO treasury.