Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unstable rpc backend: best_block or all_blocks subscription may be silently lose blocks when reconnecting #1568

Open
niklasad1 opened this issue May 3, 2024 · 2 comments

Comments

@niklasad1
Copy link
Member

niklasad1 commented May 3, 2024

It's possible that blocks may be be silently missed if a reconnecting occurs because it's restarted by unstable backend.

For instance the following could happen:

  1. A connection is established
  2. Block A, Block B, and Block C are announced and propagated in the subscription
  3. The connection is lost and during this phase Block D is announced
  4. Then after a while the connection is re-established and the next Block E is announced.

Thus, Block D is missed and no way to now about it.

Because subxt mainly care about that finalized blocks, it's not critical for now.

@niklasad1 niklasad1 changed the title unstable backend: best_block or all_blocks subscription may be silently lose blocks when reconnecting unstable rpc backend: best_block or all_blocks subscription may be silently lose blocks when reconnecting May 3, 2024
@jsdw
Copy link
Collaborator

jsdw commented May 3, 2024

Yeah, it's hard to know how much I care about missed new/best block notifications because they are ephemeral anyway; as long as all finalized blocks are notified then it's all good, and if you re-subscribe then you should be told about recent new blocks and the latest current best block again anyways :)

@lexnv
Copy link
Collaborator

lexnv commented May 6, 2024

Yep, something we can think about in the future.
One use-case may be users that want to query a pruned block, where block D was announced, the client disconnected, the chain pruned block D and the client reconnects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants