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

tari-project / tari / 41092230564
79%

Build:
DEFAULT BRANCH: development
Ran 30 Oct 2026 06:25PM 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

30 Oct 2026 04:41PM UTC coverage: 77.484% (+0.5%) from 76.992%
41092230564

push

github

web-flow
fix(header-sync): do not record out-of-sequence headers as bad blocks (#8204)

Description
---
Header sync no longer adds a header to the bad block list when its only
fault is that it does not follow the previous header in the peer's
stream.

- `BlockHeaderSyncValidator::validate` now first checks the incoming
header against the previous header in the sync state. A wrong height
returns `InvalidBlockHeight`, and a wrong `prev_hash` returns
`ChainLinkBroken`, which was previously never used. Both are sync errors
and keep their existing Long ban, but they are never written to
`bad_blocks`.
- As a backstop, `blacklist_unless_verdict_can_change` also exempts
`InvalidHeight` and `InvalidPreviousHash`.
- `InvalidTimestamp` and every other check of the header itself still
blacklist as before.
- The `HeaderFullValidator` comment that called the Monero seed check
the only chain-dependent verdict now also mentions height and previous
hash.

Motivation and Context
---
`HeaderFullValidator` checks height and previous hash against whatever
header the caller passes as the parent. During header sync that parent
is the previous header in the peer's stream. A peer could send a valid
header out of order, for example a header repeated, a height skipped, or
a header from another fork. The header then failed `InvalidHeight` or
`InvalidPreviousHash`, and its hash was recorded as a bad block. Every
honest peer that later served that valid header hit `BadBlockFound` and
was banned, so the node stopped making progress on that chain until bad
blocks were cleared.

How Has This Been Tested?
---
New unit tests in `header_sync/validator.rs`:
- **Repeated header** `[h13, h13]` and **skipped height** `[h13, h15]`:
rejected with `InvalidBlockHeight` and bannable. Neither header is
recorded as a bad block, and a fresh validator then accepts the real
chain.
- **Wrong parent at the right height:** rejected with `ChainLinkBroken`
and not recorded as a bad block.
- **Out-of-order timestam... (continued)

153 of 154 new or added lines in 1 file covered. (99.35%)

2619 existing lines in 30 files now uncovered.

141122 of 182131 relevant lines covered (77.48%)

698018.56 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
97.42
0.39% base_layer/core/src/base_node/sync/header_sync/validator.rs

Coverage Regressions

Lines Coverage ∆ File
848
63.39
5.83% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
541
39.47
-0.9% base_layer/wallet/src/transaction_service/service.rs
540
50.13
1.24% base_layer/wallet/src/output_manager_service/service.rs
236
61.44
-2.31% base_layer/core/src/chain_storage/blockchain_database.rs
148
94.69
11.54% base_layer/core/src/base_node/sync/horizon_state_sync/synchronizer.rs
89
40.33
1.33% base_layer/wallet/src/output_manager_service/handle.rs
62
66.03
1.24% base_layer/core/src/chain_storage/db_transaction.rs
35
93.27
3.82% base_layer/core/src/chain_storage/lmdb_db/validator_node_store.rs
20
80.73
17.22% base_layer/core/src/base_node/sync/horizon_state_sync/error.rs
18
77.19
-1.11% comms/core/src/connectivity/manager.rs
13
85.58
8.61% base_layer/core/src/test_helpers/blockchain.rs
13
14.29
0.0% base_layer/wallet/src/transaction_service/error.rs
10
91.05
-4.85% base_layer/core/src/chain_storage/async_db.rs
6
72.72
-0.22% base_layer/wallet/src/output_manager_service/storage/sqlite_db/mod.rs
5
73.6
-0.45% base_layer/core/src/base_node/comms_interface/inbound_handlers.rs
4
77.37
-0.09% base_layer/wallet/src/transaction_service/storage/sqlite_db.rs
3
98.31
0.62% base_layer/core/src/chain_storage/lmdb_db/lmdb_tree_writer.rs
3
51.32
-3.95% base_layer/core/src/validation/error.rs
3
75.27
-3.23% base_layer/core/src/validation/mocks.rs
3
67.44
-6.98% base_layer/node_components/src/blocks/historical_block.rs
3
67.57
-8.11% comms/core/src/peer_manager/error.rs
3
90.41
-4.11% comms/core/src/pipeline/inbound.rs
2
59.04
1.2% base_layer/core/src/chain_storage/block_add_result.rs
2
97.73
0.73% base_layer/transaction_components/src/consensus/consensus_constants.rs
2
88.71
-0.31% comms/core/src/connection_manager/peer_connection.rs
2
86.42
-1.23% comms/core/src/protocol/messaging/inbound.rs
2
80.66
-0.21% comms/dht/src/connectivity/mod.rs
1
97.14
97.14% base_layer/common_types/src/grpc_authentication.rs
1
89.2
-0.17% comms/core/src/connection_manager/dialer.rs
1
68.97
-0.49% comms/core/src/connectivity/requester.rs
Jobs
ID Job ID Ran Files Coverage
1 41092230564.1 30 Oct 2026 06:25PM UTC 799
77.48
GitHub Action Run
Source Files on build 41092230564
  • Tree
  • List 799
  • Changed 50
  • Source Changed 16
  • Coverage Changed 48
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41092230564
  • 39948469 on github
  • Prev Build on development (#40846571167)
  • Next Build on development (#41611521299)
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