Skip to main content

NetworkConfigParams

Struct NetworkConfigParams 

Source
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

Source

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

Source§

fn clone(&self) -> NetworkConfigParams

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for NetworkConfigParams

Source§

impl Debug for NetworkConfigParams

Source§

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

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

impl Default for NetworkConfigParams

Source§

fn default() -> NetworkConfigParams

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for NetworkConfigParams

Source§

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

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

impl Eq for NetworkConfigParams

Source§

impl JsonSchema for NetworkConfigParams

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for NetworkConfigParams

Source§

fn eq(&self, other: &NetworkConfigParams) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for NetworkConfigParams

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for NetworkConfigParams

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> StaticIfNoAlloc for T

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.