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

tari-project / tari / 43234200214
79%

Build:
DEFAULT BRANCH: development
Ran 12 Nov 2026 03:53PM UTC
Jobs 1
Files 803
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

12 Nov 2026 02:08PM UTC coverage: 79.221% (+0.1%) from 79.077%
43234200214

push

github

web-flow
fix(base-node): limit P2P sync_utxos_by_block to one stream per peer (#8352)

## Description

`BaseNodeWalletRpcService::sync_utxos_by_block` (P2P wallet RPC method
11) streams the outputs of every block between two main-chain headers.
Unlike the `BaseNodeSyncRpcService` streams it had no per-peer session
limit, no bound on the bytes queued for the client, and it walked the
range by height, so a reorg mid-stream made it serve blocks from a chain
that no longer leads to the requested end block without telling the
client.

This brings it in line with `sync_blocks`. The method id, wire format,
response shape and allowed range are unchanged.

## Changes

- **One stream per peer.** `BaseNodeWalletRpcService` gets its own
`active_sessions` registry and `try_add_exclusive_session` (same logic
as the sync service, not shared with it, so a node syncing blocks from
us can still scan). The token is taken after the cheap request checks
and moved into the streaming task, so it is released when the stream
finishes, fails or the client goes away. A second concurrent request
from the same peer gets `forbidden`.
- **Byte budget.** `SYNC_BLOCKS_MAX_BUFFERED_BYTES` moves to a shared
`pub(crate) RPC_STREAM_MAX_BUFFERED_BYTES` (16 MiB) in
`base_node/mod.rs`, used by both services (`sync_blocks` unchanged). The
task keeps one `ChannelByteBudget` per stream and waits for room before
every send (each 2,000-output chunk and the empty-block message). Each
response is built only once the budget has room.
- **Reorg consistency.** For each height the task resolves the block
hash (the request's start hash at the start height, otherwise
`fetch_header(h)`), then reads the block's outputs and the headers at
`h` and the end height under one read lock (new
`BlockchainDatabase::fetch_outputs_in_block_and_header_pair`), and
checks `is_on_requested_chain` (now `pub(crate)`). If the block is no
longer an ancestor of the requested end block the stream ends with
`conflict` and that block's o... (continued)

307 of 325 new or added lines in 4 files covered. (94.46%)

225 existing lines in 14 files now uncovered.

153459 of 193711 relevant lines covered (79.22%)

715225.29 hits per line

Uncovered Changes

Lines Coverage ∆ File
10
86.43
86.43% base_layer/core/src/base_node/rpc/sync_utxos_by_block_task.rs
8
68.25
0.57% base_layer/core/src/chain_storage/blockchain_database.rs

Coverage Regressions

Lines Coverage ∆ File
100
68.25
0.57% base_layer/core/src/chain_storage/blockchain_database.rs
89
89.73
2.48% base_layer/core/src/base_node/service/service.rs
6
77.4
-0.09% base_layer/wallet/src/transaction_service/storage/sqlite_db.rs
6
77.89
0.41% comms/core/src/connectivity/manager.rs
5
73.37
-0.07% base_layer/wallet/src/output_manager_service/storage/sqlite_db/mod.rs
5
81.98
-0.42% comms/dht/src/connectivity/mod.rs
3
97.66
0.14% base_layer/mmr/src/common.rs
3
75.68
-8.11% comms/core/src/peer_manager/error.rs
2
88.54
-0.18% base_layer/core/src/proof_of_work/cuckaroo_pow.rs
2
98.62
-0.58% base_layer/mmr/src/merkle_proof.rs
1
86.43
86.43% base_layer/core/src/base_node/rpc/sync_utxos_by_block_task.rs
1
94.96
-0.03% base_layer/core/src/base_node/sync/horizon_state_sync/synchronizer.rs
1
90.92
-0.16% base_layer/p2p/src/services/liveness/service.rs
1
83.89
-0.09% base_layer/wallet/src/storage/sqlite_db/wallet.rs
Jobs
ID Job ID Ran Files Coverage
1 43234200214.1 12 Nov 2026 03:53PM UTC 803
79.22
GitHub Action Run
Source Files on build 43234200214
  • Tree
  • List 803
  • Changed 29
  • Source Changed 9
  • Coverage Changed 29
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #43234200214
  • 92e4919e on github
  • Prev Build on development (#43190246672)
  • Next Build on development (#43408212912)
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