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.

JustifiedBlockAnnounceValidator requires the Polkadot service which is created later #104

@cecton

Description

@cecton

At the moment there is a DelayedBlockAnnounceValidator that allow to validate data when its internal
BlockAnnounceValidator is set. Ideally we don't want to have that "delayed" mechanism at all.

This is required for now because the BlockAnnounceValidator is set during the build of a
Service (see substrate: client/service/builder.rs) and our JustifiedBlockAnnounceValidator
requires a Polkadot client but we get this client only when the Polkadot service is created
(chicken and egg problem).

One way to solve this would be to split the start_collator into a "prepare" step where we
receive the service with the client and a "build/start" step where we finalize and run the
collator. Unfortunately the type of the service may vary (Polkadot, Kusama, Westend) and it
can't be dynamically dispatched because the services (and the client) have Self as type
parameters in the supertraits (or where-clauses).

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