FCR: drop vestigial bench root offset; fix FFG-sweep divergence doc#103
Open
dapplion wants to merge 1 commit into
Open
FCR: drop vestigial bench root offset; fix FFG-sweep divergence doc#103dapplion wants to merge 1 commit into
dapplion wants to merge 1 commit into
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small FCR cleanups on top of the latest
fcr.1. Drop the vestigial
+1in the benchmark'sblock_root_at. It hashedslot + 1, a leftover from the earlierHash256::from_low_u64_be(slot + 1)form, where the+1kept 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_confirmedcall. (Theis_one_confirmedclause in that item is left as-is; it became accurate once #94 inlined the predicate.)No behavior change.
cargo nextest run -p fast_confirmationgreen;make lint-fullgreen.