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

iotaledger / iota / 26348771894

22 May 2026 03:21PM UTC coverage: 66.908% (-0.002%) from 66.91%
26348771894

push

github

web-flow
fix(typed-store,starfish-core): port upstream storage iterator and VecDeque fixes (#11610)

# Description of change

Ports three upstream correctness fixes touching storage iterators and
consensus block scanning. Each commit corresponds to a separate upstream
PR.

## Upstream PRs ported

- **`fix(starfish-core): handle VecDeque wraparound …`** — port of
MystenLabs/sui#24745. `scan_last_blocks_by_author` in `MemStore` and
`RocksDBStore` used `VecDeque::as_slices().0`, which only covers the
first contiguous segment of the ring buffer; when the deque storage
wraps, the trailing `BlockRef`s are silently dropped. Calls
`make_contiguous()` before slicing. Public API and ordering unchanged.

- **`fix(typed-store): exclude max key when safe_range_iter lower bound
is Excluded`** — port of MystenLabs/sui#26469.
`iterator_bounds_with_range`'s `Bound::Excluded(lower_bound)` arm called
`big_endian_saturating_add_one`, which is a no-op when the encoded key
is all `0xFF`. RocksDB then receives the unchanged max key as its
(inclusive) lower bound and yields the entry the caller asked to
exclude. Mirrors the `is_max` short-circuit already used on the
upper-bound arm: appends a zero byte so the bound is lexicographically
greater than any same-length stored key. Includes regression tests for
`(Excluded(MAX), Unbounded)` and `(Excluded(MAX), Included(MAX))`.

- **`test(typed-store): add regression coverage for safe_range_iter
inclusive upper bound at max`** — test-only port of
MystenLabs/sui#26456. The upstream PR also fixed a `util.rs` bug in the
`Bound::Included(upper_bound)` arm; IOTA's existing port of this code
was already correct (the `if is_max { None } else { Some(...) }`
short-circuit was there from the start), so only the regression tests
are imported.

## IOTA-specific note on the bound symmetry

- **Upper bound (`Bound::Included` at max key):** the original upstream
code (April 2025) was buggy. IOTA's port (March 2026) was written as `if
!is_max { ...Some... ... (continued)

11 of 14 new or added lines in 3 files covered. (78.57%)

48 existing lines in 11 files now uncovered.

152189 of 227460 relevant lines covered (66.91%)

453923.83 hits per line

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

91.13
/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