polkadot-sdk icon indicating copy to clipboard operation
polkadot-sdk copied to clipboard

chainHead: Track reported blocks to capture notification gaps

Open lexnv opened this issue 4 months ago • 0 comments

There are cases during warp sync or re-orgs, where we receive a notification with a block parent that was not reported in the past. This PR extends the tracking state to catch those cases and report a Stop event to the user.

This PR adds a new state to the RPC-v2 chainHead to track which blocks have been reported.

In the past we relied on the pinning mechanism to provide us details if a block is pinned or not. However, the pinning state keeps the minimal information around for pinning. Therefore, unpinning a block will cause the state to disappear.

Closes: https://github.com/paritytech/polkadot-sdk/issues/5761

lexnv avatar Sep 27 '24 09:09 lexnv