hotfix: blockchain/backend: Skip genesis leaf to unblock syncing (#5103)
This PR effectively skips over cases where the blockchain reports the genesis block as leaf. The issue manifests as the blockchain getting stuck and not importing blocks after a while. Although the root-cause of why the blockchain reports the genesis as leaf is not scoped, this hot-fix is unblocking the new release. While at it, added some extra debug logs to identify issues more easily in the future. ### Issue ``` 2024-07-22 10:06:08.708 DEBUG tokio-runtime-worker db::blockchain: Checking for displaced leaves after finalization. leaves=[0xd62aea69664b74c55b7e79ab5855b117d213156a5e9ab05ad0737772aaf42c14, 0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe] finalized_block_hash=0x8f8e…7f34 finalized_block_number=24148459 2024-07-22 10:06:08.708 DEBUG tokio-runtime-worker db::blockchain: Handle displaced leaf 0xd62aea69664b74c55b7e79ab5855b117d213156a5e9ab05ad0737772aaf42c14 (elapsed 25.74µs) leaf_number=24148577 ...
parent
7f905e28
Showing
- prdoc/pr_5103.prdoc 18 additions, 0 deletionsprdoc/pr_5103.prdoc
- substrate/client/db/src/lib.rs 2 additions, 2 deletionssubstrate/client/db/src/lib.rs
- substrate/primitives/blockchain/src/backend.rs 135 additions, 9 deletionssubstrate/primitives/blockchain/src/backend.rs
- substrate/zombienet/0001-basic-warp-sync/test-warp-sync.toml 1 addition, 1 deletionsubstrate/zombienet/0001-basic-warp-sync/test-warp-sync.toml
- substrate/zombienet/0001-basic-warp-sync/test-warp-sync.zndsl 1 addition, 0 deletions...trate/zombienet/0001-basic-warp-sync/test-warp-sync.zndsl
Please register or sign in to comment