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

tari-project / tari / 33423629872
77%

Build:
DEFAULT BRANCH: development
Ran 31 Aug 2026 06:56PM UTC
Jobs 1
Files 709
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

31 Aug 2026 06:11PM UTC coverage: 63.739% (+0.9%) from 62.864%
33423629872

push

github

web-flow
fix: stop running peer-database SQLite on tokio worker threads (#7981)

Every `PeerManager` method was an `async fn` with no await points that
called straight into diesel/r2d2. That blocks the *worker thread*, not
just the task, so a contended peer database drained the tokio worker
pool one thread at a time until the comms actors stopped being
scheduled: the node kept its TCP connections but could no longer dial or
propagate, and only a restart recovered it. The error that surfaced was
four layers away, in the outbound pipeline, reporting a deadlock in a
pipeline that was nearly empty.

Root cause fix
- Add `BlockingPeerStorage`, which owns the only `PeerStorageSql` handle
and exposes it solely through `call()`, dispatching to
`tokio::task::spawn_blocking`. The handle is private and has no
accessor, so a synchronous peer database call from `PeerManager` no
longer compiles.

Supporting changes
- Scope the peer database's `PRAGMA busy_timeout` to 10s
(`PEER_DATABASE_BUSY_TIMEOUT`) via new
`DbConnection::connect_{url,and_migrate}_with_busy_timeout`. The shared
60s default is unchanged for every other database, including the
wallet's, where losing a write is worse than waiting.
- Shed slow peer lookups in actor context: the ban check in
`ConnectivityManager::handle_dial_peer`, the lookup in
`ConnectionManager::dial_peer` and the dialer's peer write-back are now
bounded by `PEER_LOOKUP_TIMEOUT` (5s). The query still completes on the
blocking pool; the actor just stops waiting for it.
- Back off unresolvable dials in the DHT connectivity pool. Failed dials
now carry per-peer exponential backoff (30s doubling to 10m), so a pool
that never becomes healthy no longer re-dials the same unreachable peers
every cycle - which was the write load that tipped the peer database
over, since every failed dial writes back through `add_or_update_peer`.
- Make the outbound pipeline's timeout message distinguish "pipeline
saturated" from "downstream actor unresponsive", usin... (continued)

1300 of 1485 new or added lines in 16 files covered. (87.54%)

212 existing lines in 29 files now uncovered.

78728 of 123516 relevant lines covered (63.74%)

338369.48 hits per line

Uncovered Changes

Lines Coverage ∆ File
42
88.87
3.93% comms/core/src/peer_manager/manager.rs
41
75.84
4.81% comms/core/src/protocol/messaging/protocol.rs
27
67.3
5.49% comms/core/src/connectivity/manager.rs
23
74.07
12.1% comms/core/src/protocol/messaging/inbound.rs
16
63.04
-0.9% comms/dht/src/connectivity/mod.rs
7
78.29
-4.02% comms/core/src/connection_manager/manager.rs
7
79.69
-1.67% comms/core/src/pipeline/outbound.rs
5
25.4
0.15% base_layer/p2p/src/initialization.rs
5
92.02
-4.83% comms/core/src/protocol/messaging/outbound.rs
4
98.83
-0.48% comms/core/src/protocol/messaging/test.rs
3
82.2
-0.06% comms/core/src/connection_manager/dialer.rs
3
78.57
comms/core/src/peer_manager/blocking_storage.rs
2
87.95
-0.52% common_sqlite/src/connection.rs

Coverage Regressions

Lines Coverage ∆ File
47
53.61
-0.3% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
34
54.83
-0.58% base_layer/core/src/chain_storage/blockchain_database.rs
15
76.04
-7.29% comms/dht/src/connectivity/metrics.rs
12
89.04
-5.48% base_layer/transaction_components/src/validation/helpers.rs
12
81.18
-6.45% comms/core/src/connectivity/proactive_dialer.rs
11
63.04
-0.9% comms/dht/src/connectivity/mod.rs
9
46.58
8.22% base_layer/core/src/base_node/state_machine_service/states/sync_decide.rs
8
59.4
-1.34% base_layer/core/src/base_node/sync/header_sync/synchronizer.rs
7
71.88
-0.13% base_layer/core/src/test_helpers/blockchain.rs
7
78.29
-4.02% comms/core/src/connection_manager/manager.rs
6
91.48
-0.35% base_layer/transaction_components/src/transaction_builder/builder.rs
6
95.36
-3.83% comms/dht/src/connectivity/test.rs
5
67.3
5.49% comms/core/src/connectivity/manager.rs
5
88.87
3.93% comms/core/src/peer_manager/manager.rs
4
99.03
-0.64% base_layer/core/src/validation/block_body/test.rs
4
91.73
-1.57% base_layer/core/src/validation/header/header_full_validator.rs
4
0.0
-80.0% comms/core/src/protocol/messaging/error.rs
3
92.02
-4.83% comms/core/src/protocol/messaging/outbound.rs
2
74.32
-0.6% base_layer/core/src/validation/aggregate_body/aggregate_body_chain_validator.rs
2
58.13
-0.49% base_layer/core/src/validation/helpers.rs
1
98.88
-1.12% base_layer/common_types/src/dammsum.rs
1
50.57
0.0% base_layer/core/src/base_node/comms_interface/inbound_handlers.rs
1
28.0
-4.0% base_layer/core/src/base_node/sync/header_sync/error.rs
1
45.45
-1.52% base_layer/core/src/chain_storage/block_add_result.rs
1
92.86
-2.38% base_layer/core/src/validation/chain_balance.rs
1
99.2
-0.2% base_layer/transaction_components/src/test_helpers/test_helpers_functions.rs
1
87.95
-0.52% common_sqlite/src/connection.rs
1
74.07
12.1% comms/core/src/protocol/messaging/inbound.rs
1
98.83
-0.48% comms/core/src/protocol/messaging/test.rs
Jobs
ID Job ID Ran Files Coverage
1 33423629872.1 31 Aug 2026 06:56PM UTC 709
63.74
GitHub Action Run
Source Files on build 33423629872
  • Tree
  • List 709
  • Changed 62
  • Source Changed 17
  • Coverage Changed 62
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33423629872
  • 600b4007 on github
  • Prev Build on development (#33269502069)
  • Next Build on development (#33493219414)
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