Commit 40f124f
Fix scheduler weight and add test (#614)
- **Add test to collectives pallet**
- **Manually edit scheduler weight**
## Investigation
The Rust compiler changed how the `stringify!` macro formats paths on
[Aug 12th
'24](rust-lang/rust#128992 (comment)).
I assume that this broke the V1 benchmarking
[here](https://github.com/paritytech/polkadot-sdk/blob/7ecf3f757a5d6f622309cea7f788e8a547a5dce8/substrate/frame/benchmarking/src/v1.rs#L1011).
We had updated the scheduler pallet to V2 syntax (which is [not
affected](https://github.com/paritytech/polkadot-sdk/blob/df99fb9431a579589c1c87832222c9551b5c4f7c/substrate/frame/support/procedural/src/benchmark.rs#L565))
on [Nov 20th '24](paritytech/polkadot-sdk#6292).
We did not back-port this since there was no apparent reason for it.
The is why it seemingly fixed it self on SDK master but not in the
runtimes repo (since that is using V1 scheduler benchmarking).
Another indication for this is the fact that it did work on the
[whitelist
pallet](https://github.com/polkadot-fellows/runtimes/blob/6b85bf6adb427942976648e6d235e0169dfced16/relay/polkadot/src/weights/pallet_whitelist.rs#L85),
which is on V2 much longer but used the same [custom pov
mode](https://github.com/paritytech/polkadot-sdk/blob/b76e91acc953e682b3ddcfc45ecacaaf26c694a1/substrate/frame/whitelist/src/benchmarking.rs#L68).
Adding some sanity checks to prevent this in the future here
paritytech/polkadot-sdk#7785
- [ ] Does not require a CHANGELOG entry
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: GitHub Action <action@github.com>1 parent 6b85bf6 commit 40f124f
File tree
3 files changed
+93
-62
lines changed- system-parachains/collectives/collectives-polkadot/src
- weights
3 files changed
+93
-62
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1311 | 1311 | | |
1312 | 1312 | | |
1313 | 1313 | | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
Lines changed: 60 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments