Struct RpcProtocolConfigResponse

Source
pub struct RpcProtocolConfigResponse {
Show 33 fields pub avg_hidden_validator_seats_per_shard: Vec<u64>, pub block_producer_kickout_threshold: u8, pub chain_id: String, pub chunk_producer_kickout_threshold: u8, pub chunk_validator_only_kickout_threshold: u8, pub dynamic_resharding: bool, pub epoch_length: u64, pub fishermen_threshold: String, pub gas_limit: u64, pub gas_price_adjustment_rate: [i32; 2], pub genesis_height: u64, pub genesis_time: DateTime<Utc>, pub max_gas_price: String, pub max_inflation_rate: [i32; 2], pub max_kickout_stake_perc: u8, pub min_gas_price: String, pub minimum_stake_divisor: u64, pub minimum_stake_ratio: [i32; 2], pub minimum_validators_per_shard: u64, pub num_block_producer_seats: u64, pub num_block_producer_seats_per_shard: Vec<u64>, pub num_blocks_per_year: u64, pub online_max_threshold: [i32; 2], pub online_min_threshold: [i32; 2], pub protocol_reward_rate: [i32; 2], pub protocol_treasury_account: AccountId, pub protocol_upgrade_stake_threshold: [i32; 2], pub protocol_version: u32, pub runtime_config: RuntimeConfigView, pub shard_layout: ShardLayout, pub shuffle_shard_assignment_for_chunk_producers: bool, pub target_validator_mandates_per_shard: u64, pub transaction_validity_period: u64,
}
Expand description

RpcProtocolConfigResponse

JSON schema
{
 "type": "object",
 "required": [
   "avg_hidden_validator_seats_per_shard",
   "block_producer_kickout_threshold",
   "chain_id",
   "chunk_producer_kickout_threshold",
   "chunk_validator_only_kickout_threshold",
   "dynamic_resharding",
   "epoch_length",
   "fishermen_threshold",
   "gas_limit",
   "gas_price_adjustment_rate",
   "genesis_height",
   "genesis_time",
   "max_gas_price",
   "max_inflation_rate",
   "max_kickout_stake_perc",
   "min_gas_price",
   "minimum_stake_divisor",
   "minimum_stake_ratio",
   "minimum_validators_per_shard",
   "num_block_producer_seats",
   "num_block_producer_seats_per_shard",
   "num_blocks_per_year",
   "online_max_threshold",
   "online_min_threshold",
   "protocol_reward_rate",
   "protocol_treasury_account",
   "protocol_upgrade_stake_threshold",
   "protocol_version",
   "runtime_config",
   "shard_layout",
   "shuffle_shard_assignment_for_chunk_producers",
   "target_validator_mandates_per_shard",
   "transaction_validity_period"
 ],
 "properties": {
   "avg_hidden_validator_seats_per_shard": {
     "description": "Expected number of hidden validators per shard.",
     "type": "array",
     "items": {
       "type": "integer",
       "format": "uint64",
       "minimum": 0.0
     }
   },
   "block_producer_kickout_threshold": {
     "description": "Threshold for kicking out block producers, between 0 and 100.",
     "type": "integer",
     "format": "uint8",
     "maximum": 255.0,
     "minimum": 0.0
   },
   "chain_id": {
     "description": "ID of the blockchain. This must be unique for every blockchain.\nIf your testnet blockchains do not have unique chain IDs, you will have a bad time.",
     "type": "string"
   },
   "chunk_producer_kickout_threshold": {
     "description": "Threshold for kicking out chunk producers, between 0 and 100.",
     "type": "integer",
     "format": "uint8",
     "maximum": 255.0,
     "minimum": 0.0
   },
   "chunk_validator_only_kickout_threshold": {
     "description": "Threshold for kicking out nodes which are only chunk validators, between 0 and 100.",
     "type": "integer",
     "format": "uint8",
     "maximum": 255.0,
     "minimum": 0.0
   },
   "dynamic_resharding": {
     "description": "Enable dynamic re-sharding.",
     "type": "boolean"
   },
   "epoch_length": {
     "description": "Epoch length counted in block heights.",
     "type": "integer",
     "format": "uint64",
     "minimum": 0.0
   },
   "fishermen_threshold": {
     "description": "Fishermen stake threshold.",
     "type": "string"
   },
   "gas_limit": {
     "description": "Initial gas limit.",
     "type": "integer",
     "format": "uint64",
     "minimum": 0.0
   },
   "gas_price_adjustment_rate": {
     "description": "Gas price adjustment rate",
     "type": "array",
     "items": {
       "type": "integer",
       "format": "int32"
     },
     "maxItems": 2,
     "minItems": 2
   },
   "genesis_height": {
     "description": "Height of genesis block.",
     "type": "integer",
     "format": "uint64",
     "minimum": 0.0
   },
   "genesis_time": {
     "description": "Official time of blockchain start.",
     "type": "string",
     "format": "date-time"
   },
   "max_gas_price": {
     "description": "Maximum gas price.",
     "type": "string"
   },
   "max_inflation_rate": {
     "description": "Maximum inflation on the total supply every epoch.",
     "type": "array",
     "items": {
       "type": "integer",
       "format": "int32"
     },
     "maxItems": 2,
     "minItems": 2
   },
   "max_kickout_stake_perc": {
     "description": "Max stake percentage of the validators we will kick out.",
     "type": "integer",
     "format": "uint8",
     "maximum": 255.0,
     "minimum": 0.0
   },
   "min_gas_price": {
     "description": "Minimum gas price. It is also the initial gas price.",
     "type": "string"
   },
   "minimum_stake_divisor": {
     "description": "The minimum stake required for staking is last seat price divided by this number.",
     "type": "integer",
     "format": "uint64",
     "minimum": 0.0
   },
   "minimum_stake_ratio": {
     "description": "The lowest ratio s/s_total any block producer can have.\nSee <https://github.com/near/NEPs/pull/167> for details",
     "type": "array",
     "items": {
       "type": "integer",
       "format": "int32"
     },
     "maxItems": 2,
     "minItems": 2
   },
   "minimum_validators_per_shard": {
     "description": "The minimum number of validators each shard must have",
     "type": "integer",
     "format": "uint64",
     "minimum": 0.0
   },
   "num_block_producer_seats": {
     "description": "Number of block producer seats at genesis.",
     "type": "integer",
     "format": "uint64",
     "minimum": 0.0
   },
   "num_block_producer_seats_per_shard": {
     "description": "Defines number of shards and number of block producer seats per each shard at genesis.",
     "type": "array",
     "items": {
       "type": "integer",
       "format": "uint64",
       "minimum": 0.0
     }
   },
   "num_blocks_per_year": {
     "description": "Expected number of blocks per year",
     "type": "integer",
     "format": "uint64",
     "minimum": 0.0
   },
   "online_max_threshold": {
     "description": "Online maximum threshold above which validator gets full reward.",
     "type": "array",
     "items": {
       "type": "integer",
       "format": "int32"
     },
     "maxItems": 2,
     "minItems": 2
   },
   "online_min_threshold": {
     "description": "Online minimum threshold below which validator doesn't receive reward.",
     "type": "array",
     "items": {
       "type": "integer",
       "format": "int32"
     },
     "maxItems": 2,
     "minItems": 2
   },
   "protocol_reward_rate": {
     "description": "Protocol treasury rate",
     "type": "array",
     "items": {
       "type": "integer",
       "format": "int32"
     },
     "maxItems": 2,
     "minItems": 2
   },
   "protocol_treasury_account": {
     "description": "Protocol treasury account",
     "allOf": [
       {
         "$ref": "#/components/schemas/AccountId"
       }
     ]
   },
   "protocol_upgrade_stake_threshold": {
     "description": "Threshold of stake that needs to indicate that they ready for upgrade.",
     "type": "array",
     "items": {
       "type": "integer",
       "format": "int32"
     },
     "maxItems": 2,
     "minItems": 2
   },
   "protocol_version": {
     "description": "Current Protocol Version",
     "type": "integer",
     "format": "uint32",
     "minimum": 0.0
   },
   "runtime_config": {
     "description": "Runtime configuration (mostly economics constants).",
     "allOf": [
       {
         "$ref": "#/components/schemas/RuntimeConfigView"
       }
     ]
   },
   "shard_layout": {
     "description": "Layout information regarding how to split accounts to shards",
     "allOf": [
       {
         "$ref": "#/components/schemas/ShardLayout"
       }
     ]
   },
   "shuffle_shard_assignment_for_chunk_producers": {
     "description": "If true, shuffle the chunk producers across shards. In other words, if\nthe shard assignments were `[S_0, S_1, S_2, S_3]` where `S_i` represents\nthe set of chunk producers for shard `i`, if this flag were true, the\nshard assignments might become, for example, `[S_2, S_0, S_3, S_1]`.",
     "type": "boolean"
   },
   "target_validator_mandates_per_shard": {
     "description": "Number of target chunk validator mandates for each shard.",
     "type": "integer",
     "format": "uint64",
     "minimum": 0.0
   },
   "transaction_validity_period": {
     "description": "Number of blocks for which a given transaction is valid",
     "type": "integer",
     "format": "uint64",
     "minimum": 0.0
   }
 }
}

Fields§

§avg_hidden_validator_seats_per_shard: Vec<u64>

Expected number of hidden validators per shard.

§block_producer_kickout_threshold: u8

Threshold for kicking out block producers, between 0 and 100.

§chain_id: String

ID of the blockchain. This must be unique for every blockchain. If your testnet blockchains do not have unique chain IDs, you will have a bad time.

§chunk_producer_kickout_threshold: u8

Threshold for kicking out chunk producers, between 0 and 100.

§chunk_validator_only_kickout_threshold: u8

Threshold for kicking out nodes which are only chunk validators, between 0 and 100.

§dynamic_resharding: bool

Enable dynamic re-sharding.

§epoch_length: u64

Epoch length counted in block heights.

§fishermen_threshold: String

Fishermen stake threshold.

§gas_limit: u64

Initial gas limit.

§gas_price_adjustment_rate: [i32; 2]

Gas price adjustment rate

§genesis_height: u64

Height of genesis block.

§genesis_time: DateTime<Utc>

Official time of blockchain start.

§max_gas_price: String

Maximum gas price.

§max_inflation_rate: [i32; 2]

Maximum inflation on the total supply every epoch.

§max_kickout_stake_perc: u8

Max stake percentage of the validators we will kick out.

§min_gas_price: String

Minimum gas price. It is also the initial gas price.

§minimum_stake_divisor: u64

The minimum stake required for staking is last seat price divided by this number.

§minimum_stake_ratio: [i32; 2]

The lowest ratio s/s_total any block producer can have. See https://github.com/near/NEPs/pull/167 for details

§minimum_validators_per_shard: u64

The minimum number of validators each shard must have

§num_block_producer_seats: u64

Number of block producer seats at genesis.

§num_block_producer_seats_per_shard: Vec<u64>

Defines number of shards and number of block producer seats per each shard at genesis.

§num_blocks_per_year: u64

Expected number of blocks per year

§online_max_threshold: [i32; 2]

Online maximum threshold above which validator gets full reward.

§online_min_threshold: [i32; 2]

Online minimum threshold below which validator doesn’t receive reward.

§protocol_reward_rate: [i32; 2]

Protocol treasury rate

§protocol_treasury_account: AccountId

Protocol treasury account

§protocol_upgrade_stake_threshold: [i32; 2]

Threshold of stake that needs to indicate that they ready for upgrade.

§protocol_version: u32

Current Protocol Version

§runtime_config: RuntimeConfigView

Runtime configuration (mostly economics constants).

§shard_layout: ShardLayout

Layout information regarding how to split accounts to shards

§shuffle_shard_assignment_for_chunk_producers: bool

If true, shuffle the chunk producers across shards. In other words, if the shard assignments were [S_0, S_1, S_2, S_3] where S_i represents the set of chunk producers for shard i, if this flag were true, the shard assignments might become, for example, [S_2, S_0, S_3, S_1].

§target_validator_mandates_per_shard: u64

Number of target chunk validator mandates for each shard.

§transaction_validity_period: u64

Number of blocks for which a given transaction is valid

Trait Implementations§

Source§

impl Clone for RpcProtocolConfigResponse

Source§

fn clone(&self) -> RpcProtocolConfigResponse

Returns a duplicate 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 RpcProtocolConfigResponse

Source§

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

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

impl<'de> Deserialize<'de> for RpcProtocolConfigResponse

Source§

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

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&RpcProtocolConfigResponse> for RpcProtocolConfigResponse

Source§

fn from(value: &RpcProtocolConfigResponse) -> Self

Converts to this type from the input type.
Source§

impl Serialize for RpcProtocolConfigResponse

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

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> 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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

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

Source§

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

Source§

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

Source§

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<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
Source§

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

Source§

impl<T> ErasedDestructor for T
where T: 'static,