selection/
lib.rs

1//! # Selection algorithms
2//!
3//! This crate contains implementations of various algorithms for random selection of block-producer
4//! committees used by the Partner Chains Toolkit.
5
6#![cfg_attr(not(feature = "std"), no_std)]
7#![deny(missing_docs)]
8
9extern crate alloc;
10
11/// Random selection out of two pools of weighted (trustless) and unweighted (permissioned) candidates
12/// controlled by a T/P ratio (D-parameter)
13pub mod ariadne;
14/// Random selection out of two pools of weighted (trustless) and unweighted (permissioned) candidates
15/// controlled by a T/P ratio (D-parameter), with guaranteed seat allocations
16pub mod ariadne_v2;
17/// Simple independent weighted random selection
18pub mod weighted_random;
19
20#[cfg(test)]
21mod tests;
22
23/// Weight of individual candidate
24pub type Weight = u128;