Crate namada_parameters

Source
Expand description

Protocol parameters

Re-exports§

pub use storage::get_gas_scale;
pub use storage::get_max_block_gas;

Modules§

storage
Parameters storage
vp
VP for protocol parameters

Structs§

EpochDuration
Epoch duration. A new epoch begins as soon as both the min_num_of_blocks and min_duration have passed since the beginning of the current epoch.
Parameters
Protocol parameters
ProposalBytes
Configuration parameter for the upper limit on the number of bytes transactions can occupy in a block proposal.
Store
Parameters storage Keys/Read/Write implementation

Enums§

ReadError
WriteError

Constants§

ADDRESS
The internal address for storage keys representing parameters than can be changed via governance.

Traits§

Keys
Abstract parameters storage keys interface
Read
Abstract parameters storage read interface
Write
Abstract parameters storage write interface

Functions§

estimate_max_block_time_from_blocks
Return an estimate of the maximum time taken to decide a block, by sourcing block headers from up to num_blocks_to_read.
estimate_max_block_time_from_blocks_and_params
Return an estimate of the maximum time taken to decide a block, by sourcing block headers from up to num_blocks_to_read, and from chain parameters.
estimate_max_block_time_from_parameters
Return an estimate of the maximum time taken to decide a block, based on chain parameters.
init_storage
Initialize parameters in storage in the genesis block.
is_tx_allowed
Check if the given tx code Hash is in the allowlist. When the allowlist is empty it always returns true.
is_vp_allowed
Check if the given VP code Hash is in the allowlist. When the allowlist is empty it always returns true.
native_erc20_key
Storage key for the Ethereum address of wNam.
read
Read all the parameters from storage. Returns the parameters and gas cost.
read_epoch_duration_parameter
Read the epoch duration parameter from store
read_epochs_per_year
Read the number of epochs per year parameter
read_epochs_per_year_parameter
Read the epochs per year parameter from store
read_gas_cost
Read the cost per unit of gas for the provided token
read_masp_epoch_multiplier_parameter
Read the masp epoch multiplier parameter from store
read_max_proposal_bytes
Retrieve the max_proposal_bytes consensus parameter from storage.
update_epoch_parameter
Update the epoch parameter in storage. Returns the parameters and gas cost.
update_epochs_per_year_parameter
Update the epochs_per_year parameter in storage. Returns the parameters and gas cost.
update_implicit_vp
Update the implicit VP parameter in storage. Return the gas cost.
update_tx_allowlist_parameter
Update the tx allowlist parameter in storage. Returns the parameters and gas cost.
update_vp_allowlist_parameter
Update the vp allowlist parameter in storage. Returns the parameters and gas cost.
validate_tx_bytes
Validate the size of a tx.

Type Aliases§

Result
Result of a storage API call.