Skip to main content

UbftReplica

Struct UbftReplica 

Source
pub struct UbftReplica {
    pub nodes: u32,
    pub window: u32,
}
Expand description

The uBFT replica the services sit beside: a fixed allowance off the budget, sized by UBFT_DESIGN_LUT and UBFT_DESIGN_DSP (an upper bound: the shell is included). Plans as itself, with no rate.

Fields§

§nodes: u32

Hardware capacity; runtime membership must still be odd.

§window: u32

Compile-time protocol window.

Implementations§

Source§

impl UbftReplica

Source

pub fn cost() -> Cost

Its footprint.

Trait Implementations§

Source§

impl Clone for UbftReplica

Source§

fn clone(&self) -> UbftReplica

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Component for UbftReplica

Source§

fn name(&self) -> String

Name in the planner.
Source§

fn role(&self) -> Role

What the component does.
Source§

fn knobs(&self) -> Vec<Knob>

Build options.
Source§

fn set_knob(&mut self, index: usize, value: f64)

Set knob index to value.
Source§

fn build_flags(&self, _plan: &Plan) -> BuildFlags

The compile-time settings that build plan (constants, features), as key = value pairs.
Source§

fn plan(&self, share: &Share, _cx: &Context) -> Option<Plan>

Best build within share, or None if nothing fits.
Source§

fn fixed(&self) -> Option<Share>

An allowance taken off the top of the budget before the powers divide the rest (the SHA line’s part of the LUT split), or None to take a share of its side.
Source§

fn ubft(&self) -> bool

A uBFT module: a service built to sit beside a uBFT replica (its streams and key slots), or the replica’s own footprint. Only the uBFT modes plan it, and they plan nothing else (Mode::admits).
Source§

fn size_for(&self, _per_second: f64, _cx: &Context) -> Option<Share>

A line that sizes itself to demand (“auto”): the allowance of its smallest build that supplies per_second units of what it supplies (SHA-512 blocks) at cx’s clock, or None when its size is set by hand (the default). The planner (plan_chip) calls it with the demand of the chip it plans, so the line never limits the chip.
Source§

fn resize(&mut self, _allowance: Share)

Remember the allowance the planner settled on for an auto-sized line (apply_layout calls it), so fixed and the next plan start from it.
Source§

fn unavailable(&self) -> Option<String>

Why the current knob settings cannot be planned at all (an option that is offered but not implemented yet), or None. The TUI shows it instead of “nothing fits”.
Source§

impl Debug for UbftReplica

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for UbftReplica

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.