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

Implement/investigate how to get sync_best_known_block_number metric in P2P mode #2162

Open
wojciechos opened this issue Sep 18, 2024 · 0 comments

Comments

@wojciechos
Copy link
Contributor

wojciechos commented Sep 18, 2024

In P2P mode, the sync_best_known_block_number metric is currently returning 0, which is negatively impacting the calculation of the blocks_behind metric in Grafana. This issue makes it difficult to track the node’s sync status accurately, leading to incorrect reporting of sync progress.

While syncing from the feeder, we fetch the sync_best_known_block_number directly from the feeder. However, in P2P sync mode, we should determine the highest block height among all peers. As far as I know, there is currently no feature in the Starknet P2P specification that provides a direct way to retrieve the highest block number from peer.

Action Items:

  • Investigate how to set sync_best_known_block_number for P2P mode by considering the block heights from connected peers.

  • Check whether a feature to retrieve the highest block height from peers is supported or needs to be added to the Starknet P2P specification. How it works in Ethereum?

  • Ensure that the updated metric provides accurate information to Grafana, facilitating correct tracking of node sync progress.

@wojciechos wojciechos added the Bug Something isn't working or security issue label Sep 18, 2024
@wojciechos wojciechos changed the title Fix sync_best_known_block_number metric in P2P mode Implement/investigate how to get sync_best_known_block_number metric in P2P mode Sep 19, 2024
@wojciechos wojciechos removed the Bug Something isn't working or security issue label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant