chainHead: Track reported blocks to capture notification gaps (#5856)
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 --------- Signed-off-by:Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by:
Sebastian Kunert <skunert49@gmail.com>
Showing
- prdoc/pr_5856.prdoc 17 additions, 0 deletionsprdoc/pr_5856.prdoc
- substrate/client/rpc-spec-v2/src/chain_head/chain_head_follow.rs 133 additions, 18 deletions...te/client/rpc-spec-v2/src/chain_head/chain_head_follow.rs
- substrate/client/rpc-spec-v2/src/chain_head/tests.rs 68 additions, 0 deletionssubstrate/client/rpc-spec-v2/src/chain_head/tests.rs
Please register or sign in to comment