Skip to content
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

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

Closed
Tracked by #1829
sandreim opened this issue Mar 21, 2024 · 2 comments
Closed
Tracked by #1829
Labels
T4-runtime_API This PR/Issue is related to runtime APIs. T8-polkadot This PR/Issue is related to/affects the Polkadot network.

Comments

@sandreim
Copy link
Contributor

sandreim commented Mar 21, 2024

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.

@sandreim sandreim added T4-runtime_API This PR/Issue is related to runtime APIs. T8-polkadot This PR/Issue is related to/affects the Polkadot network. labels Mar 21, 2024
@alindima
Copy link
Contributor

I don't think this is needed because I modified the runtime API implementation to force enact all occupied cores of a para for OccupiedCoreAssumption::Included

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.

I think in practice collators would always be optimistic that their backed candidates will get included.

Hence I think we can close this issue unless @skunert envisions a collator that would do such betting on which backed candidates will get included or timed out. I think an all or nothing approach as we have right now is enough

@skunert
Copy link
Contributor

skunert commented May 31, 2024

betting on which backed candidates will get included or timed out

I agree, from parachain perspective candidate timeouts are nothing we can influence so we need to be always optimistic about it.

@alindima alindima closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T4-runtime_API This PR/Issue is related to runtime APIs. T8-polkadot This PR/Issue is related to/affects the Polkadot network.
Projects
Status: Completed
Development

No branches or pull requests

3 participants