Skip to content

Commit 96911e6

Browse files
committed
revert hyperparam name change
1 parent b07c1ff commit 96911e6

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

pallets/admin-utils/src/benchmarking.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,14 @@ mod benchmarks {
228228
}
229229

230230
#[benchmark]
231-
fn sudo_set_commit_reveal_weights_periods() {
231+
fn sudo_set_commit_reveal_weights_interval() {
232232
pallet_subtensor::Pallet::<T>::init_new_network(
233233
1u16, /*netuid*/
234234
1u16, /*sudo_tempo*/
235235
);
236236

237237
#[extrinsic_call]
238-
_(RawOrigin::Root, 1u16/*netuid*/, 3u64/*interval*/)/*set_commit_reveal_weights_periods()*/;
238+
_(RawOrigin::Root, 1u16/*netuid*/, 3u64/*interval*/)/*sudo_set_commit_reveal_weights_interval()*/;
239239
}
240240

241241
#[benchmark]

pallets/admin-utils/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,11 +1188,11 @@ pub mod pallet {
11881188
/// # Weight
11891189
/// Weight is handled by the `#[pallet::weight]` attribute.
11901190
#[pallet::call_index(56)]
1191-
#[pallet::weight(T::WeightInfo::sudo_set_commit_reveal_weights_periods())]
1192-
pub fn sudo_set_commit_reveal_weights_periods(
1191+
#[pallet::weight(T::WeightInfo::sudo_set_commit_reveal_weights_interval())]
1192+
pub fn sudo_set_commit_reveal_weights_interval(
11931193
origin: OriginFor<T>,
11941194
netuid: u16,
1195-
periods: u64,
1195+
interval: u64,
11961196
) -> DispatchResult {
11971197
pallet_subtensor::Pallet::<T>::ensure_subnet_owner_or_root(origin, netuid)?;
11981198

@@ -1201,11 +1201,11 @@ pub mod pallet {
12011201
Error::<T>::SubnetDoesNotExist
12021202
);
12031203

1204-
pallet_subtensor::Pallet::<T>::set_reveal_period(netuid, periods);
1204+
pallet_subtensor::Pallet::<T>::set_reveal_period(netuid, interval);
12051205
log::debug!(
1206-
"SetWeightCommitPeriods( netuid: {:?}, periods: {:?} ) ",
1206+
"SetWeightCommitInterval( netuid: {:?}, interval: {:?} ) ",
12071207
netuid,
1208-
periods
1208+
interval
12091209
);
12101210
Ok(())
12111211
}

pallets/admin-utils/src/weights.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub trait WeightInfo {
6060
fn sudo_set_min_burn() -> Weight;
6161
fn sudo_set_network_registration_allowed() -> Weight;
6262
fn sudo_set_tempo() -> Weight;
63-
fn sudo_set_commit_reveal_weights_periods() -> Weight;
63+
fn sudo_set_commit_reveal_weights_interval() -> Weight;
6464
fn sudo_set_commit_reveal_weights_enabled() -> Weight;
6565
}
6666

@@ -413,7 +413,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
413413
.saturating_add(T::DbWeight::get().reads(1_u64))
414414
.saturating_add(T::DbWeight::get().writes(1_u64))
415415
}
416-
fn sudo_set_commit_reveal_weights_periods() -> Weight {
416+
fn sudo_set_commit_reveal_weights_interval() -> Weight {
417417
// Proof Size summary in bytes:
418418
// Measured: `456`
419419
// Estimated: `3921`
@@ -781,7 +781,7 @@ impl WeightInfo for () {
781781
.saturating_add(RocksDbWeight::get().reads(1_u64))
782782
.saturating_add(RocksDbWeight::get().writes(1_u64))
783783
}
784-
fn sudo_set_commit_reveal_weights_periods() -> Weight {
784+
fn sudo_set_commit_reveal_weights_interval() -> Weight {
785785
// -- Extrinsic Time --
786786
// Model:
787787
// Time ~= 19.38

pallets/admin-utils/tests/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,15 +1414,15 @@ fn test_sudo_set_dissolve_network_schedule_duration() {
14141414
}
14151415

14161416
#[test]
1417-
fn sudo_set_commit_reveal_weights_periods() {
1417+
fn sudo_set_commit_reveal_weights_interval() {
14181418
new_test_ext().execute_with(|| {
14191419
let netuid: u16 = 1;
14201420
add_network(netuid, 10);
14211421

14221422
let to_be_set = 55;
14231423
let init_value = SubtensorModule::get_reveal_period(netuid);
14241424

1425-
assert_ok!(AdminUtils::sudo_set_commit_reveal_weights_periods(
1425+
assert_ok!(AdminUtils::sudo_set_commit_reveal_weights_interval(
14261426
<<Test as Config>::RuntimeOrigin>::root(),
14271427
netuid,
14281428
to_be_set

pallets/subtensor/src/rpc_info/subnet_info.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub struct SubnetInfov2<T: Config> {
5151
identity: Option<SubnetIdentity>,
5252
}
5353

54-
#[freeze_struct("4ceb81dfe8a8f96d")]
54+
#[freeze_struct("55b472510f10e76a")]
5555
#[derive(Decode, Encode, PartialEq, Eq, Clone, Debug)]
5656
pub struct SubnetHyperparams {
5757
rho: Compact<u16>,
@@ -76,7 +76,7 @@ pub struct SubnetHyperparams {
7676
max_validators: Compact<u16>,
7777
adjustment_alpha: Compact<u64>,
7878
difficulty: Compact<u64>,
79-
commit_reveal_periods: Compact<u64>,
79+
commit_reveal_weights_interval: Compact<u64>,
8080
commit_reveal_weights_enabled: bool,
8181
alpha_high: Compact<u16>,
8282
alpha_low: Compact<u16>,
@@ -280,7 +280,7 @@ impl<T: Config> Pallet<T> {
280280
max_validators: max_validators.into(),
281281
adjustment_alpha: adjustment_alpha.into(),
282282
difficulty: difficulty.into(),
283-
commit_reveal_periods: commit_reveal_periods.into(),
283+
commit_reveal_weights_interval: commit_reveal_periods.into(),
284284
commit_reveal_weights_enabled,
285285
alpha_high: alpha_high.into(),
286286
alpha_low: alpha_low.into(),

0 commit comments

Comments
 (0)