Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions pallets/admin-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ pub mod pallet {
Weight::from_parts(14_000_000, 0)
.saturating_add(<T as frame_system::Config>::DbWeight::get().writes(1)),
DispatchClass::Operational,
Pays::No
Pays::Yes
))]
pub fn sudo_set_subnet_limit(origin: OriginFor<T>, max_subnets: u16) -> DispatchResult {
ensure_root(origin)?;
Expand Down Expand Up @@ -1639,7 +1639,12 @@ pub mod pallet {
/// # Weight
/// Weight is handled by the `#[pallet::weight]` attribute.
#[pallet::call_index(64)]
#[pallet::weight((0, DispatchClass::Operational, Pays::No))]
#[pallet::weight((
Weight::from_parts(3_918_000, 0) // TODO: add benchmarks
.saturating_add(T::DbWeight::get().writes(1_u64)),
DispatchClass::Operational,
Pays::Yes
))]
pub fn sudo_set_subnet_owner_hotkey(
origin: OriginFor<T>,
netuid: NetUid,
Expand Down
8 changes: 4 additions & 4 deletions pallets/subtensor/src/macros/dispatches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ mod dispatches {
/// - Attempting to set weights with max value exceeding limit.
#[pallet::call_index(0)]
#[pallet::weight((Weight::from_parts(15_540_000_000, 0)
.saturating_add(T::DbWeight::get().reads(4112_u64))
.saturating_add(T::DbWeight::get().reads(4111_u64))
.saturating_add(T::DbWeight::get().writes(2)), DispatchClass::Normal, Pays::No))]
pub fn set_weights(
origin: OriginFor<T>,
Expand Down Expand Up @@ -1227,7 +1227,7 @@ mod dispatches {
#[pallet::call_index(59)]
#[pallet::weight((Weight::from_parts(235_400_000, 0)
.saturating_add(T::DbWeight::get().reads(39_u64))
.saturating_add(T::DbWeight::get().writes(57_u64)), DispatchClass::Normal, Pays::Yes))]
.saturating_add(T::DbWeight::get().writes(56_u64)), DispatchClass::Normal, Pays::Yes))]
pub fn register_network(origin: OriginFor<T>, hotkey: T::AccountId) -> DispatchResult {
Self::do_register_network(origin, &hotkey, 1, None)
}
Expand Down Expand Up @@ -1514,7 +1514,7 @@ mod dispatches {
#[pallet::call_index(79)]
#[pallet::weight((Weight::from_parts(234_200_000, 0)
.saturating_add(T::DbWeight::get().reads(38_u64))
.saturating_add(T::DbWeight::get().writes(56_u64)), DispatchClass::Normal, Pays::Yes))]
.saturating_add(T::DbWeight::get().writes(55_u64)), DispatchClass::Normal, Pays::Yes))]
pub fn register_network_with_identity(
origin: OriginFor<T>,
hotkey: T::AccountId,
Expand Down Expand Up @@ -2304,7 +2304,7 @@ mod dispatches {
#[pallet::call_index(120)]
#[pallet::weight((Weight::from_parts(119_000_000, 0)
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(31)), DispatchClass::Operational, Pays::No))]
.saturating_add(T::DbWeight::get().writes(31)), DispatchClass::Operational, Pays::Yes))]
pub fn root_dissolve_network(origin: OriginFor<T>, netuid: NetUid) -> DispatchResult {
ensure_root(origin)?;
Self::do_dissolve_network(netuid)
Expand Down