Skip to content

fix(runtime): enable async-backing aura config to stop block-production stall#4061

Merged
Kailai-Wang merged 1 commit into
devfrom
fix/aura-allow-multiple-blocks-per-slot
Jul 1, 2026
Merged

fix(runtime): enable async-backing aura config to stop block-production stall#4061
Kailai-Wang merged 1 commit into
devfrom
fix/aura-allow-multiple-blocks-per-slot

Conversation

@Kailai-Wang

@Kailai-Wang Kailai-Wang commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Problem

After the stable2512 SDK upgrade (#4057), the v0.9.27 release stalled: the create-release-draft heima zombienet ts-test timed out for 30 min with the parachain stuck at block #0. The chain stops producing blocks under the stable2512 lookahead collator.

Reproduced locally (release-profile node + zombienet, with full collator logs — CI runs the node with -l silent and discards them, which is why CI never showed the cause). Two runtime panics, in sequence:

  1. pallet_aura::on_initialize"Slot must increase" (substrate frame/aura/src/lib.rs)
  2. once that's fixed → parachain_system"Relay chain block number needs to strictly increase between Parachain blocks!"

Root cause

The stable2512 lookahead collator pipelines multiple parachain blocks against the same relay parent (filling the unincluded segment for async backing). Two runtime configs were set for the pre-async-backing 1:1 model and panic under that pipelining:

Config Was Now Why
pallet_aura::AllowMultipleBlocksPerSlot ConstBool<false> ConstBool<true> A second block in the same slot has current_slot == new_slot; aura's on_initialize asserts a strict < increase when this is false and panics. The real rate stays bounded by FixedVelocityConsensusHook (velocity 1), not this flag.
parachain_system::CheckAssociatedRelayNumber RelayNumberStrictlyIncreases RelayNumberMonotonicallyIncreases Consecutive parachain blocks can share a relay number under async backing; the strict variant panics on current == previous. The SDK source comment states monotonic "should be used when asynchronous backing is enabled".

Both values match the stable2512 parachain-template (AllowMultipleBlocksPerSlot = true, RelayNumberMonotonicallyIncreases).

Why this didn't surface earlier

On stable2412 (current mainnet v0.9.26-05, also 6s) the collator did not pipeline this way — 1 parachain block per relay parent — so neither assertion fired. This is a latent misconfiguration exposed by the stable2512 collator's more aggressive pipelining. (The regular dev CI ts-test happened to pass because the single-collator dev chain's timing produced one block per relay parent; the release path hit the pipelined path and panicked. Same code, timing-dependent — the fix removes the panic regardless of timing.)

Node side / other config — audited, no change needed

Checked the node AuraParams against the SDK parachain-template: authoring_duration (1500ms), reinitialize: false, max_pov_percentage: None, collator_peer_id, relay_chain_slot_duration (6s) all match. UNINCLUDED_SEGMENT_CAPACITY = 2 (template uses 3) is a valid conservative value for velocity 1 and is left unchanged.

Changes

  • heima + paseo runtimes: AllowMultipleBlocksPerSlot = true, CheckAssociatedRelayNumber = RelayNumberMonotonicallyIncreases.
  • spec_version stays 9270 — it has never been published on-chain (chain is at 9262), so this fix folds into the same not-yet-released 9270 wasm (9262→9270 on-chain carries SDK + migration cleanup + this fix). The earlier buggy 9270 build must never be applied on-chain; only the fixed 9270 ships.

Verification

Local zombienet (heima-dev, release-profile node built from this branch): parachain produces and finalizes blocks continuously past #1 (#1#10+), no Slot must increase and no relay-number panic. (vs. the old binary which panics and stays at #0.)

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
heima-aa-demo-app Ignored Ignored Jun 30, 2026 11:44pm

Request Review

…on stall

Under the stable2512 lookahead collator the parachain stalls at block #0: the
collator pipelines multiple parachain blocks against the same relay parent
(unincluded segment), which trips two runtime asserts left at their pre-async-
backing values:

- pallet_aura::on_initialize panics "Slot must increase" because
  AllowMultipleBlocksPerSlot = false (second block in a slot has
  current_slot == new_slot).
- parachain_system panics "Relay chain block number needs to strictly increase"
  because CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases (consecutive
  para blocks can share a relay number under async backing).

Set both heima + paseo to the values the stable2512 parachain-template uses:
AllowMultipleBlocksPerSlot = true and RelayNumberMonotonicallyIncreases. The
real block rate stays bounded by FixedVelocityConsensusHook (velocity 1), not
these flags.

spec_version stays 9270: it has never been published on-chain (chain is at
9262), so this fix folds into the same not-yet-released 9270 wasm. The on-chain
upgrade 9262 -> 9270 will carry the SDK bump + migration cleanup + this fix in
one go. (Discipline: the earlier buggy 9270 build must never be applied
on-chain; only the fixed 9270 ships.)

stable2412 (mainnet v0.9.26-05, also 6s) did not pipeline this way (1 para block
per relay parent), so neither assert fired -- this was a latent misconfig the
stable2512 collator exposed. Node-side AuraParams already match the template;
no node change needed.
@Kailai-Wang Kailai-Wang force-pushed the fix/aura-allow-multiple-blocks-per-slot branch from 2d6cc66 to d97e48f Compare June 30, 2026 23:44
@Kailai-Wang Kailai-Wang merged commit 9792f4c into dev Jul 1, 2026
15 checks passed
@Kailai-Wang Kailai-Wang deleted the fix/aura-allow-multiple-blocks-per-slot branch July 1, 2026 13:06
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.

1 participant