Struct near_primitives::epoch_manager::EpochInfoV1

source ·
pub struct EpochInfoV1 {
Show 14 fields pub epoch_height: EpochHeight, pub validators: Vec<ValidatorStakeV1>, pub validator_to_index: HashMap<AccountId, ValidatorId>, pub block_producers_settlement: Vec<ValidatorId>, pub chunk_producers_settlement: Vec<Vec<ValidatorId>>, pub hidden_validators_settlement: Vec<ValidatorWeight>, pub fishermen: Vec<ValidatorStakeV1>, pub fishermen_to_index: HashMap<AccountId, ValidatorId>, pub stake_change: BTreeMap<AccountId, Balance>, pub validator_reward: HashMap<AccountId, Balance>, pub validator_kickout: HashMap<AccountId, ValidatorKickoutReason>, pub minted_amount: Balance, pub seat_price: Balance, pub protocol_version: ProtocolVersion,
}
Expand description

Information per epoch.

Fields§

§epoch_height: EpochHeight

Ordinal of given epoch from genesis. There can be multiple epochs with the same ordinal in case of long forks.

§validators: Vec<ValidatorStakeV1>

List of current validators.

§validator_to_index: HashMap<AccountId, ValidatorId>

Validator account id to index in proposals.

§block_producers_settlement: Vec<ValidatorId>

Settlement of validators responsible for block production.

§chunk_producers_settlement: Vec<Vec<ValidatorId>>

Per each shard, settlement validators that are responsible.

§hidden_validators_settlement: Vec<ValidatorWeight>

Settlement of hidden validators with weights used to determine how many shards they will validate.

§fishermen: Vec<ValidatorStakeV1>

List of current fishermen.

§fishermen_to_index: HashMap<AccountId, ValidatorId>

Fisherman account id to index of proposal.

§stake_change: BTreeMap<AccountId, Balance>

New stake for validators.

§validator_reward: HashMap<AccountId, Balance>

Validator reward for the epoch.

§validator_kickout: HashMap<AccountId, ValidatorKickoutReason>

Validators who are kicked out in this epoch.

§minted_amount: Balance

Total minted tokens in the epoch.

§seat_price: Balance

Seat price of this epoch.

§protocol_version: ProtocolVersion

Current protocol version during this epoch.

Trait Implementations§

source§

impl BorshDeserialize for EpochInfoV1

source§

fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>

source§

fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.
source§

fn try_from_slice(v: &[u8]) -> Result<Self, Error>

Deserialize this instance from a slice of bytes.
source§

fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>
where R: Read,

source§

impl BorshSerialize for EpochInfoV1

source§

fn serialize<__W: Write>(&self, writer: &mut __W) -> Result<(), Error>

source§

impl Clone for EpochInfoV1

source§

fn clone(&self) -> EpochInfoV1

Returns a copy 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 Debug for EpochInfoV1

source§

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

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

impl Default for EpochInfoV1

source§

fn default() -> Self

Return EpochInfoV1 { epoch_height: Default::default(), validators: Default::default(), validator_to_index: Default::default(), block_producers_settlement: Default::default(), chunk_producers_settlement: Default::default(), hidden_validators_settlement: Default::default(), fishermen: Default::default(), fishermen_to_index: Default::default(), stake_change: Default::default(), validator_reward: Default::default(), validator_kickout: Default::default(), minted_amount: Default::default(), seat_price: Default::default(), protocol_version: PROTOCOL_VERSION }

source§

impl PartialEq for EpochInfoV1

source§

fn eq(&self, other: &EpochInfoV1) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for EpochInfoV1

source§

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

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for EpochInfoV1

source§

impl StructuralPartialEq for EpochInfoV1

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> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

source§

fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

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

Initializes a with the given initializer. Read more
source§

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

Dereferences the given pointer. Read more
source§

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

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

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

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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>,

§

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.
source§

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

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more