Struct dubp_common::currency_params::CurrencyParameters[][src]

pub struct CurrencyParameters {
Show fields pub protocol_version: usize, pub c: f64, pub dt: u64, pub ud0: usize, pub sig_period: u64, pub sig_renew_period: u64, pub sig_stock: usize, pub sig_window: u64, pub sig_validity: u64, pub sig_qty: usize, pub idty_window: u64, pub ms_window: u64, pub tx_window: u64, pub x_percent: f64, pub ms_validity: u64, pub ms_period: u64, pub step_max: usize, pub median_time_blocks: usize, pub avg_gen_time: u64, pub dt_diff_eval: usize, pub percent_rot: f64, pub ud_time0: u64, pub ud_reeval_time0: u64, pub dt_reeval: u64, pub fork_window_size: usize,
}
Expand description

Currency parameters

Fields

protocol_version: usize
Expand description

Protocol version

c: f64
Expand description

UD target growth rate (see Relative Theorie of Money)

dt: u64
Expand description

Duration between the creation of two UD (in seconds)

ud0: usize
Expand description

Amount of the initial UD

sig_period: u64
Expand description

Minimum duration between the writing of 2 certifications from the same issuer (in seconds)

sig_renew_period: u64
Expand description

Minimum duration between two renewals of the same certification

sig_stock: usize
Expand description

Maximum number of active certifications at the same time (for the same issuer)

sig_window: u64
Expand description

Maximum retention period of a pending certification

sig_validity: u64
Expand description

Time to expiry of written certification

sig_qty: usize
Expand description

Minimum number of certifications required to become a member

idty_window: u64
Expand description

Maximum retention period of a pending identity

ms_window: u64
Expand description

Maximum retention period of a pending membership

tx_window: u64
Expand description

Maximum retention period of a pending transaction

x_percent: f64
Expand description

Percentage of referring members who must be within step_max steps of each member

ms_validity: u64
Expand description

Time to expiry of written membership

ms_period: u64
Expand description

Minimum duration between the writing of 2 memberships from the same issuer (in seconds)

step_max: usize
Expand description

For a member to respect the distance rule, there must exist for more than x_percent % of the referring members a path of less than step_max steps from the referring member to the evaluated member.

median_time_blocks: usize
Expand description

Number of blocks used for calculating median time.

avg_gen_time: u64
Expand description

The average time for writing 1 block (wished time)

dt_diff_eval: usize
Expand description

The number of blocks required to evaluate again PoWMin value

percent_rot: f64
Expand description

The percent of previous issuers to reach for personalized difficulty

ud_time0: u64
Expand description

Time of first UD.

ud_reeval_time0: u64
Expand description

Time of first reevaluation of the UD.

dt_reeval: u64
Expand description

Time period between two re-evaluation of the UD.

fork_window_size: usize
Expand description

Maximum roolback length

Implementations

impl CurrencyParameters[src]

pub fn max_connectivity(&self) -> f64[src]

Get max value of connectivity (=1/x_percent)

Trait Implementations

impl Clone for CurrencyParameters[src]

fn clone(&self) -> CurrencyParameters[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for CurrencyParameters[src]

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

Formats the value using the given formatter. Read more

impl Default for CurrencyParameters[src]

fn default() -> Self[src]

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

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

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl From<(&'_ CurrencyName, BlockV10Parameters)> for CurrencyParameters[src]

fn from(source: (&CurrencyName, BlockV10Parameters)) -> CurrencyParameters[src]

Performs the conversion.

impl From<CurrencyNameAndGenesisBlockParams> for CurrencyParameters[src]

fn from(
    currency_name_and_genesis_block_params: CurrencyNameAndGenesisBlockParams
) -> Self
[src]

Performs the conversion.

impl PartialEq<CurrencyParameters> for CurrencyParameters[src]

fn eq(&self, other: &CurrencyParameters) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &CurrencyParameters) -> bool[src]

This method tests for !=.

impl Serialize for CurrencyParameters[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl Copy for CurrencyParameters[src]

impl StructuralPartialEq for CurrencyParameters[src]

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

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.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

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.

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

Performs the conversion.

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.

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

Performs the conversion.

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