Skip to content

Commit d65baff

Browse files
committed
Merge branch 'devnet-ready' into feat/rate-limit-pallet
2 parents 1e8db7d + b5cfad3 commit d65baff

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

docs/wasm-contracts.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ For general smart contract development on Subtensor, please refer to the officia
1414
- [ink! Getting Started Guide](https://use.ink/docs/v5/getting-started/setup)
1515
- [ink! Examples](https://github.com/use-ink/ink-examples/tree/v5.x.x)
1616

17+
> [!WARNING]
18+
> ink! `>= 6.0` drops support for `pallet-contracts`, please use `ink < 6.0`.
19+
> See: https://github.com/use-ink/ink/releases/tag/v6.0.0-alpha
20+
1721
## Subtensor-Specific Features
1822

1923
### Chain Extension

pallets/admin-utils/src/lib.rs

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,7 @@ pub mod pallet {
10151015
#[pallet::call_index(33)]
10161016
#[pallet::weight((
10171017
Weight::from_parts(2_875_000, 0)
1018+
.saturating_add(T::DbWeight::get().reads(0_u64))
10181019
.saturating_add(T::DbWeight::get().writes(1_u64)),
10191020
DispatchClass::Operational,
10201021
Pays::Yes
@@ -1146,7 +1147,9 @@ pub mod pallet {
11461147
/// The extrinsic will call the Subtensor pallet to set the weights min stake.
11471148
#[pallet::call_index(42)]
11481149
#[pallet::weight((
1149-
Weight::from_parts(5_000_000, 0).saturating_add(T::DbWeight::get().writes(1_u64)),
1150+
Weight::from_parts(5_000_000, 0)
1151+
.saturating_add(T::DbWeight::get().reads(0_u64))
1152+
.saturating_add(T::DbWeight::get().writes(1_u64)),
11501153
DispatchClass::Operational,
11511154
Pays::Yes
11521155
))]
@@ -1189,7 +1192,9 @@ pub mod pallet {
11891192
/// The extrinsic will call the Subtensor pallet to set the rate limit for delegate take transactions.
11901193
#[pallet::call_index(45)]
11911194
#[pallet::weight((
1192-
Weight::from_parts(5_019_000, 0).saturating_add(T::DbWeight::get().writes(1_u64)),
1195+
Weight::from_parts(5_019_000, 0)
1196+
.saturating_add(T::DbWeight::get().reads(0_u64))
1197+
.saturating_add(T::DbWeight::get().writes(1_u64)),
11931198
DispatchClass::Operational,
11941199
Pays::Yes
11951200
))]
@@ -1210,7 +1215,9 @@ pub mod pallet {
12101215
/// The extrinsic will call the Subtensor pallet to set the minimum delegate take.
12111216
#[pallet::call_index(46)]
12121217
#[pallet::weight((
1213-
Weight::from_parts(7_214_000, 0).saturating_add(T::DbWeight::get().writes(1_u64)),
1218+
Weight::from_parts(7_214_000, 0)
1219+
.saturating_add(T::DbWeight::get().reads(0_u64))
1220+
.saturating_add(T::DbWeight::get().writes(1_u64)),
12141221
DispatchClass::Operational,
12151222
Pays::Yes
12161223
))]
@@ -1266,6 +1273,7 @@ pub mod pallet {
12661273
#[pallet::call_index(50)]
12671274
#[pallet::weight((
12681275
Weight::from_parts(18_300_000, 0)
1276+
.saturating_add(T::DbWeight::get().reads(2_u64))
12691277
.saturating_add(T::DbWeight::get().writes(1_u64)),
12701278
DispatchClass::Normal,
12711279
Pays::Yes
@@ -1340,6 +1348,7 @@ pub mod pallet {
13401348
#[pallet::call_index(54)]
13411349
#[pallet::weight((
13421350
Weight::from_parts(5_000_000, 0)
1351+
.saturating_add(T::DbWeight::get().reads(0_u64))
13431352
.saturating_add(T::DbWeight::get().writes(1_u64)),
13441353
DispatchClass::Operational,
13451354
Pays::Yes
@@ -1377,6 +1386,7 @@ pub mod pallet {
13771386
#[pallet::call_index(55)]
13781387
#[pallet::weight((
13791388
Weight::from_parts(5_000_000, 0)
1389+
.saturating_add(T::DbWeight::get().reads(0_u64))
13801390
.saturating_add(T::DbWeight::get().writes(1_u64)),
13811391
DispatchClass::Operational,
13821392
Pays::Yes
@@ -1510,6 +1520,7 @@ pub mod pallet {
15101520
#[pallet::call_index(61)]
15111521
#[pallet::weight((
15121522
Weight::from_parts(20_460_000, 0)
1523+
.saturating_add(T::DbWeight::get().reads(2_u64))
15131524
.saturating_add(T::DbWeight::get().writes(1_u64)),
15141525
DispatchClass::Normal,
15151526
Pays::Yes
@@ -1582,7 +1593,8 @@ pub mod pallet {
15821593
#[pallet::call_index(62)]
15831594
#[pallet::weight((
15841595
Weight::from_parts(10_020_000, 3507)
1585-
.saturating_add(T::DbWeight::get().reads(1_u64)),
1596+
.saturating_add(T::DbWeight::get().reads(1_u64))
1597+
.saturating_add(T::DbWeight::get().writes(0_u64)),
15861598
DispatchClass::Operational,
15871599
Pays::Yes
15881600
))]
@@ -1616,6 +1628,7 @@ pub mod pallet {
16161628
#[pallet::call_index(63)]
16171629
#[pallet::weight((
16181630
Weight::from_parts(3_000_000, 0)
1631+
.saturating_add(T::DbWeight::get().reads(0_u64))
16191632
.saturating_add(T::DbWeight::get().writes(1_u64)),
16201633
DispatchClass::Operational,
16211634
Pays::Yes
@@ -1669,6 +1682,7 @@ pub mod pallet {
16691682
#[pallet::call_index(65)]
16701683
#[pallet::weight((
16711684
Weight::from_parts(6_201_000, 0)
1685+
.saturating_add(T::DbWeight::get().reads(0_u64))
16721686
.saturating_add(T::DbWeight::get().writes(1_u64)),
16731687
DispatchClass::Operational,
16741688
Pays::Yes
@@ -1755,6 +1769,7 @@ pub mod pallet {
17551769
#[pallet::call_index(69)]
17561770
#[pallet::weight((
17571771
Weight::from_parts(20_460_000, 0)
1772+
.saturating_add(T::DbWeight::get().reads(2_u64))
17581773
.saturating_add(T::DbWeight::get().writes(1_u64)),
17591774
DispatchClass::Normal,
17601775
Pays::Yes
@@ -1792,7 +1807,8 @@ pub mod pallet {
17921807
/// This function has a fixed weight of 0 and is classified as an operational transaction that does not incur any fees.
17931808
#[pallet::call_index(70)]
17941809
#[pallet::weight((
1795-
Weight::from_parts(22_340_000, 0)
1810+
Weight::from_parts(32_930_000, 0)
1811+
.saturating_add(T::DbWeight::get().reads(2_u64))
17961812
.saturating_add(T::DbWeight::get().writes(1_u64)),
17971813
DispatchClass::Normal,
17981814
Pays::Yes
@@ -1880,6 +1896,7 @@ pub mod pallet {
18801896
#[pallet::call_index(66)]
18811897
#[pallet::weight((
18821898
Weight::from_parts(17_980_000, 0)
1899+
.saturating_add(T::DbWeight::get().reads(2_u64))
18831900
.saturating_add(T::DbWeight::get().writes(1_u64)),
18841901
DispatchClass::Operational,
18851902
Pays::Yes

pallets/subtensor/src/macros/dispatches.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2210,7 +2210,7 @@ mod dispatches {
22102210
#[pallet::call_index(114)]
22112211
#[pallet::weight((Weight::from_parts(29_930_000, 0)
22122212
.saturating_add(T::DbWeight::get().reads(4_u64))
2213-
.saturating_add(T::DbWeight::get().writes(2_u64)), DispatchClass::Normal, Pays::No))]
2213+
.saturating_add(T::DbWeight::get().writes(2_u64)), DispatchClass::Normal, Pays::Yes))]
22142214
pub fn set_coldkey_auto_stake_hotkey(
22152215
origin: T::RuntimeOrigin,
22162216
netuid: NetUid,

0 commit comments

Comments
 (0)