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

tari-project / tari / 15757511687
62%

Build:
DEFAULT BRANCH: development
Ran 19 Jun 2025 05:23PM UTC
Jobs 1
Files 693
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

19 Jun 2025 12:10PM UTC coverage: 72.219% (-0.02%) from 72.239%
15757511687

push

github

web-flow
fix: peer dialling (#7218)

## Description

Implements proactive peer dialing functionality to resolve connectivity
issues where nodes consistently dial fewer peers than needed to reach
target connection counts. The system now automatically dials 2-3x the
target number of peers to account for connection failures and ensures
robust network connectivity.

**Key Components:**
- **Proactive Dialer**: Core service that calculates optimal dial counts
based on historical success rates and intelligently selects healthy peer
candidates
- **Enhanced Connection Stats**: Extended `PeerConnectionStats` with
circuit breaker pattern integration and health scoring capabilities
- **Peer Health Metrics**: Circuit breaker pattern with time-windowed
success rate tracking and health scoring for peer selection
- **Health-Aware Peer Selection**: Enhanced `ConnectivitySelection` with
health-based prioritization for peer connection choices
- **Peer Discovery Bridge**: Triggers additional peer discovery when
insufficient candidates are available
- **Comprehensive Metrics**: Prometheus metrics for monitoring dial
attempts, success rates, circuit breaker states, and performance

**Architecture:**
- Actor-based service pattern with async message passing
- Integrates into existing ConnectivityManager's connection pool refresh
cycle (currently 180 seconds/3 minutes)
- Configurable multipliers and thresholds for different network
conditions
- Backward compatible with existing connectivity management

**Production Validation:** This implementation has been tested and
verified working on a live mainnet node, with logs confirming proper
execution and logic flow.

---

## Motivation and Context

**Problem:** Nodes were consistently dialing only ~5 peers instead of
sufficient peers to reach the target of 8 connections, leading to poor
network connectivity and potential isolation issues.

**Root Cause:** The existing connectivity manager only dialed exactly
the number of missing connectio... (continued)

522 of 760 new or added lines in 10 files covered. (68.68%)

72 existing lines in 14 files now uncovered.

82790 of 114637 relevant lines covered (72.22%)

240690.26 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
10
63.37
2.17% comms/core/src/connectivity/connection_stats.rs
14
63.1
-5.74% comms/core/src/connectivity/connection_pool.rs
37
58.67
1.12% comms/core/src/connectivity/manager.rs
39
81.78
comms/core/src/connectivity/proactive_dialer.rs
44
82.11
comms/core/src/connectivity/peer_health.rs
94
43.96
-42.71% comms/core/src/connectivity/selection.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
68.88
-0.12% base_layer/wallet/src/storage/sqlite_db/wallet.rs
1
80.25
-0.25% comms/core/src/connection_manager/peer_connection.rs
1
63.37
2.17% comms/core/src/connectivity/connection_stats.rs
1
91.44
0.1% comms/core/src/peer_manager/peer_storage_sql.rs
2
73.7
0.0% base_layer/wallet/src/transaction_service/protocols/transaction_receive_protocol.rs
2
81.44
-0.31% comms/core/src/protocol/rpc/client/mod.rs
2
95.87
-0.38% comms/dht/src/outbound/broadcast.rs
3
68.67
-1.29% comms/core/src/protocol/messaging/protocol.rs
5
64.52
-0.27% comms/dht/src/connectivity/mod.rs
7
83.6
-0.11% base_layer/wallet/src/transaction_service/storage/sqlite_db.rs
8
58.67
1.12% comms/core/src/connectivity/manager.rs
8
43.96
-42.71% comms/core/src/connectivity/selection.rs
10
74.59
-0.79% base_layer/wallet/src/output_manager_service/storage/sqlite_db/mod.rs
21
58.29
0.03% base_layer/wallet/src/transaction_service/service.rs
Jobs
ID Job ID Ran Files Coverage
1 15757511687.1 19 Jun 2025 05:23PM UTC 693
72.22
GitHub Action Run
Source Files on build 15757511687
  • Tree
  • List 693
  • Changed 23
  • Source Changed 8
  • Coverage Changed 23
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15757511687
  • 5a2b934c on github
  • Prev Build on development (#15731181023)
  • Next Build on development (#15780552521)
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