Sigil documentation
ReferenceRust referencesigil-tower

sigil-tower · committee

Source declarations, signatures and documentation for committee.

Source: sigil/node/sigil-tower/src/committee.rs. SHA-256: e701e78f509a14fcfd8164d98ad64aa5e7e160d5946c0151136fc06c8686c722.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

committee::Committee

A committee assigned to a specific slot.

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Committee {
/// Slot number this committee is assigned to.

pub slot: u64,
/// DIDs of the 21 Block Producers.

pub block_producers: Vec<String>,
/// DIDs of the 100 Block Validators.

pub block_validators: Vec<String>
}

Source line: 21.

committee::CommitteeSelector

Configuration for the committee selection algorithm.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct CommitteeSelector {
/// Minimum number of Block Producers required (default: 21).

pub min_producers: usize,
/// Minimum number of Block Validators required (default: 100).

pub min_validators: usize,
/// Maximum validators per human root DID in a single committee (default: 2).

pub max_per_human_root: usize,
/// Minimum distinct geographic regions in a committee (default: 3).

pub min_regions: usize
}

Source line: 32.

committee::CommitteeSelector::select

Select a committee for the given slot using the provided randomness.

The algorithm:

  1. Gather all active validators and sort by inclusion score (descending)
  2. Shuffle using Fisher-Yates with a deterministic seed derived from slot number and provided randomness
  3. Greedily select BPs: highest-scored first, enforcing human root limit and geographic diversity
  4. Greedily select BVs from remaining validators with same constraints
pub fn select(
        &self,
        registry: &ValidatorRegistry,
        slot: u64,
        randomness: &[u8; 32],
    ) -> Result<Committee, TowerError>;

Source line: 64.

On this page