Skip to content

Conversation

@lexnv
Copy link
Contributor

@lexnv lexnv commented Sep 30, 2025

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

  • Ensure collators are running with 2509 or newer
  • Double check the changes locally
  • If AH Westend looks good, we'll enable ES to AHPaseo

cc @paritytech/sdk-node @sandreim

@lexnv lexnv requested review from a team as code owners October 7, 2025 15:55
let expected_rp_descendants_num = T::RelayParentOffset::get();

if expected_rp_descendants_num > 0 {
if expected_rp_descendants_num > 1 {
Copy link
Contributor

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 ?

Copy link
Contributor Author

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 🙏

@lexnv
Copy link
Contributor Author

lexnv commented Nov 10, 2025

This PR has been deployed on AHW around the time of the commit: 1038150

AHW lastRuntimeUpgrade:

{
  specVersion: 1,020,005
  specName: westmint
}

Investigating block production degradation in: #10227

The CI was randomly failing because it was missing:

github-merge-queue bot pushed a commit that referenced this pull request Nov 19, 2025
…#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]>
paritytech-release-backport-bot bot pushed a commit that referenced this pull request Nov 25, 2025
…#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)
paritytech-release-backport-bot bot pushed a commit that referenced this pull request Nov 25, 2025
…#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)
github-merge-queue bot pushed a commit that referenced this pull request Dec 10, 2025
…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]>
paritytech-release-backport-bot bot pushed a commit that referenced this pull request Dec 10, 2025
…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)
@lexnv
Copy link
Contributor Author

lexnv commented Jan 29, 2026

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)

@pepoviola
Copy link
Contributor

/cmd fmt

@pepoviola
Copy link
Contributor

ping @sandreim can we merge this one?

Copy link
Contributor

@sandreim sandreim left a 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.

@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/21519931456
Failed job name: run-frame-omni-bencher

@lexnv
Copy link
Contributor Author

lexnv commented Jan 30, 2026

The run-frame-omni-bencher step is failing because the relay parent offset is not propagated to the mock data:

let parachain_validation_data_provider = MockValidationDataInherentDataProvider::<()> {
para_id: ParaId::from(*para_id),
current_para_block_head: Some(header.encode().into()),
relay_offset: 0,

This needs to be fixed before merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants