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

tari-project / tari / 41987697257
79%

Build:
DEFAULT BRANCH: development
Ran 05 Nov 2026 09:34AM UTC
Jobs 1
Files 799
Run time 1min
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

05 Nov 2026 07:30AM UTC coverage: 77.833% (-0.01%) from 77.844%
41987697257

push

github

web-flow
fix(base-node): derive the pruning target from validated headers (#8257)

## Description

A pruned node could prune blocks it still needed, because the pruning
target came from a peer's claim that nothing had checked. When choosing
between block sync and horizon sync, the node set the new horizon from
the highest `best_block_height` any sync peer claimed. A peer claiming
`tip + pruning_horizon` therefore made the node prune right up to its
own tip. The background pruner only ever moves forward, so the node
never got those blocks back.

## Changes

- **`sync_decide.rs`**: the horizon now comes from the local validated
header tip (`fetch_last_header`), as horizon state sync already does.
The prune target is capped at `local tip - pruning_horizon`. Claimed
metadata is still used to choose sync peers. Archival nodes are
unaffected.
- **`header_sync`**: new `PeerSentInaccurateChainHeight { claimed,
actual }` error with a short ban, the same as the difficulty rule. It
fires once a peer has served all its headers, if the peer claimed a
higher best block height than the last header it delivered and the
delivered accumulated difficulty equals the claimed difficulty. It is
checked on both the short-batch path and the streamed path. A peer that
delivers more difficulty than it claimed is not banned: its claim is
just out of date, for example after a reorg onto a heavier but shorter
chain.

## Tests

- `DecideNextSync` on a pruned node, where a peer claims `tip +
horizon`:
- header tip at the block tip → prunes to `tip - horizon`, not to the
tip;
- header tip ahead of the block tip → still never above `tip - horizon`.
- Archival node → no pruning.
- Header sync, where a peer claims one block more than it served →
banned on the short-batch path and on the streamed path.
- Header sync, where a peer has an out-of-date higher claim but
delivered more difficulty → syncs without a ban.

Ran `cargo ci-test` (all tests passing at the first commit),
`ci-clippy`, `ci-check... (continued)

25 of 27 new or added lines in 3 files covered. (92.59%)

148 existing lines in 20 files now uncovered.

144030 of 185051 relevant lines covered (77.83%)

967455.93 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
90.41
0.0% base_layer/core/src/base_node/state_machine_service/states/sync_decide.rs

Coverage Regressions

Lines Coverage ∆ File
38
64.54
0.54% base_layer/core/src/chain_storage/blockchain_database.rs
21
66.34
-0.28% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
17
77.61
-0.83% comms/core/src/connectivity/manager.rs
13
57.42
-4.19% comms/dht/src/network_discovery/state_machine.rs
9
80.76
-0.93% comms/dht/src/connectivity/mod.rs
6
94.15
-0.13% base_layer/core/src/base_node/sync/horizon_state_sync/synchronizer.rs
6
89.37
-0.87% comms/core/src/connection_manager/dialer.rs
5
87.03
-0.54% base_layer/core/src/base_node/service/service.rs
5
85.8
-3.09% comms/core/src/protocol/messaging/inbound.rs
5
92.42
-1.02% comms/dht/src/outbound/broadcast.rs
4
0.0
-13.33% base_layer/core/src/base_node/comms_interface/comms_response.rs
3
72.94
0.0% base_layer/wallet/src/output_manager_service/storage/sqlite_db/mod.rs
3
77.52
0.0% base_layer/wallet/src/transaction_service/storage/sqlite_db.rs
3
81.25
-1.56% comms/core/src/pipeline/outbound.rs
3
90.76
-0.33% comms/dht/src/actor.rs
2
83.79
-0.19% base_layer/wallet/src/storage/sqlite_db/wallet.rs
2
87.04
-0.46% comms/dht/src/network_discovery/rebootstrap.rs
1
49.06
-0.94% comms/core/src/connectivity/selection.rs
1
36.36
-9.09% comms/dht/src/outbound/error.rs
1
33.96
-1.89% comms/dht/src/outbound/message.rs
Jobs
ID Job ID Ran Files Coverage
1 41987697257.1 05 Nov 2026 09:34AM UTC 799
77.83
GitHub Action Run
Source Files on build 41987697257
  • Tree
  • List 799
  • Changed 30
  • Source Changed 3
  • Coverage Changed 30
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41987697257
  • c41d3ae9 on github
  • Prev Build on development (#41829828991)
  • Next Build on development (#42017199593)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc