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

tari-project / tari / 38393174892
77%

Build:
DEFAULT BRANCH: development
Ran 13 Oct 2026 01:20PM UTC
Jobs 1
Files 800
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

13 Oct 2026 11:51AM UTC coverage: 74.683% (+0.5%) from 74.213%
38393174892

push

github

web-flow
fix(comms): bound memory held for stalled yamux peers, RPC/sync streams and gRPC GetBlocks (#8108)

## Description

This PR puts hard per-connection and per-session limits on the memory
the comms stack and the node's gRPC `GetBlocks` can hold on behalf of a
remote peer or client. A mainnet archive node on 6.1.0 was OOM-killed
after about 12 h. These changes remove the worst cases whether or not
they turn out to be that OOM's cause:

- `sync_blocks` serving read-ahead: about 154 MiB per session (about 15
GiB at the 100-session cap).
- RPC client stream buffers: up to about 201 MiB per streaming request.
- The yamux pin: about 128 MiB per stalled connection, held
indefinitely.
- `GetBlocks`: unbounded work and memory for abandoned or non-reading
calls.

There are three commits, one per area. They apply independently: the RPC
and gRPC commits don't depend on the yamux commit.

### 1. `fix(comms)`: bound the memory a stalled yamux peer can pin

- **Write-stall watchdog.** The raw transport, under noise, is wrapped
(`WriteStallSocket`) to record when writes start waiting. The clock
restarts whenever the transport accepts any bytes, including partial
writes of an encrypted frame, so slow but working links are never
flagged. yamux reuses the same `WriteStall`
(`Yamux::upgrade_connection_with_write_stall`).
  - A connection whose writes have waited 30 s is reported as stalled.
- At 120 s it is closed with a WARN naming the peer and the stall
duration. There is no ban.
- This is the only thing that frees a connection yamux can't clean up:
yamux only drops dead streams when its write path is idle.
- **Stream cap 512 → 128.** yamux 0.13 closes the whole connection when
an open would go past the limit, in either direction. The worker
therefore counts its streams, including one being handed over, and
refuses our own opens at 112 (16 headroom) with `TooManyStreams`. The
connection stays up.
- A locally refused open is not the peer's fault, so header and horizon
syn... (continued)

1040 of 1105 new or added lines in 18 files covered. (94.12%)

515 existing lines in 30 files now uncovered.

125683 of 168289 relevant lines covered (74.68%)

446142.77 hits per line

Uncovered Changes

Lines Coverage ∆ File
32
92.98
-0.38% comms/core/src/multiplexing/yamux.rs
24
50.94
2.92% base_layer/core/src/base_node/sync/rpc/service.rs
3
86.5
-0.57% comms/core/src/connection_manager/peer_connection.rs
2
63.09
4.82% base_layer/core/src/chain_storage/blockchain_database.rs
2
73.09
-1.17% comms/core/src/connectivity/manager.rs
1
84.83
0.12% comms/core/src/protocol/rpc/client/mod.rs
1
99.17
-0.83% comms/core/src/utils/mpsc.rs

Coverage Regressions

Lines Coverage ∆ File
84
73.15
0.87% base_layer/wallet/src/output_manager_service/storage/sqlite_db/mod.rs
81
32.78
0.1% base_layer/p2p/src/initialization.rs
71
89.42
1.06% comms/dht/src/actor.rs
70
81.84
30.35% common_sqlite/src/sqlite_connection_pool.rs
22
90.06
-2.06% base_layer/core/src/chain_storage/lmdb_db/validator_node_store.rs
18
73.09
-1.17% comms/core/src/connectivity/manager.rs
18
88.91
0.03% comms/core/src/peer_manager/manager.rs
17
25.0
10.19% base_layer/wallet/src/output_manager_service/error.rs
16
92.98
-0.38% comms/core/src/multiplexing/yamux.rs
15
88.61
0.0% comms/dht/src/config.rs
13
58.94
-0.32% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
13
80.24
-2.62% base_layer/core/src/validation/helpers.rs
12
14.29
-3.11% base_layer/wallet/src/transaction_service/error.rs
11
71.2
28.19% base_layer/wallet/src/storage/sqlite_utilities/mod.rs
11
96.71
0.2% comms/dht/src/dht.rs
10
91.94
28.3% common_sqlite/src/util/retry.rs
6
0.0
0.0% common_sqlite/src/error.rs
6
87.23
-12.77% comms/core/src/multiplexing/metrics.rs
4
80.46
-0.42% comms/dht/src/connectivity/mod.rs
2
87.65
0.0% base_layer/core/src/proof_of_work/cuckaroo_pow.rs
2
88.51
-0.43% base_layer/core/src/validation/aggregate_body/aggregate_body_chain_validator.rs
2
69.04
-0.03% base_layer/wallet/src/transaction_service/storage/sqlite_db.rs
2
92.98
1.9% common_sqlite/src/connection.rs
2
86.25
-0.35% comms/core/src/connection_manager/dialer.rs
2
86.5
-0.57% comms/core/src/connection_manager/peer_connection.rs
1
98.88
-1.12% base_layer/common_types/src/dammsum.rs
1
50.94
2.92% base_layer/core/src/base_node/sync/rpc/service.rs
1
63.09
4.82% base_layer/core/src/chain_storage/blockchain_database.rs
1
74.61
-0.22% base_layer/core/src/mempool/sync_protocol/mod.rs
1
90.92
-0.16% base_layer/p2p/src/services/liveness/service.rs
Jobs
ID Job ID Ran Files Coverage
1 38393174892.1 13 Oct 2026 01:20PM UTC 800
74.68
GitHub Action Run
Source Files on build 38393174892
  • Tree
  • List 800
  • Changed 61
  • Source Changed 42
  • Coverage Changed 57
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #38393174892
  • 48babe28 on github
  • Prev Build on development (#38375892864)
  • Next Build on development (#38417427474)
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