Skip to content

cumulus-test-runtime: move feature-gated params into flavor module#12129

Closed
Kanasjnr wants to merge 4 commits into
paritytech:masterfrom
Kanasjnr:kanas/cumulus-test-runtime-flavors
Closed

cumulus-test-runtime: move feature-gated params into flavor module#12129
Kanasjnr wants to merge 4 commits into
paritytech:masterfrom
Kanasjnr:kanas/cumulus-test-runtime-flavors

Conversation

@Kanasjnr
Copy link
Copy Markdown
Contributor

Summary

Refactors cumulus-test-runtime so feature-gated parameters live in a dedicated flavor/ module tree instead of scattered #[cfg(...)] blocks in lib.rs.

  • Add src/flavor/ with modules for block velocity, slot duration, relay parent offset, unincluded segment capacity, relay chain slot duration, and Aura backing behavior.
  • Wire lib.rs to import from flavor/; keep VERSION in lib.rs (required by #[sp_version::runtime_version]).
  • No behavior change same Cargo features, same values, same WASM build setup.

Closes #11991.

Motivation

The test runtime is built many times with different Cargo features (elastic scaling, sync/async backing, relay-parent offset, block-bundling, etc.). Constants that depend on those features were hard to follow and extend in lib.rs. Grouping them by concern makes it easier to see which feature enables which values and to add new flavors later.

@Kanasjnr
Copy link
Copy Markdown
Contributor Author

/cmd label T9-cumulus T10-tests I4-refactor R0-no-crate-publish-required

@Kanasjnr
Copy link
Copy Markdown
Contributor Author

/cmd prdoc --audience node_dev

@paritytech-cmd-bot-polkadot-sdk paritytech-cmd-bot-polkadot-sdk Bot added I4-refactor Code needs refactoring. R0-no-crate-publish-required The change does not require any crates to be re-published. T10-tests This PR/Issue is related to tests. T9-cumulus This PR/Issue is related to cumulus. labels May 20, 2026
github-actions Bot and others added 2 commits May 20, 2026 11:18
Only import BLOCK_PROCESSING_VELOCITY and RELAY_PARENT_OFFSET when the
default-backing unincluded segment capacity constant is compiled.
@serban300
Copy link
Copy Markdown
Contributor

Sorry, I wasn't aware of this PR. I opened #12231 which should address #11991 . Could we close this now in favor of #12231 ?

@Kanasjnr
Copy link
Copy Markdown
Contributor Author

Kanasjnr commented Jun 2, 2026

Sorry, I wasn't aware of this PR. I opened #12231 which should address #11991 . Could we close this now in favor of #12231 ?

Ohh yea sure sure 👍

@Kanasjnr Kanasjnr closed this Jun 2, 2026
@Kanasjnr Kanasjnr deleted the kanas/cumulus-test-runtime-flavors branch June 2, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I4-refactor Code needs refactoring. R0-no-crate-publish-required The change does not require any crates to be re-published. T9-cumulus This PR/Issue is related to cumulus. T10-tests This PR/Issue is related to tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cumulus: define cumulus-test-runtime flavors in appropriate modules

2 participants