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

tari-project / tari / 13026118674
62%

Build:
DEFAULT BRANCH: development
Ran 29 Jan 2025 12:38PM UTC
Jobs 1
Files 721
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

29 Jan 2025 06:54AM UTC coverage: 73.945% (-0.05%) from 73.991%
13026118674

push

github

web-flow
feat: fix mempool sync start early (#6767)

Description
---
Mempool sync can only start when `is_synced` is set to `true`.
- An edge case was witnessed whereby mempool sync can start early if the
entire network is generally
slow to respond to pings. The `ChainMetadataEvent::NetworkSilence` event
is transmitted if 3x
consecutive ping cycles were started without corresponding pongs
received, which sets
`is_synced` to `true`. The moment that peer metadata is then received,
block sync and mempool sync
will occur at the same time. 
- Prolonged network silence is now detected in the `Starting` state. At
startup, the first successful metadata message received from a peer will
signal the transition to `Listening`, otherwise `Listening` will be
notified of the network silence, which can act accordingly.
- Additional debug logs were added to track all events that can set the
`is_synced` to `true`.
- Removed `log-mdc` from the dependencies as the relevant code is not
used.

The edge case warning message must be monitored to see if it is a real
issue:
```rust
warn!(
    target: LOG_TARGET,
    "Initial sync achieved based on event 'NetworkSilence'; this may not be true if the entire \
    network in general is slow to respond to pings"
);
```

Fixes #6766

Motivation and Context
---
Mempool sync _"started"_ before block sync was achieved.

How Has This Been Tested?
---
System-level testing

What process can a PR reviewer use to test or verify this change?
---
Code review
System-level testing

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking... (continued)

33 of 70 new or added lines in 7 files covered. (47.14%)

59 existing lines in 15 files now uncovered.

83447 of 112850 relevant lines covered (73.95%)

276136.87 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
11.54
0.0% base_layer/core/src/base_node/state_machine_service/states/events_and_states.rs
4
71.88
-1.02% base_layer/core/src/base_node/state_machine_service/state_machine.rs
6
64.64
-0.05% base_layer/core/src/chain_storage/blockchain_database.rs
8
61.49
0.69% base_layer/core/src/base_node/state_machine_service/states/listening.rs
17
37.04
-62.96% base_layer/core/src/base_node/state_machine_service/states/starting_state.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
79.84
-0.01% base_layer/core/src/base_node/state_machine_service/states/header_sync.rs
1
61.02
-0.56% comms/dht/src/network_discovery/state_machine.rs
1
86.17
-0.04% base_layer/wallet/src/transaction_service/storage/sqlite_db.rs
1
58.72
2.75% base_layer/core/src/mempool/service/service.rs
1
81.52
-0.22% comms/core/src/connection_manager/dialer.rs
2
67.97
-0.78% comms/core/src/connection_manager/listener.rs
2
64.49
-0.06% comms/dht/src/connectivity/mod.rs
3
40.0
-8.57% base_layer/wallet/src/transaction_service/tasks/wait_on_dial.rs
3
35.29
-17.65% comms/dht/src/network_discovery/waiting.rs
4
0.0
-28.57% comms/core/src/connection_manager/error.rs
4
83.9
-0.8% comms/core/src/noise/socket.rs
4
71.22
-0.85% base_layer/core/src/base_node/service/service.rs
6
0.0
-17.65% base_layer/core/src/base_node/comms_interface/comms_response.rs
8
88.31
-5.19% comms/dht/src/outbound/mock.rs
18
57.33
-0.64% base_layer/wallet/src/transaction_service/service.rs
Jobs
ID Job ID Ran Files Coverage
1 13026118674.1 29 Jan 2025 12:38PM UTC 721
73.95
GitHub Action Run
Source Files on build 13026118674
  • Tree
  • List 721
  • Changed 318
  • Source Changed 14
  • Coverage Changed 31
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13026118674
  • 2a68bdff on github
  • Prev Build on development (#13012261930)
  • Next Build on development (#13052200403)
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