Background
While adding tests for the FOCIL helpers (#17090) I compared the focil branch against the current Heze spec and found a couple of places that seem to have drifted. Since the code predates recent spec revisions, checking whether these are lags or intentional.
Description
1. Committee selection (beacon-chain/core/helpers/inclusion_list.go:47)
Current impl unshuffles all active validators and slices:
start := uint64(slot%SlotsPerEpoch) * InclusionListCommitteeSize
shuffledList, _ := UnshuffleList(shuffledIndices, seed)
return shuffledList[start:end], nil
Current spec (specs/heze/beacon-chain.md) concatenates the slot's beacon committees and cycles:
for i in range(committees_per_slot):
indices.extend(get_beacon_committee(state, slot, CommitteeIndex(i)))
return Vector[...]([indices[i % len(indices)] for i in range(INCLUSION_LIST_COMMITTEE_SIZE)])
Different validator sets, so inclusion_list_committee_root won't match other clients. This is the one with interop impact.
2. Signature domain epoch (beacon-chain/core/helpers/inclusion_list.go:92)
Impl derives the domain from the head-state slot, spec uses the IL's own slot:
currentEpoch := slots.ToEpoch(st.Slot()) // impl
compute_epoch_at_slot(message.slot) # spec (is_valid_inclusion_list_signature)
Agrees within an epoch, diverges at epoch boundaries.
For completeness: the gossip rules in beacon-chain/sync/inclusion_list.go also follow an older previous-or-current-slot variant with REJECT severities vs the spec's current-slot [IGNORE], and IL timing is seconds-based rather than INCLUSION_LIST_DUE_BPS.
Happy to open a fix PR for (1) and (2) against focil if they're confirmed as lags. Thanks!
cc @terencechain
Background
While adding tests for the FOCIL helpers (#17090) I compared the
focilbranch against the current Heze spec and found a couple of places that seem to have drifted. Since the code predates recent spec revisions, checking whether these are lags or intentional.Description
1. Committee selection (
beacon-chain/core/helpers/inclusion_list.go:47)Current impl unshuffles all active validators and slices:
Current spec (
specs/heze/beacon-chain.md) concatenates the slot's beacon committees and cycles:Different validator sets, so
inclusion_list_committee_rootwon't match other clients. This is the one with interop impact.2. Signature domain epoch (
beacon-chain/core/helpers/inclusion_list.go:92)Impl derives the domain from the head-state slot, spec uses the IL's own slot:
Agrees within an epoch, diverges at epoch boundaries.
For completeness: the gossip rules in
beacon-chain/sync/inclusion_list.goalso follow an older previous-or-current-slot variant withREJECTseverities vs the spec's current-slot[IGNORE], and IL timing is seconds-based rather thanINCLUSION_LIST_DUE_BPS.Happy to open a fix PR for (1) and (2) against
focilif they're confirmed as lags. Thanks!cc @terencechain