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

iotaledger / iota / 27800682022

18 Jun 2026 04:14PM UTC coverage: 67.383% (-0.01%) from 67.397%
27800682022

push

github

web-flow
fix(iota-indexer): scope the watermark and the cursor pruning check to only the tables provided filter reads (#11967)

# Description of change

This PR fixes a bug in the iota-indexer where filtered queries were
incorrectly dropping valid rows and failing to trigger the KV-store
fallback because they calculate the `min_available_tx` watermark using a
global set of tables, causing the filter to be unnecessarily restricted
by the most heavily pruned table.

## Links to any relevant issues

fixes #11963

## How the change has been tested

- [x] Basic tests (linting, compilation, formatting, unit/integration
tests)
- [ ] Patch-specific tests (correctness, functionality coverage)

Ran the `iota-indexer` JSON-RPC locally against mainnet, with both the
Postgres database and the KV fallback store pointed at mainnet.
- Re-ran the `queryTransactionBlocks` request FromAddress filter on the
address previously failed to paginate.
- Confirmed:
- `min_available_tx` is now scoped to `tx_senders`, which is unpruned,
so it resolves to `0`. The emitted SQL no longer carries the inflated
lower bound; it reads `tx_sequence_number >= 0`.
- Pagination walks the full history correctly across pages (descending
cursor advancing `< 321263599`, then `< 3618188`, down to the final
page), with no rows silently dropped.
- Transaction content for pruned ranges is served from the fallback
store via
`multi_get_transaction_block_response_by_sequence_numbers_with_fallback`.
- The final page returns 13 rows (fewer than the limit of 51), correctly
terminating pagination.

### Infrastructure QA (only required for crates that are maintained by
@iotaledger/infrastructure)

> [!NOTE]
> This patch does not affect the normal ingestion operation of the
iota-indexer, thus no further tests were conducted.

### Release Notes

- [x] Indexer: Fixed resolution of the pruning threshold in the JSON-RPC
filtered queries.

---------

Co-authored-by: Konstantinos Demartinos <konstantinos.demartinos@iota.org>

0 of 34 new or added lines in 1 file covered. (0.0%)

3454 existing lines in 126 files now uncovered.

157976 of 234444 relevant lines covered (67.38%)

468683.34 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.24
/crates/iota-core/src/execution_cache/writeback_cache.rs


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc