Skip to content

dgb: delegate redistribute PPLNS-window guard onto get_height_and_last SSOT (#414 follow-on) - #416

Merged
frstrtr merged 1 commit into
masterfrom
dgb/redistribute-delegate-ghal
Jun 25, 2026
Merged

dgb: delegate redistribute PPLNS-window guard onto get_height_and_last SSOT (#414 follow-on)#416
frstrtr merged 1 commit into
masterfrom
dgb/redistribute-delegate-ghal

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Byte-identity DELEGATION follow-on to #414 (the get_height_and_last SSOT), per integrator: keep the runtime rewire reviewable independently of the SSOT lift.

What: rewire refresh_pplns_cache in src/impl/dgb/redistribute.hpp (lines 454-455) onto the SSOT free functions:

  • std::min(height, real_chain_length()) -> dgb::pplns_window_depth(...)
  • if (depth < 1) return; -> if (!dgb::pplns_window_active(depth)) return;

Value-identical: pplns_window_depth is std::min; pplns_window_active(d) is d>=1, so !active == depth<1. No reward-distribution behavior change.

Proof (non-circular): dgb_redistribute_delegate_ghal_test re-derives the verbatim pre-delegation inline std::min/(depth<1) directly from the operands (does not call the SSOT for the expected side) and asserts the SSOT call reproduces it across a height matrix straddling negative / 0 / 1 / RCL-1 / RCL / RCL+1 on both nets. 3/3 green. Production dgb_redistribute_test 8/8 unchanged.

Scope: FENCED to src/impl/dgb/ only. Target in CMake + both build.yml allowlist arms. Stacked on dgb/ghal-endpoints-ssot; retarget to master after #414 lands.

NO self-merge — reward-distribution rewire, operator tap required (same gate as #414).

@frstrtr
frstrtr force-pushed the dgb/ghal-endpoints-ssot branch from 09dab20 to 1c8e8b0 Compare June 24, 2026 09:34
@frstrtr
frstrtr force-pushed the dgb/redistribute-delegate-ghal branch from 50f094e to db5f9a9 Compare June 24, 2026 09:35
@frstrtr
frstrtr force-pushed the dgb/ghal-endpoints-ssot branch from 1c8e8b0 to f4d3ee8 Compare June 24, 2026 10:20
@frstrtr
frstrtr force-pushed the dgb/redistribute-delegate-ghal branch from db5f9a9 to a17ce1f Compare June 24, 2026 10:21
@frstrtr
frstrtr force-pushed the dgb/ghal-endpoints-ssot branch from f4d3ee8 to f3a67ae Compare June 24, 2026 14:45
@frstrtr
frstrtr force-pushed the dgb/redistribute-delegate-ghal branch from a17ce1f to d5df40d Compare June 24, 2026 14:50
@frstrtr
frstrtr force-pushed the dgb/ghal-endpoints-ssot branch from f3a67ae to 20b3a87 Compare June 24, 2026 15:51
@frstrtr
frstrtr force-pushed the dgb/redistribute-delegate-ghal branch from d5df40d to 2363527 Compare June 24, 2026 15:53
@frstrtr
frstrtr force-pushed the dgb/ghal-endpoints-ssot branch from 20b3a87 to fda3bcb Compare June 24, 2026 19:18
@frstrtr
frstrtr force-pushed the dgb/redistribute-delegate-ghal branch 2 times, most recently from eed564f to d678858 Compare June 24, 2026 20:41
@frstrtr
frstrtr changed the base branch from dgb/ghal-endpoints-ssot to master June 24, 2026 20:41
…t SSOT

Rewire refresh_pplns_cache's inline window guard in redistribute.hpp onto
the get_height_and_last_endpoints.hpp SSOT (PR #414):

  depth = std::min(height, real_chain_length())   -> dgb::pplns_window_depth(...)
  if (depth < 1) return;                           -> if (!dgb::pplns_window_active(depth)) return;

Byte-identical: pplns_window_depth is std::min and pplns_window_active is
depth>=1, so !active == depth<1. No reward-distribution value change.

Proof: dgb_redistribute_delegate_ghal_test re-derives the verbatim inline
std::min/(depth<1) directly (non-circular) and asserts the SSOT call
reproduces it across a height matrix straddling negative/0/1/RCL+-1, both
nets. 3/3 green; prod dgb_redistribute_test 8/8 unchanged. FENCED dgb/ only.
Target in CMake + both build.yml allowlist arms.
@frstrtr
frstrtr force-pushed the dgb/redistribute-delegate-ghal branch from d678858 to 59a22db Compare June 25, 2026 00:32
@frstrtr
frstrtr merged commit 7ff361e into master Jun 25, 2026
33 checks passed
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