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.

Block import notification for literally every imported block even when the chain is not synced to the tip #13315

@liuchengxu

Description

@liuchengxu

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

I'm looking for a block import notification that is fired on every imported block, the existing client.import_notification_stream() is fired only when on the tip or there is a re-org.

// We only notify when we are already synced to the tip of the chain
// or if this import triggers a re-org

In subspace, we have the consensus chain and execution chain, the execution chain is entirely driven by the consensus chain. Each domain block is derived from a consensus block in a deterministic way, we need a block notification of every single consensus block to build the execution chain accordingly even if the consensus chain is not fully synced.

Currently, we're using a custom block notification sent during the stage of consensus-level block import, but it has an issue (autonomys/subspace#1143) that some states might be unusable when the notification is received by the handler because the block import pipeline is not yet completed.

Steps to reproduce

No response

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