Skip to content

Block building fails after runtime upgrade with polkadot-stable2512 (setValidationData 2-arg format + slot mismatch) #1003

@manuelmauro

Description

@manuelmauro

Description

After upgrading a runtime from a pre-stable2512 version to a stable2512-based runtime using chopsticks, block building fails with two issues:

1. Cannot decode parent block validation data after upgrade

After the runtime upgrade, chopsticks tries to read the parent block's parachainSystem.setValidationData extrinsic to extract validation data, but fails because the API metadata has changed to the new 2-argument format while the parent block uses the old 1-argument format:

WARN: Failed to get validation data from block 15521320 Error: createType(GenericExtrinsic):: createType(ExtrinsicV4):: createType(Call):: Call: failed decoding parachainSystem.setValidationData:: Struct: failed on args: {"data":"...","inbound_messages_data":"..."}

2. Relay slot mismatch causes runtime panic

After the upgrade, the relay chain slot and parachain timestamp become out of sync by 1 slot, causing a runtime panic:

Runtime has aborted: "panicked at pallets/async-backing/src/lib.rs:137:3:
assertion `left == right` failed: The parachain timestamp slot must match the relay chain slot.
  left: Slot(295523947)
  right: Slot(295523948)"

The +1 relay slot adjustment from #959 seems to cause the relay slot and parachain timestamp to diverge after a runtime upgrade.

Reproduction

  1. Fork a live Moonbase Alpha chain using chopsticks 1.2.7
  2. Apply a runtime upgrade from a pre-stable2512 runtime to a stable2512 runtime
  3. Try to create blocks after the upgrade

Related

Versions

  • chopsticks: 1.2.7
  • Runtime: Moonbeam stable2512 (specVersion 4300)
  • polkadot-sdk: stable2512

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions