Skip to content

Add IL committee duties polling to the VC - #9799

Open
conache wants to merge 17 commits into
sigp:unstablefrom
conache:focil-vc-il-duties-polling
Open

Add IL committee duties polling to the VC#9799
conache wants to merge 17 commits into
sigp:unstablefrom
conache:focil-vc-il-duties-polling

Conversation

@conache

@conache conache commented Aug 13, 2026

Copy link
Copy Markdown

Issue Addressed

This PR adds polling of inclusion list committee duties to the VC per spec. This is part of adding FOCIL support in the Heze fork.

Proposed Changes

  • Update duties_service to spawn a dedicated IL duties polling task. This only spawns when the Heze fork is scheduled.
  • The task polls IL committee duties for the current and next epoch, each slot, starting with heze_fork_epoch - 1 epoch.
  • Note that this PR uses the same bandwidth optimization as attester/PTC polling: per epoch, it does a small request for one validator, only refetching the full duties list if the dependent_root is different than the cached one.
  • Duties are cached per epoch, together with the dependent_root they were computed against, and they are fully replaced when the dependent root changes.
  • The request to the BN is done through POST validator/duties/inclusion_list/{epoch}, per beacon api spec.
  • Included metrics: fetch/store/per-epoch timers, IL committee validators count gauge.

Additional Info

  • The BN endpoint support will be added in a follow-up PR, since its addition depends on PR #9742 (committee derivation) and PR #9714 (Heze block production, needed for the testing setup).

@chong-he chong-he added focil Fork choice enforced inclusion lists heze labels Aug 17, 2026
/// Returns the epoch's dependent root alongside the duties for local validators who have
/// IL committee assignments at the given slot, or `None` if the duties for the slot's epoch
/// have not been downloaded yet.
pub fn get_il_duties_for_slot(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing to keep in mind for the BN endpoint follow-up: get_inclusion_list_committee fills all 16 positions with indices[i % len(indices)], so if there are fewer than 16 members in a slot, a validator can end up with multiple positions. The spec's assignment helper handles this by using in and returning a single slot.

I think the endpoint should dedupe by validator index as well, otherwise we could return the same duty more than once and end up publishing duplicate ILs for the slot.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Yes, we're deduping by validator index on the endpoint side as well. I have this already implemented and tested in the follow-up PR

Comment thread common/eth2/src/types.rs Outdated
#[serde(with = "serde_utils::quoted_u64")]
pub validator_index: u64,
pub slot: Slot,
pub inclusion_list_committee_root: Hash256,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inclusion_list_committee_root looks stale to me. consensus-specs#5513 replaced it with dependent_root on the container, and consensus-specs#5544 removed committee roots from the IL flow altogether. The spec's assignment helper just returns Optional[Slot].

The beacon-APIs PR still has this as a required field, but it was last updated in July, so it predates both of those changes. I think we should update it there and drop it here, since DutiesResponse already has the dependent_root the producer needs.

@conache conache Aug 21, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, totally agree here. I was thinking about doing this as well while implementing, but I was reluctant to make the change without the spec changing first. Just removed it in e93dd6a and pointed this out in the spec PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

focil Fork choice enforced inclusion lists heze

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants