Skip to content

Add new variant of persisted_validation_data runtime API for elastic scaling #3776

@sandreim

Description

@sandreim

We need to introduce a new RuntimeAPI that accounts for a parachain having multiple cores assigned. In it's current form it's signature looks like this:
fn persisted_validation_data(para_id: ParaId, assumption: OccupiedCoreAssumption)

But, after merging #3479 the semantics of the assumption are changed and refer to a group of cores rather than a single core. Currently, the way the assumption works in practice is that collators can be optimistic around candidates pending availability on certain cores. But with elastic scaling parachains the runtime enacts the full chain of pending availability candidates rather than individual ones.

For example, if the following chained candidates A,B,C are pending availability at RCB N. We delay enacting B and C even if they became available at N+1 until A has become available.

So collators need to bet on the length of the chain that gets included in the next block, such that they can properly build the next candidates and avoiding doing useless work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T4-runtime_APIThis PR/Issue is related to runtime APIs.T8-polkadotThis PR/Issue is related to/affects the Polkadot network.

    Type

    No type

    Projects

    Status

    Completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions