mdp/state/version/
v0.rs

1use borsh::{BorshDeserialize, BorshSerialize};
2use solana_program::pubkey::Pubkey;
3
4use crate::state::{features::FeaturesSet, record::CountryCode, status::ErStatus};
5
6/// Version 0 of ER domain registry record
7#[derive(Debug, BorshSerialize, BorshDeserialize, PartialEq, Eq, Clone)]
8pub struct RecordV0 {
9    /// Identity of ER node (pubkey from its keypair)
10    pub identity: Pubkey,
11    /// Current status of ER node
12    pub status: ErStatus,
13    /// Block time of given ER node in ms
14    pub block_time_ms: u16,
15    /// Base fee charged by ER node per transaction
16    pub base_fee: u16,
17    /// A bitmap of all possible combination of custom features that the ER node supports
18    pub features: FeaturesSet,
19    /// An average value, which is acts as an indicator
20    /// of how loaded the given ER node currently is
21    pub load_average: u32,
22    /// 3 digit country code, where ER node is deployed
23    /// IBM spec was used as standard: https://www.ibm.com/docs/en/sia?topic=r-country-region-codes
24    pub country_code: CountryCode,
25    /// Variable length string representing FQDN
26    pub addr: String,
27}