• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tari-project / tari / 17328022990
62%

Build:
DEFAULT BRANCH: development
Ran 29 Aug 2025 05:07PM UTC
Jobs 1
Files 700
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Aug 2025 03:33PM UTC coverage: 61.105% (+1.0%) from 60.114%
17328022990

push

github

web-flow
feat: improve header sync (#7421)

Description
---
When we have a valid PoW equal to or higher than what we have or what
has been advertised by the sync peer, we need to commit the headers, so
any downstream block sync error does not invalidate the headers that
have been downloaded.

_**Edit:** When block sync fails, we also make sure to swap to the best
PoW chain, also preserving banked headers if we do not need to reorg._

Closes #7342

Motivation and Context
---
See #7342

How Has This Been Tested?
---
System-level tests passed:
- Synching a previously synced node, a couple of days old.
- Syncing from scratch, encountering multiple block-sync failures, but
using the good PoW headers already banked.
```rust
   51952: 2025-08-18 16:07:02.097680100 [c::bn::block_sync] DEBUG Validating block body #22624 (PoW = RandomXTari, input(s): 1, output(s): 54, kernel(s): 2, latency: 108.00µs)
   51961: 2025-08-18 16:07:02.111648900 [c::bn::block_sync] DEBUG Validated in 14ms. Storing block body #22624 (PoW = RandomXTari, input(s): 1, output(s): 54, kernel(s): 2)
   51962: 2025-08-18 16:07:02.111668100 [c::bn::block_sync] TRACE Hash: <a class=hub.com/tari-project/tari/commit/91a1fbccc1f94e2aa93b6efdaf9c3fbf16d0588c">91a1fbccc<a href="https://github.com/tari-project/tari/commit/84c81d129edc8d90adeec2eed2e207a61b44bef4">3458b7ef444e605f62375077
   54024: 2025-08-18 16:11:06.389482300 [c::bn::block_sync] WARN  Peer did not supply all the blocks they claimed they had: Their claim - height: 74721, accumulated difficulty: <a class="double-link" href="https://github.com/tari-project/tari/commit/4089235547434023187024157117581153168163">408923554</a><a href="https://github.com/tari-project/tari/commit/84c81d129edc8d90adeec2eed2e207a61b44bef4">715651441378. Our status after block sync - height: 22624, accumulated difficulty: </a><a class="double-link" href="https://github.com/tari-project/tari/commit/1547640955349056263010512134240412613668">154764095</a><a href="https://github.com/tari-project/tari/commit/84c81d129edc8d90adeec2eed2e207a61b44bef4">889130919000
   54028: 2025-08-18 16:11:06.390047900 [c::bn::block_sync] WARN  Block sync failed - best header: 74723/1bcf293971df2d6c888a6589dca3a323b, best block: 22624/91a1fbccc1f94e2aa93b6efdaf9c3fbf16d0588c3458b7ef444e605f62375077. No more sync peers available: Block sync failed
   54109: 2025-08-18 16:11:11.596105400 [c::bn::header_sync] DEBUG Starting header sync.
   54110: 2025-08-18 16:11:11.59617... (continued)

70 of 132 new or added lines in 3 files covered. (53.03%)

11 existing lines in 6 files now uncovered.

72705 of 118983 relevant lines covered (61.11%)

229424.73 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
15
0.0
0.0% base_layer/core/src/base_node/state_machine_service/states/block_sync.rs
16
56.3
15.41% base_layer/core/src/chain_storage/blockchain_database.rs
31
0.0
0.0% base_layer/core/src/base_node/sync/header_sync/synchronizer.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
17.44
-1.16% base_layer/core/src/chain_storage/error.rs
1
55.7
-0.42% base_layer/transaction_key_manager/src/storage/sqlite_db/mod.rs
1
50.19
-0.04% base_layer/wallet/src/transaction_service/storage/sqlite_db.rs
2
0.0
0.0% base_layer/core/src/base_node/state_machine_service/states/block_sync.rs
2
61.28
0.4% comms/dht/src/connectivity/mod.rs
4
56.63
12.32% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
Jobs
ID Job ID Ran Files Coverage
1 17328022990.1 29 Aug 2025 05:06PM UTC 700
61.11
GitHub Action Run
Source Files on build 17328022990
  • Tree
  • List 700
  • Changed 33
  • Source Changed 3
  • Coverage Changed 33
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #17328022990
  • 84c81d12 on github
  • Prev Build on development (#17324214766)
  • Next Build on development (#17372468680)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc