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

tari-project / tari / 42958766653
79%

Build:
DEFAULT BRANCH: development
Ran 11 Nov 2026 06:16AM 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

11 Nov 2026 04:22AM UTC coverage: 78.801% (+0.2%) from 78.591%
42958766653

push

github

web-flow
perf(mempool): remove pool transactions in batches so shared index entries are pruned once (#8338)

## Summary

The unconfirmed pool lets many transactions share an index entry: they
can spend the same output, produce the same output commitment, or carry
the same kernel excess. Each removal used to find its key in every entry
with a linear search. Removing N transactions that share M entries
therefore cost about M·N²/2 comparisons while holding the mempool write
lock. This happened on the descendant sweep, on every published block,
and in the bulk removal loops.

This PR adds one batched removal and routes every bulk path through it.
The batch takes the transactions out first, then prunes each touched
index entry once with `retain`. Cost is now linear in the index entries
touched, and `retain` keeps the existing entry order (priority order for
`txs_by_output`).

### Changes
- **`UnconfirmedPool::remove_transactions(keys)`:** new batched removal.
`remove_transaction` now calls it, and its doc comment points bulk
callers to the batch. Removing one transaction prunes by comparing keys,
so evicting on insert into a full pool stays cheap.
- **`remove_transactions_and_descendants(keys)`** (renamed from
`remove_transaction_and_descendants`):
  - accepts many starting transactions;
  - prunes once at the end;
- tracks how many producers of each output are still in the pool, and
drops an output's spenders only when none are left.
- **Published or failed block:**
- All five lookups (kernel signatures, inputs, outputs,
commitments/excesses, validator-node keys) collect into one
de-duplicated set and are removed in one call.
- Block inputs are found through the spent-output index instead of
scanning and re-hashing the whole pool, and `find_matching_block_input`
is removed.
  - Repeated items in a block are looked up once.
- **`MempoolStorage`:** `record_height_checks`,
`remove_and_reinsert_transactions` and the validator-node re-check each
make one batched call.
... (continued)

441 of 441 new or added lines in 2 files covered. (100.0%)

1850 existing lines in 26 files now uncovered.

150961 of 191572 relevant lines covered (78.8%)

1103959.82 hits per line

Coverage Regressions

Lines Coverage ∆ File
1405
67.64
1.66% base_layer/core/src/chain_storage/blockchain_database.rs
124
88.54
1.09% base_layer/core/src/proof_of_work/cuckaroo_pow.rs
95
85.31
0.19% base_layer/core/src/base_node/comms_interface/inbound_handlers.rs
46
27.03
3.15% clients/rust/base_node_wallet_client/src/client/http.rs
31
76.9
0.45% applications/minotari_mcp_common/src/input_sanitizer.rs
26
0.0
0.0% applications/minotari_mcp_common/src/server.rs
24
69.53
69.53% infrastructure/storage/src/key_val_store/cached_store.rs
17
77.68
-1.04% comms/core/src/connectivity/manager.rs
16
88.59
5.14% comms/dht/src/discovery/service.rs
10
96.48
-0.5% base_layer/core/src/validation/header/header_full_validator.rs
9
77.37
-0.18% base_layer/wallet/src/transaction_service/storage/sqlite_db.rs
7
87.16
0.12% base_layer/core/src/base_node/state_machine_service/states/block_sync.rs
7
87.63
-1.22% comms/core/src/connection_manager/dialer.rs
6
72.94
-0.14% base_layer/wallet/src/output_manager_service/storage/sqlite_db/mod.rs
6
92.31
-0.47% comms/core/src/multiplexing/yamux.rs
3
67.92
0.0% base_layer/core/src/base_node/sync/rpc/service.rs
3
95.7
2.73% common_sqlite/src/connection.rs
3
89.03
-0.16% comms/core/src/connection_manager/peer_connection.rs
3
75.68
-8.11% comms/core/src/peer_manager/error.rs
2
45.24
16.75% applications/minotari_utils/src/commands/dbstats.rs
2
87.65
1.85% comms/core/src/protocol/messaging/inbound.rs
1
0.0
0.0% applications/minotari_mcp_common/src/security.rs
1
93.3
-0.08% base_layer/core/src/chain_storage/lmdb_db/validator_node_store.rs
1
98.34
0.4% base_layer/core/src/mempool/unconfirmed_pool/unconfirmed_pool.rs
1
98.24
-0.15% base_layer/core/src/proof_of_work/monero_rx/merkle_tree.rs
1
83.89
-0.09% base_layer/wallet/src/storage/sqlite_db/wallet.rs
Jobs
ID Job ID Ran Files Coverage
1 42958766653.1 11 Nov 2026 06:16AM UTC 803
78.8
GitHub Action Run
Source Files on build 42958766653
  • Tree
  • List 803
  • Changed 47
  • Source Changed 20
  • Coverage Changed 44
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #42958766653
  • 44a00e3d on github
  • Prev Build on development (#42831924886)
  • Next Build on development (#42998042882)
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