pub struct SsaGeneratorConfig {
pub polynomials_per_ssa: u16,
pub threshold: u8,
pub surplus_shares: u8,
}Expand description
Configuration for the SsaShareGenerator.
Fields§
§polynomials_per_ssa: u16The number of polynomials to generate per SSA commitment.
Default is DEFAULT_POLYS_PER_SSA, must be between 1 and MAX_POLYS_PER_SSA.
threshold: u8Minimum number of shares required to reconstruct each SSA polynomial.
Default is DEFAULT_POLY_THRESHOLD, must be at least MIN_POLY_THRESHOLD. The upper
bound MAX_POLY_THRESHOLD is the width of the field.
Additional number of shares to generate beyond the threshold for redundancy.
Covers lost shares only: the Exit reconstructs from the first threshold distinct shares
that reach it, so any of the surplus can stand in for one that never arrives. It does not
cover corrupt shares — nothing checks a share on arrival any more, so a bad one is only
noticed once it has already poisoned the interpolation. See
SsaPartCommitment.
Emitting them is unconditional: a polynomial leaves the queue at threshold + surplus
shares, whether or not any were lost, so the Exit serves this many packets per polynomial in
every case. That is why the surplus is part of the per-SSA quota rather than free service —
the Entry is buying insurance, and insurance is paid for whether or not it is claimed.
Default is DEFAULT_SURPLUS_SHARES — but prefer
default_surplus_for wherever the threshold is known, because
this is a ratio of it and the constant can only be the ratio evaluated at the default
threshold.
Bounded by threshold rather than by the byte the wire gives it: see
surplus_must_not_exceed_threshold. It shares the lower half of the negotiated
PixParams word with threshold, so a byte is all that fits there — but
what is representable and what is sane to configure are different questions, and this field
used to be documented as needing no validator on the strength of the first.
Trait Implementations§
Source§impl Clone for SsaGeneratorConfig
impl Clone for SsaGeneratorConfig
Source§fn clone(&self) -> SsaGeneratorConfig
fn clone(&self) -> SsaGeneratorConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SsaGeneratorConfig
Source§impl Debug for SsaGeneratorConfig
impl Debug for SsaGeneratorConfig
Source§impl Default for SsaGeneratorConfig
impl Default for SsaGeneratorConfig
Source§impl<'de> Deserialize<'de> for SsaGeneratorConfig
impl<'de> Deserialize<'de> for SsaGeneratorConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SsaGeneratorConfig
Source§impl PartialEq for SsaGeneratorConfig
impl PartialEq for SsaGeneratorConfig
Source§impl Serialize for SsaGeneratorConfig
impl Serialize for SsaGeneratorConfig
impl StructuralPartialEq for SsaGeneratorConfig
Source§impl Validate for SsaGeneratorConfig
impl Validate for SsaGeneratorConfig
Auto Trait Implementations§
impl Freeze for SsaGeneratorConfig
impl RefUnwindSafe for SsaGeneratorConfig
impl Send for SsaGeneratorConfig
impl Sync for SsaGeneratorConfig
impl Unpin for SsaGeneratorConfig
impl UnsafeUnpin for SsaGeneratorConfig
impl UnwindSafe for SsaGeneratorConfig
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
impl<'de, T> BorrowedRpcObject<'de> for Twhere
T: RpcBorrow<'de> + RpcSend,
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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