Skip to content

Commit 4dafd88

Browse files
constconst
authored andcommitted
swap hotkey benchmark removed
1 parent ca51109 commit 4dafd88

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

pallets/subtensor/src/benchmarks.rs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -314,33 +314,33 @@ benchmarks! {
314314
assert_ok!(Subtensor::<T>::register_network(RawOrigin::Signed(coldkey.clone()).into()));
315315
}: dissolve_network(RawOrigin::Signed(coldkey), 1)
316316

317-
swap_hotkey {
318-
let seed: u32 = 1;
319-
let coldkey: T::AccountId = account("Alice", 0, seed);
320-
let old_hotkey: T::AccountId = account("Bob", 0, seed);
321-
let new_hotkey: T::AccountId = account("Charlie", 0, seed);
322-
323-
let netuid = 1u16;
324-
Subtensor::<T>::init_new_network(netuid, 100);
325-
Subtensor::<T>::set_min_burn(netuid, 1);
326-
Subtensor::<T>::set_max_burn(netuid, 1);
327-
Subtensor::<T>::set_target_registrations_per_interval(netuid, 256);
328-
Subtensor::<T>::set_max_registrations_per_block(netuid, 256);
329-
330-
Subtensor::<T>::add_balance_to_coldkey_account(&coldkey.clone(), 10_000_000_000u64);
331-
assert_ok!(Subtensor::<T>::burned_register(RawOrigin::Signed(coldkey.clone()).into(), netuid, old_hotkey.clone()));
332-
assert_ok!(Subtensor::<T>::become_delegate(RawOrigin::Signed(coldkey.clone()).into(), old_hotkey.clone()));
333-
334-
let max_uids = Subtensor::<T>::get_max_allowed_uids(netuid) as u32;
335-
for i in 0..max_uids - 1 {
336-
let coldkey: T::AccountId = account("Axon", 0, i);
337-
let hotkey: T::AccountId = account("Hotkey", 0, i);
338-
339-
Subtensor::<T>::add_balance_to_coldkey_account(&coldkey.clone(), 10_000_000_000u64);
340-
assert_ok!(Subtensor::<T>::burned_register(RawOrigin::Signed(coldkey.clone()).into(), netuid, hotkey));
341-
assert_ok!(Subtensor::<T>::add_stake(RawOrigin::Signed(coldkey).into(), old_hotkey.clone(), 1_000_000_000));
342-
}
343-
}: _(RawOrigin::Signed(coldkey), old_hotkey, new_hotkey)
317+
// swap_hotkey {
318+
// let seed: u32 = 1;
319+
// let coldkey: T::AccountId = account("Alice", 0, seed);
320+
// let old_hotkey: T::AccountId = account("Bob", 0, seed);
321+
// let new_hotkey: T::AccountId = account("Charlie", 0, seed);
322+
323+
// let netuid = 1u16;
324+
// Subtensor::<T>::init_new_network(netuid, 100);
325+
// Subtensor::<T>::set_min_burn(netuid, 1);
326+
// Subtensor::<T>::set_max_burn(netuid, 1);
327+
// Subtensor::<T>::set_target_registrations_per_interval(netuid, 256);
328+
// Subtensor::<T>::set_max_registrations_per_block(netuid, 256);
329+
330+
// Subtensor::<T>::add_balance_to_coldkey_account(&coldkey.clone(), 10_000_000_000u64);
331+
// assert_ok!(Subtensor::<T>::burned_register(RawOrigin::Signed(coldkey.clone()).into(), netuid, old_hotkey.clone()));
332+
// assert_ok!(Subtensor::<T>::become_delegate(RawOrigin::Signed(coldkey.clone()).into(), old_hotkey.clone()));
333+
334+
// let max_uids = Subtensor::<T>::get_max_allowed_uids(netuid) as u32;
335+
// for i in 0..max_uids - 1 {
336+
// let coldkey: T::AccountId = account("Axon", 0, i);
337+
// let hotkey: T::AccountId = account("Hotkey", 0, i);
338+
339+
// Subtensor::<T>::add_balance_to_coldkey_account(&coldkey.clone(), 10_000_000_000u64);
340+
// assert_ok!(Subtensor::<T>::burned_register(RawOrigin::Signed(coldkey.clone()).into(), netuid, hotkey));
341+
// assert_ok!(Subtensor::<T>::add_stake(RawOrigin::Signed(coldkey).into(), old_hotkey.clone(), 1_000_000_000));
342+
// }
343+
// }: _(RawOrigin::Signed(coldkey), old_hotkey, new_hotkey)
344344

345345
commit_weights {
346346
let tempo: u16 = 1;

runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
139139
// `spec_version`, and `authoring_version` are the same between Wasm and native.
140140
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
141141
// the compatible custom types.
142-
spec_version: 165,
142+
spec_version: 164,
143143
impl_version: 1,
144144
apis: RUNTIME_API_VERSIONS,
145145
transaction_version: 1,

0 commit comments

Comments
 (0)