-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ah-westend: Elastic Scaling with 3 cores on AssetHub Westend #9880
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
Outdated
Show resolved
Hide resolved
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
polkadot/zombienet_tests/functional/0020-asset-hub-westend-elastic-scaling.toml
Outdated
Show resolved
Hide resolved
Signed-off-by: Alexandru Vasile <[email protected]>
…t > 1 Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
| let expected_rp_descendants_num = T::RelayParentOffset::get(); | ||
|
|
||
| if expected_rp_descendants_num > 0 { | ||
| if expected_rp_descendants_num > 1 { |
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.
Why do we need this change ?
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.
I've added this temporarly to filter out any testing issues, mostly all the asset-hub-westend-integration-tests were failing: https://github.com/paritytech/polkadot-sdk/actions/runs/18709940296/job/53356515320
I believe we need to add a few blocks of state to make this pass cleanly 🙏
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
…#10154) This PR adjusts the block authoring to stop producing blocks 1 second before the scheduled slot change. This introduces a safety buffer to prevent blocks from being authored too late for inclusion. - 2s blocks / 3 cores: The authoring duration of the last block is reduced from 2s to 1s. - 500ms blocks / 12 cores: The authoring duration cannot be reduced past 500ms, therefore the last two blocks are no longer authored ### Testing Done Tested on top of: - #9880 ### 3 cores 2s blocks ``` aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.987s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723040) next_duration_change=5.987s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(1.987s) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.991s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723040) next_duration_change=3.991s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(1.991s) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.99s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723041) next_duration_change=1.99s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(990ms) ``` ### 12 cores 500ms blocks ``` aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=494ms last_reported_slot=Some(Slot(293724134)) next_slot=Slot(293724134) next_duration_change=1.494s next_slot_change=Slot(293724135) deadline=494ms aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(494ms) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=493ms last_reported_slot=Some(Slot(293724134)) next_slot=Slot(293724134) next_duration_change=993ms next_slot_change=Slot(293724135) deadline=0ns aura::cumulus: [Parachain] Not enough time left in the slot to adjust authoring duration. Skipping block production for the slot. next_duration_change=993ms next_slot_change=Slot(293724135) aura::cumulus: [Parachain] Adjusted proposal duration. duration=None aura::cumulus: [Parachain] Not building block due to insufficient authoring duration aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=494ms last_reported_slot=Some(Slot(293724136)) next_slot=Slot(293724137) next_duration_change=494ms next_slot_change=Slot(293724137) deadline=0ns aura::cumulus: [Parachain] Not enough time left in the slot to adjust authoring duration. Skipping block production for the slot. next_duration_change=494ms next_slot_change=Slot(293724137) aura::cumulus: [Parachain] Adjusted proposal duration. duration=None aura::cumulus: [Parachain] Not building block due to insufficient authoring duration ``` Part of: #9848 --------- Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: eduardspa <[email protected]> Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: Andrei Sandu <[email protected]>
…#10154) This PR adjusts the block authoring to stop producing blocks 1 second before the scheduled slot change. This introduces a safety buffer to prevent blocks from being authored too late for inclusion. - 2s blocks / 3 cores: The authoring duration of the last block is reduced from 2s to 1s. - 500ms blocks / 12 cores: The authoring duration cannot be reduced past 500ms, therefore the last two blocks are no longer authored ### Testing Done Tested on top of: - #9880 ### 3 cores 2s blocks ``` aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.987s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723040) next_duration_change=5.987s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(1.987s) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.991s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723040) next_duration_change=3.991s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(1.991s) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.99s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723041) next_duration_change=1.99s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(990ms) ``` ### 12 cores 500ms blocks ``` aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=494ms last_reported_slot=Some(Slot(293724134)) next_slot=Slot(293724134) next_duration_change=1.494s next_slot_change=Slot(293724135) deadline=494ms aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(494ms) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=493ms last_reported_slot=Some(Slot(293724134)) next_slot=Slot(293724134) next_duration_change=993ms next_slot_change=Slot(293724135) deadline=0ns aura::cumulus: [Parachain] Not enough time left in the slot to adjust authoring duration. Skipping block production for the slot. next_duration_change=993ms next_slot_change=Slot(293724135) aura::cumulus: [Parachain] Adjusted proposal duration. duration=None aura::cumulus: [Parachain] Not building block due to insufficient authoring duration aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=494ms last_reported_slot=Some(Slot(293724136)) next_slot=Slot(293724137) next_duration_change=494ms next_slot_change=Slot(293724137) deadline=0ns aura::cumulus: [Parachain] Not enough time left in the slot to adjust authoring duration. Skipping block production for the slot. next_duration_change=494ms next_slot_change=Slot(293724137) aura::cumulus: [Parachain] Adjusted proposal duration. duration=None aura::cumulus: [Parachain] Not building block due to insufficient authoring duration ``` Part of: #9848 --------- Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: eduardspa <[email protected]> Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: Andrei Sandu <[email protected]> (cherry picked from commit 77c0125)
…#10154) This PR adjusts the block authoring to stop producing blocks 1 second before the scheduled slot change. This introduces a safety buffer to prevent blocks from being authored too late for inclusion. - 2s blocks / 3 cores: The authoring duration of the last block is reduced from 2s to 1s. - 500ms blocks / 12 cores: The authoring duration cannot be reduced past 500ms, therefore the last two blocks are no longer authored ### Testing Done Tested on top of: - #9880 ### 3 cores 2s blocks ``` aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.987s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723040) next_duration_change=5.987s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(1.987s) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.991s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723040) next_duration_change=3.991s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(1.991s) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.99s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723041) next_duration_change=1.99s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(990ms) ``` ### 12 cores 500ms blocks ``` aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=494ms last_reported_slot=Some(Slot(293724134)) next_slot=Slot(293724134) next_duration_change=1.494s next_slot_change=Slot(293724135) deadline=494ms aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(494ms) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=493ms last_reported_slot=Some(Slot(293724134)) next_slot=Slot(293724134) next_duration_change=993ms next_slot_change=Slot(293724135) deadline=0ns aura::cumulus: [Parachain] Not enough time left in the slot to adjust authoring duration. Skipping block production for the slot. next_duration_change=993ms next_slot_change=Slot(293724135) aura::cumulus: [Parachain] Adjusted proposal duration. duration=None aura::cumulus: [Parachain] Not building block due to insufficient authoring duration aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=494ms last_reported_slot=Some(Slot(293724136)) next_slot=Slot(293724137) next_duration_change=494ms next_slot_change=Slot(293724137) deadline=0ns aura::cumulus: [Parachain] Not enough time left in the slot to adjust authoring duration. Skipping block production for the slot. next_duration_change=494ms next_slot_change=Slot(293724137) aura::cumulus: [Parachain] Adjusted proposal duration. duration=None aura::cumulus: [Parachain] Not building block due to insufficient authoring duration ``` Part of: #9848 --------- Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: eduardspa <[email protected]> Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: Andrei Sandu <[email protected]> (cherry picked from commit 77c0125)
…ata (#10541) This PR ensures that the parachains test-utils crate has 2 relay parent descendants for testing purposes. Effectively fixes a panic because we missed this mock data for chains that started with `RP_offset > 0`: ``` Unable to verify provided relay parent descendants. expected_rp_descendants_num: 1 error: InvalidNumberOfDescendants { expected: 2, received: 0 } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Detected in: - https://github.com/polkadot-fellows/runtimes/actions/runs/19857064730/job/56897622908?pr=1018 Unblocks: - polkadot-fellows/runtimes#1018 Inspired by a similar fix I've introduced in: - #9880 --------- Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher <[email protected]>
…ata (#10541) This PR ensures that the parachains test-utils crate has 2 relay parent descendants for testing purposes. Effectively fixes a panic because we missed this mock data for chains that started with `RP_offset > 0`: ``` Unable to verify provided relay parent descendants. expected_rp_descendants_num: 1 error: InvalidNumberOfDescendants { expected: 2, received: 0 } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Detected in: - https://github.com/polkadot-fellows/runtimes/actions/runs/19857064730/job/56897622908?pr=1018 Unblocks: - polkadot-fellows/runtimes#1018 Inspired by a similar fix I've introduced in: - #9880 --------- Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher <[email protected]> (cherry picked from commit 0f28d81)
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
|
This PR has already deployed in the Westend as a runtime upgrade. We should merge it to align further deployments from origin/master (if not decommissioning Westend entirely) |
|
/cmd fmt |
|
ping @sandreim can we merge this one? |
sandreim
left a comment
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.
A few things need to be addressed before merge.
cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Outdated
Show resolved
Hide resolved
cumulus/client/consensus/aura/src/collators/slot_based/slot_timer.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrei Sandu <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
|
The polkadot-sdk/substrate/utils/frame/benchmarking-cli/src/overhead/command.rs Lines 215 to 218 in 0bb4f59
This needs to be fixed before merging |
data Signed-off-by: Alexandru Vasile <[email protected]>
This PR enables elastic scaling on AssetHubWestend with 3 bulk cores.
Guideline for enablement: https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/enable_elastic_scaling/index.html
Next Steps
cc @paritytech/sdk-node @sandreim