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

Finality is much faster in reality than visible on Subscan UI #103

Open
2 tasks done
eskimor opened this issue Jul 31, 2024 · 4 comments
Open
2 tasks done

Finality is much faster in reality than visible on Subscan UI #103

eskimor opened this issue Jul 31, 2024 · 4 comments
Assignees
Labels
kind/enhancement New feature or request

Comments

@eskimor
Copy link

eskimor commented Jul 31, 2024

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have read the Subscan API documentation (if it seemed to be an API bug).

Affected Network(s)

Polkadot, maybe others as well.

Steps to reproduce

  1. Visit: https://polkadot.subscan.io/block and see that it takes almost a minute for blocks to get the "green" checkmark.
  2. Check e.g. in Polkadot JS that actual finality lag is never more than 5 blocks (30s), usually much less (2-3 blocks).

Expected output

I would expect the UI to reflect the actual finality status much closer.

Actual output

Time to finality is about a minute in the UI.

Additional factoids or references

The issue with the slow UI update is that it lets Polkadot look worse than it actually is.

@eskimor eskimor added the kind/bug Something isn't working label Jul 31, 2024
@freehere107
Copy link
Contributor

Hi. @eskimor The issue you’re experiencing is related to how transaction indexing works in the current Substrate-based blockchain systems.
The reason for this delay is that Substrate chains still experience a significant number of block reorganizations (reorgs). To mitigate the impact of these reorgs and ensure data consistency, Subscan currently indexes transfer data only after a block has been finalized for 2-3 blocks.
This approach helps to avoid situations where transactions might appear and then disappear due to chain reorganizations. While this does cause a delay in transaction visibility, it ensures that the data you see is more stable and reliable.

@freehere107
Copy link
Contributor

In our latest plan, we also investigate how to minimize the delay. If there is more progress, we will update to subscan as soon as possible.

@freehere107 freehere107 added kind/enhancement New feature or request and removed kind/bug Something isn't working labels Jul 31, 2024
@eskimor
Copy link
Author

eskimor commented Jul 31, 2024

Hi @freehere107 ! Thanks for the very quick response. I am not quite following how reorgs should affect blocks that are already finalized. Once a block is final, there can not be any reorg invalidating that block, otherwise we would be having a serious issue.

What instabilities have there been?

@eskimor eskimor changed the title Finality is happening much faster than what the UI changing blocks to confirmed. Finality is much faster in reality than visible on Subscan UI Jul 31, 2024
@freehere107
Copy link
Contributor

@eskimor I reviewed our current solution and found that the finalized block we considered previously had some problems. We are currently making adjustments and the indexing speed of the finalized block should be faster after the upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants