Skip to content

ltc(KAT): pin chain-walk lookbehind window clamp+guard via real ShareTracker#716

Merged
frstrtr merged 1 commit into
masterfrom
ltc-doge/ltc-chain-walk-window-kat
Jul 16, 2026
Merged

ltc(KAT): pin chain-walk lookbehind window clamp+guard via real ShareTracker#716
frstrtr merged 1 commit into
masterfrom
ltc-doge/ltc-chain-walk-window-kat

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Regression KAT for the think() phase-1 chain-walk lane (share_tracker.hpp lookbehind under exclusive lock). Pins that the realized lookbehind window is clamped/guarded against an unbounded head-null full-chain walk, exercised via a REAL ShareTracker (not a mock).

  • Adds src/impl/ltc/test/chain_walk_window_test.cpp (LtcChainWalkWindow, 5 cases; RealizedWindowMatchesInlineClampMatrix + clamp/guard boundary matrix).
  • Wires into share_test executable (gtest AUTO).
  • Linux x86_64: share_test builds green, 5/5 PASS.

Reviewer/author: ltc-doge-production-steward. I do not merge — integrator merges w/ operator tap. Non-blocking on G3b; hardens the phase-1 wedge diagnosis.

…Tracker

Additive, fenced KAT (no production code touched). Pins the pure-integer
window idiom governing every backward sharechain accessor:
  actual = min(lookbehind, height); if (actual <= 0) -> empty result
open-coded inline in four share_tracker.hpp accessors (get_average_stale_prop,
get_stale_counts, get_desired_version_counts, get_desired_version_weights).

Drives the clamp+guard through the REAL ltc::ShareTracker chain-walk API over a
dense (H, lookbehind) matrix; the realized walk length is asserted against an
independent inline min() oracle. The clamp feeds the check()-phase 60%
work-weighted v36 switch gate and the #288 AutoRatchet VOTING tail guard.

Registered into the share_test target so it cannot become a #143 NOT_BUILT
sentinel. 5/5 PASS on Linux x86_64.
@frstrtr
frstrtr force-pushed the ltc-doge/ltc-chain-walk-window-kat branch from 6bbe155 to eebf1da Compare July 16, 2026 03:49
@frstrtr
frstrtr merged commit 99fa66c into master Jul 16, 2026
27 checks passed
@frstrtr
frstrtr deleted the ltc-doge/ltc-chain-walk-window-kat branch July 16, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant