paritytech / json-rpc-interface-spec

30 stars 3 forks source link

chainHead/follow: Provide multiple finalized block hashes by the `Initialized` event #136

Closed lexnv closed 9 months ago

lexnv commented 9 months ago

This PR extends the Initialized event of the chainHead_follow subscription.

Now, the event provides multiple finalized block hashes. This information allows clients that are disconnected, and that want to reconnect, to not lose information about the state of the chain.

At the moment, the spec encourages servers to provide at least 1 minute of finalized blocks (~10 blocks). The users are responsible for unpinning these blocks at a later time.

Closes: https://github.com/paritytech/json-rpc-interface-spec/issues/81

cc @paritytech/subxt-team

tomaka commented 9 months ago

Also a block -> blocks missing near the start of the The withRuntime parameter section And the Pinning section also needs small adjustments