Skip to content

Commit ea547ea

Browse files
committed
Merge remote-tracking branch 'origin/devnet-ready' into devnet
2 parents d9779a8 + 2112d58 commit ea547ea

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

pallets/subtensor/src/benchmarks.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,10 @@ mod pallet_benchmarks {
741741
Subtensor::<T>::init_new_network(netuid, 1);
742742

743743
let burn_fee = Subtensor::<T>::get_burn_as_u64(netuid);
744-
let stake_tao: u64 = DefaultMinStake::<T>::get();
744+
let min_stake: u64 = DefaultMinStake::<T>::get();
745+
let fee = min_stake;
746+
let stake_tao = min_stake.saturating_add(fee);
747+
745748
let deposit = burn_fee.saturating_mul(2).saturating_add(stake_tao);
746749
Subtensor::<T>::add_balance_to_coldkey_account(&coldkey, deposit);
747750

@@ -919,7 +922,9 @@ mod pallet_benchmarks {
919922
Subtensor::<T>::init_new_network(netuid, 1);
920923

921924
let reg_fee = Subtensor::<T>::get_burn_as_u64(netuid);
922-
let stake_tao: u64 = DefaultMinStake::<T>::get();
925+
let min_stake: u64 = DefaultMinStake::<T>::get();
926+
let fee = min_stake;
927+
let stake_tao = min_stake.saturating_add(fee);
923928
let deposit = reg_fee.saturating_mul(2).saturating_add(stake_tao);
924929
Subtensor::<T>::add_balance_to_coldkey_account(&coldkey, deposit);
925930

@@ -974,7 +979,9 @@ mod pallet_benchmarks {
974979
Subtensor::<T>::init_new_network(netuid2, 1);
975980

976981
let reg_fee = Subtensor::<T>::get_burn_as_u64(netuid1);
977-
let stake_tao: u64 = DefaultMinStake::<T>::get();
982+
let min_stake: u64 = DefaultMinStake::<T>::get();
983+
let fee = min_stake;
984+
let stake_tao = min_stake.saturating_add(fee);
978985
let deposit = reg_fee.saturating_mul(2).saturating_add(stake_tao);
979986
Subtensor::<T>::add_balance_to_coldkey_account(&coldkey, deposit);
980987

pallets/subtensor/src/macros/dispatches.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ mod dispatches {
11951195
#[pallet::call_index(59)]
11961196
#[pallet::weight((Weight::from_parts(260_500_000, 0)
11971197
.saturating_add(T::DbWeight::get().reads(36))
1198-
.saturating_add(T::DbWeight::get().writes(51)), DispatchClass::Operational, Pays::No))]
1198+
.saturating_add(T::DbWeight::get().writes(52)), DispatchClass::Operational, Pays::No))]
11991199
pub fn register_network(origin: OriginFor<T>, hotkey: T::AccountId) -> DispatchResult {
12001200
Self::do_register_network(origin, &hotkey, 1, None)
12011201
}
@@ -1540,7 +1540,7 @@ mod dispatches {
15401540
#[pallet::call_index(79)]
15411541
#[pallet::weight((Weight::from_parts(239_700_000, 0)
15421542
.saturating_add(T::DbWeight::get().reads(35))
1543-
.saturating_add(T::DbWeight::get().writes(50)), DispatchClass::Operational, Pays::No))]
1543+
.saturating_add(T::DbWeight::get().writes(51)), DispatchClass::Operational, Pays::No))]
15441544
pub fn register_network_with_identity(
15451545
origin: OriginFor<T>,
15461546
hotkey: T::AccountId,

runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
218218
// `spec_version`, and `authoring_version` are the same between Wasm and native.
219219
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
220220
// the compatible custom types.
221-
spec_version: 288,
221+
spec_version: 289,
222222
impl_version: 1,
223223
apis: RUNTIME_API_VERSIONS,
224224
transaction_version: 1,

0 commit comments

Comments
 (0)