pub struct ProtocolState<const N: usize, const G: usize> {Show 52 fields
pub st: b6,
pub sub: b2,
pub args: Args,
pub n: b5,
pub id: b5,
pub f: b5,
pub quorum: b5,
pub qbase: b24,
pub mb_prepare: b32,
pub mb_will_cert: b32,
pub mb_will_commit: b32,
pub mb_commit: b32,
pub mb_certify_valid: b32,
pub mb_certify: b32,
pub mb_vc: b32,
pub mb_vc_valid: b32,
pub mb_newview: b32,
pub mb_newview_valid: b32,
pub view: b32,
pub leader: b5,
pub stop: bool,
pub seq: b32,
pub slot: b4,
pub m: b32,
pub local_wait: b32,
pub issued: bool,
pub bc_done: bool,
pub wissued: bool,
pub second: bool,
pub prop: [b32; G],
pub prop_valid: [bool; G],
pub enq: b4,
pub out_sent: bool,
pub rem_sent: bool,
pub slowed: bool,
pub share_beat: b5,
pub checked: [bool; N],
pub good: b5,
pub peer: b5,
pub reading: bool,
pub vbeats: b2,
pub voted_k: b32,
pub voted_m: b32,
pub voted_phase: b2,
pub rec: b5,
pub rec_k: [b32; N],
pub rec_m: [b32; N],
pub rec_ok: [bool; N],
pub nv_k: b32,
pub nv_m: b32,
pub status: Status,
pub slot_start: b32,
}Expand description
The controller’s registers. N is the most replicas the build supports,
G the window.
Fields§
§st: b6State (one of st).
sub: b2Submachine (one of sub), for the host.
args: ArgsThe run’s arguments.
n: b5Replicas in this run.
id: b5This replica.
f: b5Faults tolerated, (n − 1) / 2.
quorum: b5Quorum, 2f + 1.
qbase: b24First queue pair, (n − 1) · id (peer j at rank j or j − 1).
mb_prepare: b32Mailbox bases (words).
mb_will_cert: b32will_cert.
mb_will_commit: b32will_commit.
mb_commit: b32commit.
mb_certify_valid: b32certify_valid.
mb_certify: b32certify.
mb_vc: b32vc.
mb_vc_valid: b32vc_valid.
mb_newview: b32newview.
mb_newview_valid: b32newview_valid.
view: b32Current view.
leader: b5Its leader.
stop: boolThe run must stop at the end of this cycle (time up, a bound or a fault).
seq: b32The slot’s sequence number (k = seq + 1).
slot: b4seq mod G.
m: b32The slot’s value, once its prepare is seen.
local_wait: b32Polls without progress.
issued: boolThis state’s broadcast was started.
bc_done: boolThis state’s broadcast is done; its local record is next.
wissued: boolThis state’s local write was started.
second: boolUnused (kept for the register layout).
prop: [b32; G]Proposals waiting, one per window slot.
prop_valid: [bool; G]Which window slots hold a proposal.
enq: b4Window slot the next proposal goes to.
out_sent: boolDecision beats sent: output, remoteUpdate.
rem_sent: boolremoteUpdate sent.
slowed: boolThis slot took the slow path.
Signature beats received (share RAM write address).
checked: [bool; N]Peers whose share was checked this slot.
good: b5Valid shares counted (ours included).
peer: b5The peer being verified.
reading: boolThe share read was started.
vbeats: b2Verify beats sent.
voted_k: b32What this replica voted for in the slot: k, m, phase (0 none, 1
will_cert, 2 will_commit or commit).
voted_m: b32Its m.
voted_phase: b2Its phase.
rec: b5Record being read.
rec_k: [b32; N]The records: reported k.
rec_m: [b32; N]Reported m.
rec_ok: [bool; N]The record is for this view and slot and reports a vote.
nv_k: b32The chosen (k, m) (k = 0: none).
nv_m: b32Its m.
status: StatusMeasurements for the host.
slot_start: b32Cycle the current slot started.
Implementations§
Trait Implementations§
Source§impl<const N: usize, const G: usize> Clone for ProtocolState<N, G>
impl<const N: usize, const G: usize> Clone for ProtocolState<N, G>
Source§fn clone(&self) -> ProtocolState<N, G>
fn clone(&self) -> ProtocolState<N, G>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<const N: usize, const G: usize> Digital for ProtocolState<N, G>
impl<const N: usize, const G: usize> Digital for ProtocolState<N, G>
Source§const BITS: usize
const BITS: usize
Source§fn static_kind() -> Kind
fn static_kind() -> Kind
Source§fn bin(self) -> Box<[BitX]>
fn bin(self) -> Box<[BitX]>
§fn typed_bits(self) -> TypedBits
fn typed_bits(self) -> TypedBits
§fn discriminant(self) -> TypedBits
fn discriminant(self) -> TypedBits
§fn variant_kind(self) -> Kind
fn variant_kind(self) -> Kind
§fn binary_string(self) -> String
fn binary_string(self) -> String
impl<const N: usize, const G: usize> Copy for ProtocolState<N, G>
impl<const N: usize, const G: usize> StructuralPartialEq for ProtocolState<N, G>
Auto Trait Implementations§
impl<const N: usize, const G: usize> Freeze for ProtocolState<N, G>
impl<const N: usize, const G: usize> RefUnwindSafe for ProtocolState<N, G>
impl<const N: usize, const G: usize> Send for ProtocolState<N, G>
impl<const N: usize, const G: usize> Sync for ProtocolState<N, G>
impl<const N: usize, const G: usize> Unpin for ProtocolState<N, G>
impl<const N: usize, const G: usize> UnsafeUnpin for ProtocolState<N, G>
impl<const N: usize, const G: usize> UnwindSafe for ProtocolState<N, G>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more