Auditing: Widen tranche-escalation comparand to 16 bits#534
Open
philoniare wants to merge 1 commit into
Open
Conversation
The later-tranche audit selector (eq. latertranches) compares a single byte of VRF output against the no-show count. The smallest realisable non-zero expectation is therefore |kappa|/256 ~ 3.996 summoned validators per no-show -- roughly twice the defined bias factor F = 2, which is not representable at byte granularity. Decode bytes 0..1 of the same VRF output as a 16-bit little-endian integer and scale by 2^16; the expected summons at a single no-show becomes 1023 * 129 / 65536 ~ 2.014. No new cryptography -- the byte is already present in the 32-byte output. F and all other behaviour are unchanged.
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.
Issue: The later-tranche audit rule (auditing.tex, eq. latertranches) compares a single byte of VRF output against the no-show count. The bias factor defined right under it is F = 2 — "the expected number of validators … required to issue a judgment … given a single no-show." A single byte can't actually deliver 2: at one no-show only the byte value 0 passes the test, so the mean number summoned is 1023/256 ≈ 3.996, about double. It's not a rounding thing either — with one byte every reachable mean is a multiple of 1023/256 ≈ 3.996, and 2 isn't on that grid.
Fix: decode bytes 0–1 of the same VRF output as a little-endian u16.
Explanation:
correction.pdf
POC — exact, by enumeration: