[][src]Struct xaynet_server::settings::PetSettings

pub struct PetSettings {
    pub min_sum_count: usize,
    pub min_update_count: usize,
    pub min_sum_time: u64,
    pub min_update_time: u64,
    pub max_sum_time: u64,
    pub max_update_time: u64,
    pub sum: f64,
    pub update: f64,
}

PET protocol settings.

Fields

min_sum_count: usize

The minimal number of participants selected for computing the unmasking sum. The value must be greater or equal to 1 (i.e. min_sum_count >= 1), otherwise the PET protocol will be broken.

This parameter should only be used to enforce security constraints.

Examples

TOML

[pet]
min_sum_count = 1

Environment variable

XAYNET_PET__MIN_SUM_COUNT=1
min_update_count: usize

The expected fraction of participants selected for submitting an updated local model for aggregation. The value must be greater or equal to 3 (i.e. min_update_count >= 3), otherwise the PET protocol will be broken.

This parameter should only be used to enforce security constraints.

Examples

TOML

[pet]
min_update_count = 3

Environment variable

XAYNET_PET__MIN_UPDATE_COUNT=3
min_sum_time: u64

The minimum amount of time reserved for processing messages in the sum and sum2 phases, in seconds.

Defaults to 0 i.e. sum and sum2 phases end as soon as PetSettings::min_sum_count messages have been processed. Set this higher to allow for the possibility of more than PetSettings::min_sum_count messages to be processed in the sum and sum2 phases.

Examples

TOML

[pet]
min_sum_time = 5

Environment variable

XAYNET_PET__MIN_SUM_TIME=5
min_update_time: u64

The minimum amount of time reserved for processing messages in the update phase, in seconds.

Defaults to 0 i.e. update phase ends as soon as PetSettings::min_update_count messages have been processed. Set this higher to allow for the possibility of more than PetSettings::min_update_count messages to be processed in the update phase.

Examples

TOML

[pet]
min_update_time = 10

Environment variable

XAYNET_PET__MIN_UPDATE_TIME=10
max_sum_time: u64

The maximum amount of time permitted for processing messages in the sum and sum2 phases, in seconds.

Defaults to a large number (effectively 1 week). Set this lower to allow for the processing of PetSettings::min_sum_count messages to time-out sooner in the sum and sum2 phases.

Examples

TOML

[pet]
max_sum_time = 30

Environment variable

XAYNET_PET__MAX_SUM_TIME=30
max_update_time: u64

The maximum amount of time permitted for processing messages in the update phase, in seconds.

Defaults to a large number (effectively 1 week). Set this lower to allow for the processing of PetSettings::min_update_count messages to time-out sooner in the update phase.

Examples

TOML

[pet]
max_update_time = 60

Environment variable

XAYNET_PET__MAX_UPDATE_TIME=60
sum: f64

The expected fraction of participants selected for computing the unmasking sum. The value must be between 0 and 1 (i.e. 0 < sum < 1).

Additionally, it is enforced that 0 < sum + update - sum*update < 1 to avoid pathological cases of deadlocks.

Examples

TOML

[pet]
sum = 0.01

Environment variable

XAYNET_PET__SUM=0.01
update: f64

The expected fraction of participants selected for submitting an updated local model for aggregation. The value must be between 0 and 1 (i.e. 0 < update < 1).

Additionally, it is enforced that 0 < sum + update - sum*update < 1 to avoid pathological cases of deadlocks.

Examples

TOML

[pet]
update = 0.01

Environment variable

XAYNET_PET__UPDATE=0.01

Trait Implementations

impl Clone for PetSettings[src]

impl Copy for PetSettings[src]

impl Debug for PetSettings[src]

impl Default for PetSettings[src]

impl<'de> Deserialize<'de> for PetSettings[src]

impl Validate for PetSettings[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]