Skip to content

Commit e7def5d

Browse files
authored
Merge branch 'devnet-ready' into reveal-tl-commitments-weights
2 parents 6912434 + 032cd5e commit e7def5d

File tree

13 files changed

+5
-576
lines changed

13 files changed

+5
-576
lines changed

Cargo.lock

Lines changed: 0 additions & 94 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ pub enum ProxyType {
154154
Registration,
155155
Transfer,
156156
SmallTransfer,
157-
RootWeights,
157+
RootWeights, // deprecated
158158
ChildKeys,
159159
SudoUncheckedSetCode,
160160
SwapHotkey,

pallets/admin-utils/src/lib.rs

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -957,21 +957,6 @@ pub mod pallet {
957957
Ok(())
958958
}
959959

960-
/// The extrinsic sets the subnet limit for the network.
961-
/// It is only callable by the root account.
962-
/// The extrinsic will call the Subtensor pallet to set the subnet limit.
963-
#[pallet::call_index(37)]
964-
#[pallet::weight((
965-
Weight::from_parts(14_000_000, 0)
966-
.saturating_add(<T as frame_system::Config>::DbWeight::get().writes(1)),
967-
DispatchClass::Operational,
968-
Pays::No
969-
))]
970-
pub fn sudo_set_subnet_limit(origin: OriginFor<T>, _max_subnets: u16) -> DispatchResult {
971-
ensure_root(origin)?;
972-
Ok(())
973-
}
974-
975960
/// The extrinsic sets the lock reduction interval for the network.
976961
/// It is only callable by the root account.
977962
/// The extrinsic will call the Subtensor pallet to set the lock reduction interval.
@@ -1076,26 +1061,6 @@ pub mod pallet {
10761061
Ok(())
10771062
}
10781063

1079-
// The extrinsic sets the target stake per interval.
1080-
// It is only callable by the root account.
1081-
// The extrinsic will call the Subtensor pallet to set target stake per interval.
1082-
// #[pallet::call_index(47)]
1083-
// #[pallet::weight((0, DispatchClass::Operational, Pays::No))]
1084-
// pub fn sudo_set_target_stakes_per_interval(
1085-
// origin: OriginFor<T>,
1086-
// target_stakes_per_interval: u64,
1087-
// ) -> DispatchResult {
1088-
// ensure_root(origin)?;
1089-
// pallet_subtensor::Pallet::<T>::set_target_stakes_per_interval(
1090-
// target_stakes_per_interval,
1091-
// );
1092-
// log::debug!(
1093-
// "TxTargetStakesPerIntervalSet( set_target_stakes_per_interval: {:?} ) ",
1094-
// target_stakes_per_interval
1095-
// ); (DEPRECATED)
1096-
// Ok(())
1097-
// } (DEPRECATED)
1098-
10991064
/// The extrinsic enabled/disables commit/reaveal for a given subnet.
11001065
/// It is only callable by the root account or subnet owner.
11011066
/// The extrinsic will call the Subtensor pallet to set the value.
@@ -1157,62 +1122,6 @@ pub mod pallet {
11571122
)
11581123
}
11591124

1160-
// DEPRECATED
1161-
// #[pallet::call_index(52)]
1162-
// #[pallet::weight((0, DispatchClass::Operational, Pays::No))]
1163-
// pub fn sudo_set_hotkey_emission_tempo(
1164-
// origin: OriginFor<T>,
1165-
// emission_tempo: u64,
1166-
// ) -> DispatchResult {
1167-
// ensure_root(origin)?;
1168-
// pallet_subtensor::Pallet::<T>::set_hotkey_emission_tempo(emission_tempo);
1169-
// log::debug!(
1170-
// "HotkeyEmissionTempoSet( emission_tempo: {:?} )",
1171-
// emission_tempo
1172-
// );
1173-
// Ok(())
1174-
// }
1175-
1176-
/// Sets the maximum stake allowed for a specific network.
1177-
///
1178-
/// This function allows the root account to set the maximum stake for a given network.
1179-
/// It updates the network's maximum stake value and logs the change.
1180-
///
1181-
/// # Arguments
1182-
///
1183-
/// * `origin` - The origin of the call, which must be the root account.
1184-
/// * `netuid` - The unique identifier of the network.
1185-
/// * `max_stake` - The new maximum stake value to set.
1186-
///
1187-
/// # Returns
1188-
///
1189-
/// Returns `Ok(())` if the operation is successful, or an error if it fails.
1190-
///
1191-
/// # Example
1192-
///
1193-
///
1194-
/// # Notes
1195-
///
1196-
/// - This function can only be called by the root account.
1197-
/// - The `netuid` should correspond to an existing network.
1198-
///
1199-
/// # TODO
1200-
///
1201-
// - Consider adding a check to ensure the `netuid` corresponds to an existing network.
1202-
// - Implement a mechanism to gradually adjust the max stake to prevent sudden changes.
1203-
// #[pallet::weight(<T as Config>::WeightInfo::sudo_set_network_max_stake())]
1204-
#[pallet::call_index(53)]
1205-
#[pallet::weight((0, DispatchClass::Operational, Pays::No))]
1206-
pub fn sudo_set_network_max_stake(
1207-
origin: OriginFor<T>,
1208-
_netuid: NetUid,
1209-
_max_stake: u64,
1210-
) -> DispatchResult {
1211-
// Ensure the call is made by the root account
1212-
ensure_root(origin)?;
1213-
Ok(())
1214-
}
1215-
12161125
/// Sets the duration of the coldkey swap schedule.
12171126
///
12181127
/// This extrinsic allows the root account to set the duration for the coldkey swap schedule.

pallets/commitments/src/lib.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -328,21 +328,6 @@ pub mod pallet {
328328
Ok(())
329329
}
330330

331-
/// *DEPRECATED* Sudo-set the commitment rate limit
332-
#[pallet::call_index(1)]
333-
#[pallet::weight((
334-
Weight::from_parts(3_596_000, 0)
335-
.saturating_add(T::DbWeight::get().reads(0_u64))
336-
.saturating_add(T::DbWeight::get().writes(1_u64)),
337-
DispatchClass::Operational,
338-
Pays::No
339-
))]
340-
pub fn set_rate_limit(origin: OriginFor<T>, _rate_limit_blocks: u32) -> DispatchResult {
341-
ensure_root(origin)?;
342-
// RateLimit::<T>::set(rate_limit_blocks.into());
343-
Ok(())
344-
}
345-
346331
/// Sudo-set MaxSpace
347332
#[pallet::call_index(2)]
348333
#[pallet::weight((

0 commit comments

Comments
 (0)