-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Cumulus test runtime: fix + cleanup #12231
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
serban300
wants to merge
9
commits into
paritytech:master
Choose a base branch
from
serban300:cumulus-test-runtime-cleanup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+207
−235
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5eef742
Fix cumulus test runtime
serban300 cecd9ca
cumulus test runtime: remove unneeded flavor
serban300 f5d4e86
cumulus test runtime: cleanup configs
serban300 6b729ef
Remove "fallback-target-block-rate" feature
serban300 e6f3a74
CR comments
serban300 5eb898d
fix
serban300 f0829f4
CR comments
serban300 42dbf65
Try remove rpo from unincluded segment capacity
serban300 c1d1b3a
undo scheduling v3 test expected throughput
serban300 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| // Copyright (C) Parity Technologies (UK) Ltd. | ||
|
iulianbarbu marked this conversation as resolved.
|
||
| // This file is part of Cumulus. | ||
|
|
||
| // Cumulus is free software: you can redistribute it and/or modify | ||
| // it under the terms of the GNU General Public License as published by | ||
| // the Free Software Foundation, either version 3 of the License, or | ||
| // (at your option) any later version. | ||
|
|
||
| // Cumulus is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| // GNU General Public License for more details. | ||
|
|
||
| // You should have received a copy of the GNU General Public License | ||
| // along with Cumulus. If not, see <http://www.gnu.org/licenses/>. | ||
|
|
||
| pub mod spec_version_incremented { | ||
| #[cfg(feature = "std")] | ||
| include!(concat!(env!("OUT_DIR"), "/wasm_binary_spec_version_incremented.rs")); | ||
| } | ||
|
|
||
| pub mod relay_parent_offset { | ||
| #[cfg(feature = "std")] | ||
| include!(concat!(env!("OUT_DIR"), "/wasm_binary_relay_parent_offset.rs")); | ||
| } | ||
|
|
||
| pub mod elastic_scaling_500ms { | ||
| #[cfg(feature = "std")] | ||
| include!(concat!(env!("OUT_DIR"), "/wasm_binary_elastic_scaling_500ms.rs")); | ||
| } | ||
|
|
||
| pub mod elastic_scaling { | ||
| #[cfg(feature = "std")] | ||
| include!(concat!(env!("OUT_DIR"), "/wasm_binary_elastic_scaling.rs")); | ||
| } | ||
|
|
||
| pub mod elastic_scaling_12s_slot { | ||
| #[cfg(feature = "std")] | ||
| include!(concat!(env!("OUT_DIR"), "/wasm_binary_elastic_scaling_12s_slot.rs")); | ||
| } | ||
|
|
||
| pub mod block_bundling { | ||
| #[cfg(feature = "std")] | ||
| include!(concat!(env!("OUT_DIR"), "/wasm_binary_block_bundling.rs")); | ||
| } | ||
|
|
||
| pub mod sync_backing { | ||
| #[cfg(feature = "std")] | ||
| include!(concat!(env!("OUT_DIR"), "/wasm_binary_sync_backing.rs")); | ||
| } | ||
|
|
||
| pub mod async_backing { | ||
| #[cfg(feature = "std")] | ||
| include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); | ||
| } | ||
|
|
||
| pub mod async_backing_v3 { | ||
| #[cfg(feature = "std")] | ||
| include!(concat!(env!("OUT_DIR"), "/wasm_binary_async_backing_v3.rs")); | ||
| } | ||
|
|
||
| pub mod async_backing_v3_rpo { | ||
| #[cfg(feature = "std")] | ||
| include!(concat!(env!("OUT_DIR"), "/wasm_binary_async_backing_v3_rpo.rs")); | ||
| } | ||
|
|
||
| pub mod elastic_scaling_v3 { | ||
| #[cfg(feature = "std")] | ||
| include!(concat!(env!("OUT_DIR"), "/wasm_binary_elastic_scaling_v3.rs")); | ||
| } | ||
|
|
||
| pub mod slot_duration_18s { | ||
| #[cfg(feature = "std")] | ||
| include!(concat!(env!("OUT_DIR"), "/wasm_binary_slot_duration_18s.rs")); | ||
| } | ||
|
|
||
| pub(crate) const SCHEDULING_V3_ENABLED: bool = cfg!(feature = "v3-descriptor"); | ||
|
|
||
| pub(crate) const fn relay_parent_offset() -> u32 { | ||
| if cfg!(feature = "relay-parent-offset-2") { | ||
| return 2; | ||
| } | ||
|
|
||
| 0 | ||
| } | ||
|
|
||
| pub(crate) const fn slot_duration() -> u64 { | ||
| if cfg!(feature = "18s-slot") { | ||
| return 18000; | ||
| } | ||
|
|
||
| if cfg!(feature = "12s-slot") { | ||
| return 12000; | ||
| } | ||
|
|
||
| 6000 | ||
| } | ||
|
|
||
| pub(crate) const fn block_processing_velocity() -> u32 { | ||
| if cfg!(feature = "velocity-12") { | ||
| return 12; | ||
| } | ||
|
|
||
| if cfg!(feature = "velocity-6") { | ||
| return 6; | ||
| } | ||
|
|
||
| if cfg!(feature = "velocity-3") { | ||
| return 3; | ||
| } | ||
|
|
||
| 1 | ||
| } | ||
|
|
||
| pub(crate) const fn unincluded_segment_capacity() -> u32 { | ||
| if cfg!(feature = "sync-backing") { | ||
| return 1; | ||
| } | ||
|
|
||
| // Without sync backing, the block flow is the following: | ||
| // | ||
| // - Collator produces the block(s) on relay chain block `X` | ||
| // - In the meantime the relay chain is building block `X + 1` | ||
| // - The collator sends the collation to the relay chain, and it gets backed on chain in relay | ||
| // block `X + 2` | ||
| // - The collation then gets included on chain in relay block `X + 3` | ||
| block_processing_velocity() * 3 | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please comments on what they are doing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done