diff --git a/pallets/subtensor/src/coinbase/root.rs b/pallets/subtensor/src/coinbase/root.rs index 83567b6f57..7412d61aab 100644 --- a/pallets/subtensor/src/coinbase/root.rs +++ b/pallets/subtensor/src/coinbase/root.rs @@ -312,7 +312,6 @@ impl Pallet { // --- 14. Locks & toggles. TransferToggle::::remove(netuid); SubnetLocked::::remove(netuid); - LargestLocked::::remove(netuid); // --- 15. Mechanism step / emissions bookkeeping. FirstEmissionBlockNumber::::remove(netuid); diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index 6ae43ac384..0d59a6e640 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -1111,10 +1111,6 @@ pub mod pallet { DefaultZeroU64, >; - /// Ensures unique IDs for StakeJobs storage map - #[pallet::storage] - pub type NextStakeJobId = StorageValue<_, u64, ValueQuery, DefaultZeroU64>; - /// ============================ /// ==== Staking Variables ==== /// ============================ @@ -1496,10 +1492,6 @@ pub mod pallet { /// ============================ /// ==== Global Parameters ===== /// ============================ - /// --- StorageItem Global Used Work. - #[pallet::storage] - pub type UsedWork = StorageMap<_, Identity, Vec, u64, ValueQuery>; - /// --- ITEM( global_max_registrations_per_block ) #[pallet::storage] pub type MaxRegistrationsPerBlock = @@ -1571,11 +1563,6 @@ pub mod pallet { pub type SubnetLocked = StorageMap<_, Identity, NetUid, TaoCurrency, ValueQuery, DefaultZeroTao>; - /// --- MAP ( netuid ) --> largest_locked - #[pallet::storage] - pub type LargestLocked = - StorageMap<_, Identity, NetUid, u64, ValueQuery, DefaultZeroU64>; - /// ================= /// ==== Tempos ===== /// ================= diff --git a/pallets/subtensor/src/macros/genesis.rs b/pallets/subtensor/src/macros/genesis.rs index 0014b63540..7416998c5e 100644 --- a/pallets/subtensor/src/macros/genesis.rs +++ b/pallets/subtensor/src/macros/genesis.rs @@ -90,7 +90,6 @@ mod genesis { NetworkRegistrationAllowed::::insert(netuid, true); SubnetOwner::::insert(netuid, hotkey.clone()); SubnetLocked::::insert(netuid, TaoCurrency::from(1)); - LargestLocked::::insert(netuid, 1); Alpha::::insert( // Lock the initial funds making this key the owner. (hotkey.clone(), hotkey.clone(), netuid), diff --git a/pallets/subtensor/src/subnets/registration.rs b/pallets/subtensor/src/subnets/registration.rs index a7771857bb..75a95b1a7f 100644 --- a/pallets/subtensor/src/subnets/registration.rs +++ b/pallets/subtensor/src/subnets/registration.rs @@ -288,10 +288,9 @@ impl Pallet { Error::::InvalidDifficulty ); // Check that the work meets difficulty. - // --- 9. Check Work is the product of the nonce, the block number, and hotkey. Add this as used work. + // --- 9. Check Work is the product of the nonce, the block number, and hotkey. let seal: H256 = Self::create_seal_hash(block_number, nonce, &hotkey); ensure!(seal == work_hash, Error::::InvalidSeal); - UsedWork::::insert(work.clone(), current_block_number); // --- 10. If the network account does not exist we will create it here. Self::create_account_if_non_existent(&coldkey, &hotkey); @@ -367,10 +366,9 @@ impl Pallet { Error::::InvalidDifficulty ); // Check that the work meets difficulty. - // --- 4. Check Work is the product of the nonce, the block number, and hotkey. Add this as used work. + // --- 4. Check Work is the product of the nonce, the block number, and hotkey. let seal: H256 = Self::create_seal_hash(block_number, nonce, &coldkey); ensure!(seal == work_hash, Error::::InvalidSeal); - UsedWork::::insert(work.clone(), current_block_number); // --- 5. Add Balance via faucet. let balance_to_add: u64 = 1_000_000_000_000; diff --git a/pallets/subtensor/src/tests/networks.rs b/pallets/subtensor/src/tests/networks.rs index 4605ac8bef..454d0e3540 100644 --- a/pallets/subtensor/src/tests/networks.rs +++ b/pallets/subtensor/src/tests/networks.rs @@ -375,7 +375,6 @@ fn dissolve_clears_all_per_subnet_storages() { // Subnet locks TransferToggle::::insert(net, true); SubnetLocked::::insert(net, TaoCurrency::from(1)); - LargestLocked::::insert(net, 1u64); // Subnet parameters & pending counters FirstEmissionBlockNumber::::insert(net, 1u64); @@ -535,7 +534,6 @@ fn dissolve_clears_all_per_subnet_storages() { // Subnet locks assert!(!TransferToggle::::contains_key(net)); assert!(!SubnetLocked::::contains_key(net)); - assert!(!LargestLocked::::contains_key(net)); // Subnet parameters & pending counters assert!(!FirstEmissionBlockNumber::::contains_key(net));