pub struct NetworkConfigParams {
pub max_sha256_buffers: Option<u32>,
pub max_cross_invoke_depth: Option<u32>,
pub max_new_contracts_per_tx: Option<u32>,
pub max_bytestring_len: Option<u32>,
pub max_contract_size_bytes: Option<u32>,
pub max_savepoint_depth: Option<u32>,
pub max_auth_token_depth: Option<u32>,
pub max_rv32_code_bytes: Option<u32>,
pub max_rv32_memory_bytes: Option<u32>,
pub max_tx_gas: Option<u64>,
}Expand description
The execution parameters a chain’s network config states, flattened
from the list that carries them. Backs the getChainConfig response.
A field is None, and absent from the JSON, when the config does not
state that parameter; the node alone decides what is then in force.
Default is the reading with nothing stated.
Fields§
§max_sha256_buffers: Option<u32>Concurrently open incremental SHA-256 buffers permitted per invocation frame.
max_cross_invoke_depth: Option<u32>Invocation frames one transaction may have open at once.
max_new_contracts_per_tx: Option<u32>Contracts one transaction may attach in contractsToDeploy.
max_bytestring_len: Option<u32>Bytes one bytestring storage item may hold.
max_contract_size_bytes: Option<u32>Bytes one attached contract’s code blob may hold. The protocol fixes
kDefaultMaxContractSizeBytes as the value in force when unstated.
max_savepoint_depth: Option<u32>Storage savepoints one transaction may have open at once.
max_auth_token_depth: Option<u32>Levels of node nesting an auth token may carry.
max_rv32_code_bytes: Option<u32>Code bytes an RV32 artifact may carry to be attached. The protocol
fixes kDefaultMaxRv32CodeBytes as the value in force when unstated.
max_rv32_memory_bytes: Option<u32>Guest data memory bytes an RV32 artifact may declare to be attached.
The protocol fixes kDefaultMaxRv32MemoryBytes as the value in force
when unstated.
max_tx_gas: Option<u64>Gas one transaction may budget: the most a root invocation’s
gasLimit may state. The protocol fixes 1,000,000,000 as the value
in force when unstated.
Implementations§
Source§impl NetworkConfigParams
impl NetworkConfigParams
Sourcepub fn from_network_config(
config: &NetworkConfig,
) -> Result<NetworkConfigParams, UnsupportedNetworkConfig>
pub fn from_network_config( config: &NetworkConfig, ) -> Result<NetworkConfigParams, UnsupportedNetworkConfig>
Flatten the parameters a network config states.
A config version this build cannot interpret is an error rather than a guess: the protocol requires a node that cannot name a version to fail, and this crate follows suit.
Trait Implementations§
Source§impl Clone for NetworkConfigParams
impl Clone for NetworkConfigParams
Source§fn clone(&self) -> NetworkConfigParams
fn clone(&self) -> NetworkConfigParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NetworkConfigParams
Source§impl Debug for NetworkConfigParams
impl Debug for NetworkConfigParams
Source§impl Default for NetworkConfigParams
impl Default for NetworkConfigParams
Source§fn default() -> NetworkConfigParams
fn default() -> NetworkConfigParams
Source§impl<'de> Deserialize<'de> for NetworkConfigParams
impl<'de> Deserialize<'de> for NetworkConfigParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NetworkConfigParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NetworkConfigParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for NetworkConfigParams
Source§impl JsonSchema for NetworkConfigParams
impl JsonSchema for NetworkConfigParams
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more