AleoNet / snarkOS

A Decentralized Operating System for ZK Applications
http://snarkos.org
Apache License 2.0
4.1k stars 2.57k forks source link

[Bug] Sync status incorrectly reported #3293

Closed nathanhopp closed 4 weeks ago

nathanhopp commented 1 month ago

🐛 Bug Report

snarkos_bft_is_synced metric always reports 0. It appears its criteria to be considered synced is either too strict or flawed.

I confirmed with client and validator operators on canary net that they also see this issue.

Steps to Reproduce

Based on slack threads, any client or validator will see their node as not synced.

Expected Behavior

Once the node is synced, or within certain block time of current time the node should report itself as synced.

Your Environment

vicsn commented 1 month ago

This should fix it https://github.com/AleoNet/snarkOS/pull/3295

nathanhopp commented 3 weeks ago

Hello, i'm seeing seeing this issue after canary restart on branch canary-v0.2.1 @zosorock @vicsn

2024-06-13T18:03:12.249126Z TRACE snarkos_node_sync::block_sync: Updating is_block_synced: greatest_peer_height = 0, canon_height = 21188
2024-06-13T18:03:17.250497Z TRACE snarkos_node_sync::block_sync: Updating is_block_synced: greatest_peer_height = 0, canon_height = 21188
2024-06-13T18:03:22.251408Z TRACE snarkos_node_sync::block_sync: Updating is_block_synced: greatest_peer_height = 21191, canon_height = 21188
2024-06-13T18:03:32.276380Z TRACE snarkos_node_sync::block_sync: Updating is_block_synced: greatest_peer_height = 0, canon_height = 21194
joske commented 3 weeks ago

it's normal, when the node is not connected to any peers, it will report greatest_peer_height = 0