Skip to content

FCR: drop vestigial bench root offset; fix FFG-sweep divergence doc#103

Open
dapplion wants to merge 1 commit into
fcrfrom
fcr-doc-bench-cleanup
Open

FCR: drop vestigial bench root offset; fix FFG-sweep divergence doc#103
dapplion wants to merge 1 commit into
fcrfrom
fcr-doc-bench-cleanup

Conversation

@dapplion

@dapplion dapplion commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Two small FCR cleanups on top of the latest fcr.

1. Drop the vestigial +1 in the benchmark's block_root_at. It hashed slot + 1, a leftover from the earlier Hash256::from_low_u64_be(slot + 1) form, where the +1 kept genesis (slot 0) off the all-zero root that collides with the null/no-vote sentinel. Hashing already yields a non-zero, prefix-varied root for slot 0, so the offset does nothing — hash the slot directly.

2. Fix the cached-helpers divergence doc. The old wording described the FFG-sweep timing backwards: the epoch-boundary slot short-circuits the sweep; it actually runs in the slots after a boundary (the catch-up window, while the confirmed block still trails the previous epoch), and — now that it's memoized — at most once per get_latest_confirmed call. (The is_one_confirmed clause in that item is left as-is; it became accurate once #94 inlined the predicate.)

No behavior change. cargo nextest run -p fast_confirmation green; make lint-full green.

- block_root_at hashed slot+1, a leftover from the from_low_u64_be(slot+1) form where
  the +1 kept genesis off the all-zero null-root sentinel. Hashing already yields a
  non-zero, prefix-varied root for slot 0, so hash the slot directly.
- The cached-helpers divergence doc described the FFG sweep timing backwards: the
  epoch-boundary slot short-circuits the sweep; it runs in the slots after (the catch-up
  window), and at most once per get_latest_confirmed call now that it is memoized.
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