pub struct CongestionControlConfigView {
pub allowed_shard_outgoing_gas: Option<NearGas>,
pub max_congestion_incoming_gas: Option<NearGas>,
pub max_congestion_memory_consumption: Option<u64>,
pub max_congestion_missed_chunks: Option<u64>,
pub max_congestion_outgoing_gas: Option<NearGas>,
pub max_outgoing_gas: Option<NearGas>,
pub max_tx_gas: Option<NearGas>,
pub min_outgoing_gas: Option<NearGas>,
pub min_tx_gas: Option<NearGas>,
pub outgoing_receipts_big_size_limit: Option<u64>,
pub outgoing_receipts_usual_size_limit: Option<u64>,
pub reject_tx_congestion_threshold: Option<f64>,
}Expand description
The configuration for congestion control. More info about congestion here
JSON schema
{
"description": "The configuration for congestion control. More info about congestion [here](https://near.github.io/nearcore/architecture/how/receipt-congestion.html?highlight=congestion#receipt-congestion)",
"type": "object",
"properties": {
"allowed_shard_outgoing_gas": {
"description": "How much gas the chosen allowed shard can send to a 100% congested shard.\n\nSee [`CongestionControlConfig`] for more details.",
"allOf": [
{
"$ref": "#/components/schemas/NearGas"
}
]
},
"max_congestion_incoming_gas": {
"description": "How much gas in delayed receipts of a shard is 100% incoming congestion.\n\nSee [`CongestionControlConfig`] for more details.",
"allOf": [
{
"$ref": "#/components/schemas/NearGas"
}
]
},
"max_congestion_memory_consumption": {
"description": "How much memory space of all delayed and buffered receipts in a shard is\nconsidered 100% congested.\n\nSee [`CongestionControlConfig`] for more details.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_congestion_missed_chunks": {
"description": "How many missed chunks in a row in a shard is considered 100% congested.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_congestion_outgoing_gas": {
"description": "How much gas in outgoing buffered receipts of a shard is 100% congested.\n\nOutgoing congestion contributes to overall congestion, which reduces how\nmuch other shards are allowed to forward to this shard.",
"allOf": [
{
"$ref": "#/components/schemas/NearGas"
}
]
},
"max_outgoing_gas": {
"description": "The maximum amount of gas attached to receipts a shard can forward to\nanother shard per chunk.\n\nSee [`CongestionControlConfig`] for more details.",
"allOf": [
{
"$ref": "#/components/schemas/NearGas"
}
]
},
"max_tx_gas": {
"description": "The maximum amount of gas in a chunk spent on converting new transactions to\nreceipts.\n\nSee [`CongestionControlConfig`] for more details.",
"allOf": [
{
"$ref": "#/components/schemas/NearGas"
}
]
},
"min_outgoing_gas": {
"description": "The minimum gas each shard can send to a shard that is not fully congested.\n\nSee [`CongestionControlConfig`] for more details.",
"allOf": [
{
"$ref": "#/components/schemas/NearGas"
}
]
},
"min_tx_gas": {
"description": "The minimum amount of gas in a chunk spent on converting new transactions\nto receipts, as long as the receiving shard is not congested.\n\nSee [`CongestionControlConfig`] for more details.",
"allOf": [
{
"$ref": "#/components/schemas/NearGas"
}
]
},
"outgoing_receipts_big_size_limit": {
"description": "Large size limit for outgoing receipts to a shard, used when it's safe\nto send a lot of receipts without making the state witness too large.\nIt limits the total sum of outgoing receipts, not individual receipts.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"outgoing_receipts_usual_size_limit": {
"description": "The standard size limit for outgoing receipts aimed at a single shard.\nThis limit is pretty small to keep the size of source_receipt_proofs under control.\nIt limits the total sum of outgoing receipts, not individual receipts.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"reject_tx_congestion_threshold": {
"description": "How much congestion a shard can tolerate before it stops all shards from\naccepting new transactions with the receiver set to the congested shard.",
"type": "number",
"format": "double"
}
}
}Fields§
§allowed_shard_outgoing_gas: Option<NearGas>How much gas the chosen allowed shard can send to a 100% congested shard.
See [CongestionControlConfig] for more details.
max_congestion_incoming_gas: Option<NearGas>How much gas in delayed receipts of a shard is 100% incoming congestion.
See [CongestionControlConfig] for more details.
max_congestion_memory_consumption: Option<u64>How much memory space of all delayed and buffered receipts in a shard is considered 100% congested.
See [CongestionControlConfig] for more details.
max_congestion_missed_chunks: Option<u64>How many missed chunks in a row in a shard is considered 100% congested.
max_congestion_outgoing_gas: Option<NearGas>How much gas in outgoing buffered receipts of a shard is 100% congested.
Outgoing congestion contributes to overall congestion, which reduces how much other shards are allowed to forward to this shard.
max_outgoing_gas: Option<NearGas>The maximum amount of gas attached to receipts a shard can forward to another shard per chunk.
See [CongestionControlConfig] for more details.
max_tx_gas: Option<NearGas>The maximum amount of gas in a chunk spent on converting new transactions to receipts.
See [CongestionControlConfig] for more details.
min_outgoing_gas: Option<NearGas>The minimum gas each shard can send to a shard that is not fully congested.
See [CongestionControlConfig] for more details.
min_tx_gas: Option<NearGas>The minimum amount of gas in a chunk spent on converting new transactions to receipts, as long as the receiving shard is not congested.
See [CongestionControlConfig] for more details.
outgoing_receipts_big_size_limit: Option<u64>Large size limit for outgoing receipts to a shard, used when it’s safe to send a lot of receipts without making the state witness too large. It limits the total sum of outgoing receipts, not individual receipts.
outgoing_receipts_usual_size_limit: Option<u64>The standard size limit for outgoing receipts aimed at a single shard. This limit is pretty small to keep the size of source_receipt_proofs under control. It limits the total sum of outgoing receipts, not individual receipts.
reject_tx_congestion_threshold: Option<f64>Trait Implementations§
Source§impl Clone for CongestionControlConfigView
impl Clone for CongestionControlConfigView
Source§fn clone(&self) -> CongestionControlConfigView
fn clone(&self) -> CongestionControlConfigView
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CongestionControlConfigView
impl Debug for CongestionControlConfigView
Source§impl<'de> Deserialize<'de> for CongestionControlConfigView
impl<'de> Deserialize<'de> for CongestionControlConfigView
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<&CongestionControlConfigView> for CongestionControlConfigView
impl From<&CongestionControlConfigView> for CongestionControlConfigView
Source§fn from(value: &CongestionControlConfigView) -> Self
fn from(value: &CongestionControlConfigView) -> Self
Auto Trait Implementations§
impl Freeze for CongestionControlConfigView
impl RefUnwindSafe for CongestionControlConfigView
impl Send for CongestionControlConfigView
impl Sync for CongestionControlConfigView
impl Unpin for CongestionControlConfigView
impl UnwindSafe for CongestionControlConfigView
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)