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

Parent search for Aura should draw upon real asynchronous backing parameters #2706

@rphmeier

Description

@rphmeier

We should read the storage of the relay chain at the relay parent, but if it's not present fall back to a default hardcoded value of 0. Adding a utility function for reading the asynchronous backing parameters from the host configuration would be helpful for writing collators in the future.

async fn max_ancestry_lookback(
_relay_parent: PHash,
_relay_client: &impl RelayChainInterface,
) -> usize {
// TODO [https://github.com/paritytech/polkadot/pull/5022]
// We need to read the relay-chain state to know what the maximum
// age truly is, but that depends on those pallets existing.
//
// For now, just provide the conservative value of '2'.
// Overestimating can cause problems, as we'd be building on forks of the
// chain that can never get included. Underestimating is less of an issue.
2
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    I4-annoyanceThe node behaves within expectations, however this “expected behaviour” itself is at issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions