Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Implement StagingValidityConstraints Runtime API method #6036

Closed
slumber opened this issue Sep 21, 2022 · 4 comments
Closed

Implement StagingValidityConstraints Runtime API method #6036

slumber opened this issue Sep 21, 2022 · 4 comments
Assignees

Comments

@slumber
Copy link
Contributor

slumber commented Sep 21, 2022

A corresponding TODO

// TODO [now]: implicit `validity_constraints`. Ensure that `min_relay_parent`
// never goes lower than the point at which asynchronous backing was enabled.
// Also, never cross session boundaries.

Called in
#[overseer::contextbounds(ProspectiveParachains, prefix = self::overseer)]
async fn fetch_base_constraints<Context>(
ctx: &mut Context,
relay_parent: Hash,
para_id: ParaId,
) -> JfyiErrorResult<Option<Constraints>> {
let (tx, rx) = oneshot::channel();
ctx.send_message(RuntimeApiMessage::Request(
relay_parent,
RuntimeApiRequest::StagingValidityConstraints(para_id, tx),
))
.await;
Ok(rx.await.map_err(JfyiError::RuntimeApiRequestCanceled)??.map(From::from))
}

@slumber
Copy link
Contributor Author

slumber commented Sep 21, 2022

cc @rphmeier

@rphmeier
Copy link
Contributor

Yes. Worth noting that in #6014 we leaned heavier on the "Also, never cross session boundaries" part.

@eskimor
Copy link
Member

eskimor commented Sep 23, 2022

Also make sure to use the new staging API functionality for this.

@slumber
Copy link
Contributor Author

slumber commented Nov 13, 2022

Resolved by #6258

@slumber slumber closed this as completed Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants