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

tari-project / tari / 34224064744
76%

Build:
DEFAULT BRANCH: development
Ran 08 Sep 2026 12:56PM UTC
Jobs 1
Files 776
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

08 Sep 2026 12:04PM UTC coverage: 62.274% (+0.7%) from 61.556%
34224064744

push

github

web-flow
fix: decouple liveness ping timeout from ping interval (#7992)

`LivenessService` reused `auto_ping_interval` as the per-ping in-flight
TTL, so configuring a faster ping rate silently tightened the failure
deadline by the same factor. Three consecutive expiries hard-disconnect
the peer, so a short interval (3s in the cucumber suite, 100ms in a sync
test helper) turned liveness into a trigger-happy peer killer under load
- including tearing down the peer an in-progress sync was using.

The inversion was that `MAX_INFLIGHT_TTL` (30s) only applied when
auto-ping was *disabled*: turning the feature on at a short interval
made the failure detector up to 30x more aggressive than leaving it off.

- Add `LivenessConfig::max_inflight_ttl`, defaulting to
`MAX_INFLIGHT_TTL` (30s), and use it at both ping-send call sites. Rate
and timeout are now independent knobs. `MAX_INFLIGHT_TTL` moves to
`config.rs`; the public path
`tari_p2p::services::liveness::MAX_INFLIGHT_TTL` is unchanged.
- `disconnect_failed_peers` now skips strongly held connections,
mirroring the `!conn.is_strongly_held()` guard the connectivity manager
already applies in `reap_inactive_connections` and
`minimize_connections`. Liveness was the one reaper that bypassed it,
which is what allowed it to abort a running sync.
- Tests: a short `auto_ping_interval` must not shorten the TTL or
increment the failed-ping counter, plus a strongly-held-connection guard
test, each with a control proving the harness can observe the
disconnect.


<!-- greptile_comment -->

<h3>Greptile Summary</h3>

This PR separates the liveness ping timeout from the automatic ping
interval and protects strongly held connections from liveness-driven
disconnection.
- Adds a 30-second default `max_inflight_ttl` and applies it to manual
and automatic pings.
- Preserves the public `MAX_INFLIGHT_TTL` re-export.
- Skips failed-peer disconnection while another subsystem strongly holds
the connection.
- Adds regression and control tests ... (continued)

123 of 126 new or added lines in 2 files covered. (97.62%)

58 existing lines in 11 files now uncovered.

84442 of 135598 relevant lines covered (62.27%)

259338.17 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
90.0
3.39% base_layer/p2p/src/services/liveness/service.rs

Coverage Regressions

Lines Coverage ∆ File
19
55.27
5.02% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
13
69.41
-1.86% comms/dht/src/connectivity/mod.rs
6
57.77
5.21% base_layer/core/src/chain_storage/blockchain_database.rs
6
73.07
-0.25% comms/core/src/connectivity/manager.rs
5
56.4
-0.63% base_layer/core/src/base_node/comms_interface/inbound_handlers.rs
3
87.93
-0.55% comms/core/src/connection_manager/peer_connection.rs
2
83.81
-0.32% comms/core/src/protocol/rpc/client/mod.rs
1
46.97
33.33% base_layer/core/src/chain_storage/block_add_result.rs
1
69.95
-0.49% comms/core/src/connectivity/requester.rs
1
49.06
-0.94% comms/core/src/connectivity/selection.rs
1
82.94
-0.2% comms/core/src/noise/socket.rs
Jobs
ID Job ID Ran Files Coverage
1 34224064744.1 08 Sep 2026 12:56PM UTC 776
62.27
GitHub Action Run
Source Files on build 34224064744
  • Tree
  • List 776
  • Changed 39
  • Source Changed 4
  • Coverage Changed 38
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34224064744
  • 6bfdb52e on github
  • Prev Build on development (#34139610634)
  • Next Build on development (#34353387950)
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