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 <[email protected]> Co-authored-by: Sebastian Kunert <[email protected]>