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

tari-project / tari / 43035772587
79%

Build:
DEFAULT BRANCH: development
Ran 11 Nov 2026 04:04PM 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 02:09PM UTC coverage: 78.901% (+0.1%) from 78.756%
43035772587

push

github

web-flow
fix(mempool): deduplicate only transactions with the same kernel set (#8343)

## Summary

The mempool treated a transaction as already stored when each of its
kernel signatures appeared somewhere in a pool's signature index, even
when those signatures belonged to different pool entries. So
deduplication depended on arrival order. If an aggregate `A = H + X`
arrived first, the standalone `H` was reported as stored and was never
validated, stored or relayed. If `A` later fails its height re-check
(for example, `X` spends a `CheckHeight` output), `A` is evicted. No
pool entry then produces `H`'s outputs, so `H`'s pool children are
evicted too.

With this change, a transaction counts as stored only when:
- one pool entry has **exactly** its kernel set, or
- it is a **true union** of pool entries: every kernel lies in some
entry whose kernels are all inside the transaction. Anyone can build
such a union for free from the pool, and its outputs are already
produced by those entries.

A strict subset of an entry, like `H` after `A`, is validated and stored
as its own producer, whichever order the two arrive in.

### Changes
- **Kernel-set index (`tx_by_kernel_set`) in both pools,** keyed by the
sorted kernel signatures and maintained on every insert and removal
path. Exact lookup is O(kernels).
- **`UnconfirmedPool::has_transaction`:** an exact match or a true union
counts as stored, computed in one pass that counts index hits per pool
key. A transaction with no kernels, a repeated kernel, or any kernel not
in the pool never counts as stored.
- **`ReorgPool::has_transaction`:** exact match only, and
`ReorgPool::insert` uses it.
- **`MempoolStorage::has_transaction`:** returns `UnconfirmedPool` if
the unconfirmed pool counts the transaction as stored, else `ReorgPool`
on an exact reorg-pool match, else `NotStored(None)`. The per-kernel
fold and its mixed-pool `NotStoredAlreadySpent` result are removed. A
transaction that really is a double spend or already min... (continued)

457 of 458 new or added lines in 5 files covered. (99.78%)

232 existing lines in 16 files now uncovered.

151891 of 192508 relevant lines covered (78.9%)

1054171.97 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
93.52
0.59% base_layer/core/src/mempool/mempool_storage.rs

Coverage Regressions

Lines Coverage ∆ File
96
87.96
0.66% comms/dht/src/inbound/dht_handler/task.rs
37
66.57
0.0% comms/dht/src/network_discovery/state_machine.rs
34
78.75
-4.82% base_layer/core/src/base_node/rpc/query_service.rs
11
94.81
0.78% base_layer/transaction_components/src/transaction_components/memo_field.rs
9
66.47
-0.05% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
9
95.49
-0.19% base_layer/core/src/mempool/service/inbound_handlers.rs
8
68.31
1.7% base_layer/core/src/chain_storage/blockchain_database.rs
7
77.13
-0.41% comms/core/src/connectivity/manager.rs
5
73.01
-0.36% base_layer/wallet/src/output_manager_service/storage/sqlite_db/mod.rs
3
91.72
0.0% comms/core/src/connection_manager/listener.rs
3
67.49
-1.48% comms/core/src/connectivity/requester.rs
3
75.68
-8.11% comms/core/src/peer_manager/error.rs
2
86.99
-0.46% base_layer/core/src/mempool/service/service.rs
2
95.67
-0.43% base_layer/core/src/proof_of_work/randomx_factory.rs
2
77.46
0.03% base_layer/wallet/src/transaction_service/storage/sqlite_db.rs
1
94.96
0.15% base_layer/core/src/base_node/sync/horizon_state_sync/synchronizer.rs
Jobs
ID Job ID Ran Files Coverage
1 43035772587.1 11 Nov 2026 04:04PM UTC 803
78.9
GitHub Action Run
Source Files on build 43035772587
  • Tree
  • List 803
  • Changed 36
  • Source Changed 12
  • Coverage Changed 34
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #43035772587
  • d4f670aa on github
  • Prev Build on development (#42998042882)
  • Next Build on development (#43055204846)
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