pub enum TrackedShardsConfig {
NoShards,
Shards(Vec<ShardUId>),
AllShards,
ShadowValidator(AccountId),
Schedule(Vec<Vec<ShardId>>),
Accounts(Vec<AccountId>),
}
Expand description
Describes the expected behavior of the node regarding shard tracking. If the node is an active validator, it will also track the shards it is responsible for as a validator.
JSON schema
{
"description": "Describes the expected behavior of the node regarding shard tracking.\nIf the node is an active validator, it will also track the shards it is responsible for as a validator.",
"oneOf": [
{
"description": "Tracks no shards (light client).",
"type": "string",
"enum": [
"NoShards"
]
},
{
"description": "Tracks arbitrary shards.",
"type": "object",
"required": [
"Shards"
],
"properties": {
"Shards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ShardUId"
}
}
},
"additionalProperties": false
},
{
"description": "Tracks all shards.",
"type": "string",
"enum": [
"AllShards"
]
},
{
"description": "Tracks shards that are assigned to given validator account.",
"type": "object",
"required": [
"ShadowValidator"
],
"properties": {
"ShadowValidator": {
"$ref": "#/components/schemas/AccountId"
}
},
"additionalProperties": false
},
{
"description": "Rotate between these sets of tracked shards.\nUsed to simulate the behavior of chunk only producers without staking tokens.",
"type": "object",
"required": [
"Schedule"
],
"properties": {
"Schedule": {
"type": "array",
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ShardId"
}
}
}
},
"additionalProperties": false
},
{
"description": "Tracks shards that contain one of the given account.",
"type": "object",
"required": [
"Accounts"
],
"properties": {
"Accounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AccountId"
}
}
},
"additionalProperties": false
}
]
}
Variants§
NoShards
Tracks no shards (light client).
Shards(Vec<ShardUId>)
Tracks arbitrary shards.
AllShards
Tracks all shards.
ShadowValidator(AccountId)
Tracks shards that are assigned to given validator account.
Schedule(Vec<Vec<ShardId>>)
Rotate between these sets of tracked shards. Used to simulate the behavior of chunk only producers without staking tokens.
Accounts(Vec<AccountId>)
Tracks shards that contain one of the given account.
Trait Implementations§
Source§impl Clone for TrackedShardsConfig
impl Clone for TrackedShardsConfig
Source§fn clone(&self) -> TrackedShardsConfig
fn clone(&self) -> TrackedShardsConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TrackedShardsConfig
impl Debug for TrackedShardsConfig
Source§impl<'de> Deserialize<'de> for TrackedShardsConfig
impl<'de> Deserialize<'de> for TrackedShardsConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&TrackedShardsConfig> for TrackedShardsConfig
impl From<&TrackedShardsConfig> for TrackedShardsConfig
Source§fn from(value: &TrackedShardsConfig) -> Self
fn from(value: &TrackedShardsConfig) -> Self
Converts to this type from the input type.
Source§impl From<AccountId> for TrackedShardsConfig
impl From<AccountId> for TrackedShardsConfig
Auto Trait Implementations§
impl Freeze for TrackedShardsConfig
impl RefUnwindSafe for TrackedShardsConfig
impl Send for TrackedShardsConfig
impl Sync for TrackedShardsConfig
impl Unpin for TrackedShardsConfig
impl UnwindSafe for TrackedShardsConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more