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

tari-project / tari / 40313433085
79%

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

26 Oct 2026 11:13AM UTC coverage: 77.278% (+0.2%) from 77.106%
40313433085

push

github

web-flow
fix(chain-storage): output index consistency (#8175)

Description
---

An output with the same hash can be mined, spent, and later mined again.
Since multiple index entries per output hash were introduced, several
readers still treated all entries for a hash as one lifecycle. This
change pairs each spend with the instance it actually spent and uses
that pairing everywhere:

- **Chain storage**: `fetch_mined_info_by_output_hash` pairs each input
with the latest instance mined at or before it (one linear pass).
Pruning a block removes only the instance that block's inputs spent, so
a later instance of the same output is kept. A missing row for an index
entry still returns `ValueNotFound`.
- **Spend state**: `fetch_outputs_in_block_with_spend_state` marks an
output spent only by its own spend. Single-instance hashes take a cheap
path; full pairing runs only when a hash has several instances.
- **UTXO sync (serving)**: each input in a block streams the instance it
spent (`fetch_outputs_spent_in_block`). Pruned-node genesis handling
checks for the genesis instance specifically.
- **Horizon sync (client)**: an output spent and mined again within one
tranche is held back and inserted in the end-of-tranche write, after the
spent instance is pruned. Existing tree values are replaced only for
those keys (and for restored genesis outputs); every other key keeps the
duplicate-value check.
- **Queries**: `get_utxos_deleted_info` (+`_v1`), `query_deleted` and
`CheckOutputSpentStatus` report the latest instance and its own spend,
each answered from a single read. `fetch_inputs_mined_info` is removed
(no callers left).
- **Consistency check**: the partial body validator checks each input
against the instance it actually spent, so validating an older block
still passes after the output is mined again, and an earlier instance
cannot stand in for a missing later one.

No consensus rules change.

Motivation and Context
---

Pruned nodes, horizon sync and spend queries co... (continued)

667 of 776 new or added lines in 10 files covered. (85.95%)

245 existing lines in 24 files now uncovered.

138300 of 178964 relevant lines covered (77.28%)

301875.25 hits per line

Uncovered Changes

Lines Coverage ∆ File
104
74.8
-1.47% base_layer/core/src/base_node/sync/horizon_state_sync/synchronizer.rs
3
62.09
1.2% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
2
74.04
2.15% base_layer/core/src/base_node/comms_interface/inbound_handlers.rs

Coverage Regressions

Lines Coverage ∆ File
92
70.17
2.34% base_layer/core/src/chain_storage/blockchain_database.rs
48
62.09
1.2% base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
33
75.2
-6.65% base_layer/core/src/validation/helpers.rs
11
77.89
0.55% comms/core/src/connectivity/manager.rs
10
83.33
-0.49% base_layer/core/src/test_helpers/blockchain.rs
6
37.5
-25.0% base_layer/common_types/src/epoch.rs
5
77.4
-0.09% base_layer/wallet/src/transaction_service/storage/sqlite_db.rs
4
0.0
-13.33% base_layer/core/src/base_node/comms_interface/comms_response.rs
3
87.24
-0.32% base_layer/core/src/base_node/service/service.rs
3
56.63
-2.41% base_layer/core/src/chain_storage/block_add_result.rs
3
75.27
-3.23% base_layer/core/src/validation/mocks.rs
3
71.17
-2.7% base_layer/transaction_components/src/transaction_components/side_chain/sidechain_feature.rs
3
88.75
-3.75% base_layer/transaction_components/src/transaction_components/side_chain/validator_node_exit.rs
3
83.19
-0.87% comms/core/src/connection_manager/manager.rs
3
89.34
0.16% comms/core/src/connection_manager/peer_connection.rs
3
90.76
-0.33% comms/dht/src/actor.rs
2
87.45
-0.2% base_layer/core/src/proof_of_work/cuckaroo_pow.rs
2
73.08
-0.14% base_layer/wallet/src/output_manager_service/storage/sqlite_db/mod.rs
2
96.8
-0.91% comms/core/src/utils/mpsc.rs
2
87.04
-0.46% comms/dht/src/network_discovery/rebootstrap.rs
1
74.8
-1.47% base_layer/core/src/base_node/sync/horizon_state_sync/synchronizer.rs
1
81.5
-0.16% base_layer/core/src/chain_storage/lmdb_db/lmdb.rs
1
55.26
0.0% base_layer/core/src/validation/error.rs
1
90.43
-1.06% comms/core/src/protocol/protocols.rs
Jobs
ID Job ID Ran Files Coverage
1 40313433085.1 26 Oct 2026 01:01PM UTC 799
77.28
GitHub Action Run
Source Files on build 40313433085
  • Tree
  • List 799
  • Changed 38
  • Source Changed 13
  • Coverage Changed 38
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40313433085
  • ae03457d on github
  • Prev Build on development (#40295814016)
  • Next Build on development (#40375378943)
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