Skip to content

Regression in pallet-scheduler: integrity_test fails after upgrading to Polkadot SDK stable2412 #8726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SunTiebing opened this issue Jun 3, 2025 · 5 comments
Labels
I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@SunTiebing
Copy link

After upgrading our parachain project to Polkadot SDK version stable2412 (git rev: cff69157b985ed76), our build succeeds, but running runtime tests fails.

We are using the following command to run runtime tests:

SKIP_WASM_BUILD=1 cargo test --features "with-all-runtime" --lib

The following test fails:

---- __construct_runtime_integrity_test::runtime_integrity_tests stdout ----
thread '__construct_runtime_integrity_test::runtime_integrity_tests' panicked at .../substrate/frame/scheduler/src/lib.rs:397:4:
Must be possible to submit a small lookup

From tracing the code in pallet-scheduler, the issue comes from the integrity_test function:

let small_lookup = lookup_weight::(128);
assert!(small_lookup.all_lte(limit), "Must be possible to submit a small lookup");

However, our runtime does not override any specific weight values or logic, and we did not see such errors prior to this SDK upgrade. This seems to be a regression caused by new integrity constraints introduced in the scheduler.

Steps to Reproduce:
1. Upgrade to latest polkadot-sdk (rev cff69157b985ed76)
2. Run cargo test for the runtime crate
3. Observe failure in __construct_runtime_integrity_test

Please advise whether:
• This is an intentional change and requires us to increase MaximumWeight, or
• This test is too strict and should be relaxed, or
• There is a missing migration or documentation for handling this

Thanks!

@github-actions github-actions bot added the I10-unconfirmed Issue might be valid, but it's not yet known. label Jun 3, 2025
@bkchr
Copy link
Member

bkchr commented Jun 3, 2025

CC @ggwpez

@ggwpez
Copy link
Member

ggwpez commented Jun 3, 2025

What weights do you have configured for pallet scheduler, just ()?
It seems that there is a possible issue with your config and this test fails to indicate that.
Are you an open-source project where I could check the code?

@SunTiebing
Copy link
Author

@ggwpez
Thanks for the response!

In our actual runtime, we configure WeightInfo as:
WeightInfo = pallet_scheduler::weights::SubstrateWeight<Runtime>;

But in our mock runtime for testing, WeightInfo is set to (), following the pattern seen in other pallets, such as: polkadot-sdk

Is this now expected behavior, requiring real weight implementations even in mocks? Or is this a regression in how the test handles default/mock weights?

Our project is open source. You can find the code here: bifrost

Thanks again for your support!

@ggwpez
Copy link
Member

ggwpez commented Jun 3, 2025

It only fails in your mock, not production runtime? So the test works for production bifrost runtime? I will give it a look, thanks for the link.

@ggwpez
Copy link
Member

ggwpez commented Jun 3, 2025

The issue is that on stable2412 we have incorrect default weights. I checked all other stable releases and this seems to be the only one affected.
It does have the benchmarking fix in it though - but no weight update 🫠

Proper solution would be to run benchmarks for this pallet and use your own generated weights until we publish a fix. Alternatively, you could also copy&paste the Scheduler weights of the Asset Hub Runtime, but you should still sanity check them manually and it is a bit hacky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

No branches or pull requests

3 participants