Adds documentation for pallet_subtensor::TotalIssuance
Introduces new storage item TotalSubnetLocked to track the total amount of tokens locked for subnet registration
Introduces new admin-util extrinsic to initialise the new TotalSubnetLocked value
Introduces new extrinsic rejig_total_issuance that sets the pallet_subtensor::TotalIssuance to the sum of issued tokens, staked tokens, and tokens locked for subnet registration
This is an O(1) operation, enabled by us adding TotalSubnetLocked
Adjusts set_subnet_locked_balance to update TotalSubnetLocked to reflect changes in SubnetLocked
Creates custom on_nonzero_unbalanced handler for transaction fees, which will remove the burnt transaction fee amount from pallet_subtensor::TotalIssuance before finally dropping it
Tested on localnet
Adds try-state checks for
TotalStake
TotalSubnetLock
TotalIssuance
Note: We will not test these in CI until we initialise the total subnet lock and rejig the total issuance, otherwise they fail.
Machinery for #563
pallet_subtensor::TotalIssuance
TotalSubnetLocked
to track the total amount of tokens locked for subnet registrationTotalSubnetLocked
valuerejig_total_issuance
that sets thepallet_subtensor::TotalIssuance
to the sum of issued tokens, staked tokens, and tokens locked for subnet registrationTotalSubnetLocked
set_subnet_locked_balance
to updateTotalSubnetLocked
to reflect changes inSubnetLocked
on_nonzero_unbalanced
handler for transaction fees, which will remove the burnt transaction fee amount frompallet_subtensor::TotalIssuance
before finally dropping ittry-state
checks forTotalStake
TotalSubnetLock
TotalIssuance