pub struct LimitConfig {Show 28 fields
pub account_id_validity_rules_version: AccountIdValidityRulesVersion,
pub initial_memory_pages: u32,
pub max_actions_per_receipt: u64,
pub max_arguments_length: u64,
pub max_contract_size: u64,
pub max_functions_number_per_contract: Option<u64>,
pub max_gas_burnt: u64,
pub max_length_method_name: u64,
pub max_length_returned_data: u64,
pub max_length_storage_key: u64,
pub max_length_storage_value: u64,
pub max_locals_per_contract: Option<u64>,
pub max_memory_pages: u32,
pub max_number_bytes_method_names: u64,
pub max_number_input_data_dependencies: u64,
pub max_number_logs: u64,
pub max_number_registers: u64,
pub max_promises_per_function_call_action: u64,
pub max_receipt_size: u64,
pub max_register_size: u64,
pub max_stack_height: u32,
pub max_total_log_length: u64,
pub max_total_prepaid_gas: u64,
pub max_transaction_size: u64,
pub max_yield_payload_size: u64,
pub per_receipt_storage_proof_size_limit: u32,
pub registers_memory_limit: u64,
pub yield_timeout_length_in_blocks: u64,
}
Expand description
Describes limits for VM and Runtime. TODO #4139: consider switching to strongly-typed wrappers instead of raw quantities
JSON schema
{
"description": "Describes limits for VM and Runtime.\nTODO #4139: consider switching to strongly-typed wrappers instead of raw quantities",
"type": "object",
"required": [
"initial_memory_pages",
"max_actions_per_receipt",
"max_arguments_length",
"max_contract_size",
"max_gas_burnt",
"max_length_method_name",
"max_length_returned_data",
"max_length_storage_key",
"max_length_storage_value",
"max_memory_pages",
"max_number_bytes_method_names",
"max_number_input_data_dependencies",
"max_number_logs",
"max_number_registers",
"max_promises_per_function_call_action",
"max_receipt_size",
"max_register_size",
"max_stack_height",
"max_total_log_length",
"max_total_prepaid_gas",
"max_transaction_size",
"max_yield_payload_size",
"per_receipt_storage_proof_size_limit",
"registers_memory_limit",
"yield_timeout_length_in_blocks"
],
"properties": {
"account_id_validity_rules_version": {
"description": "Whether to enforce account_id well-formed-ness where it wasn't enforced\nhistorically.",
"default": 0,
"allOf": [
{
"$ref": "#/components/schemas/AccountIdValidityRulesVersion"
}
]
},
"initial_memory_pages": {
"description": "The initial number of memory pages.\nNOTE: It's not a limiter itself, but it's a value we use for initial_memory_pages.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"max_actions_per_receipt": {
"description": "Max number of actions per receipt.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_arguments_length": {
"description": "Max length of arguments in a function call action.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_contract_size": {
"description": "Max contract size",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_functions_number_per_contract": {
"description": "If present, stores max number of functions in one contract",
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"max_gas_burnt": {
"description": "Max amount of gas that can be used, excluding gas attached to promises.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_length_method_name": {
"description": "Max length of any method name (without terminating character).",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_length_returned_data": {
"description": "Max length of returned data",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_length_storage_key": {
"description": "Max storage key size",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_length_storage_value": {
"description": "Max storage value size",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_locals_per_contract": {
"description": "If present, stores max number of locals declared globally in one contract",
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"max_memory_pages": {
"description": "What is the maximal memory pages amount is allowed to have for a contract.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"max_number_bytes_method_names": {
"description": "Max total length of all method names (including terminating character) for a function call\npermission access key.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_number_input_data_dependencies": {
"description": "Max number of input data dependencies",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_number_logs": {
"description": "Maximum number of log entries.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_number_registers": {
"description": "Maximum number of registers that can be used simultaneously.\n\nNote that due to an implementation quirk [read: a bug] in VMLogic, if we\nhave this number of registers, no subsequent writes to the registers\nwill succeed even if they replace an existing register.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_promises_per_function_call_action": {
"description": "Max number of promises that a function call can create",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_receipt_size": {
"description": "Max receipt size",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_register_size": {
"description": "Maximum number of bytes that can be stored in a single register.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_stack_height": {
"description": "How tall the stack is allowed to grow?\n\nSee <https://wiki.parity.io/WebAssembly-StackHeight> to find out how the stack frame cost\nis calculated.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"max_total_log_length": {
"description": "Maximum total length in bytes of all log messages.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_total_prepaid_gas": {
"description": "Max total prepaid gas for all function call actions per receipt.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_transaction_size": {
"description": "Max transaction size",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_yield_payload_size": {
"description": "Maximum number of bytes for payload passed over a yield resume.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"per_receipt_storage_proof_size_limit": {
"description": "Hard limit on the size of storage proof generated while executing a single receipt.",
"type": "integer",
"format": "uint",
"minimum": 0.0
},
"registers_memory_limit": {
"description": "Limit of memory used by registers.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"yield_timeout_length_in_blocks": {
"description": "Number of blocks after which a yielded promise times out.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
}
Fields§
§account_id_validity_rules_version: AccountIdValidityRulesVersion
Whether to enforce account_id well-formed-ness where it wasn’t enforced historically.
initial_memory_pages: u32
The initial number of memory pages. NOTE: It’s not a limiter itself, but it’s a value we use for initial_memory_pages.
max_actions_per_receipt: u64
Max number of actions per receipt.
max_arguments_length: u64
Max length of arguments in a function call action.
max_contract_size: u64
Max contract size
max_functions_number_per_contract: Option<u64>
If present, stores max number of functions in one contract
max_gas_burnt: u64
Max amount of gas that can be used, excluding gas attached to promises.
max_length_method_name: u64
Max length of any method name (without terminating character).
max_length_returned_data: u64
Max length of returned data
max_length_storage_key: u64
Max storage key size
max_length_storage_value: u64
Max storage value size
max_locals_per_contract: Option<u64>
If present, stores max number of locals declared globally in one contract
max_memory_pages: u32
What is the maximal memory pages amount is allowed to have for a contract.
max_number_bytes_method_names: u64
Max total length of all method names (including terminating character) for a function call permission access key.
max_number_input_data_dependencies: u64
Max number of input data dependencies
max_number_logs: u64
Maximum number of log entries.
max_number_registers: u64
Maximum number of registers that can be used simultaneously.
Note that due to an implementation quirk [read: a bug] in VMLogic, if we have this number of registers, no subsequent writes to the registers will succeed even if they replace an existing register.
max_promises_per_function_call_action: u64
Max number of promises that a function call can create
max_receipt_size: u64
Max receipt size
max_register_size: u64
Maximum number of bytes that can be stored in a single register.
max_stack_height: u32
How tall the stack is allowed to grow?
See https://wiki.parity.io/WebAssembly-StackHeight to find out how the stack frame cost is calculated.
max_total_log_length: u64
Maximum total length in bytes of all log messages.
max_total_prepaid_gas: u64
Max total prepaid gas for all function call actions per receipt.
max_transaction_size: u64
Max transaction size
max_yield_payload_size: u64
Maximum number of bytes for payload passed over a yield resume.
per_receipt_storage_proof_size_limit: u32
Hard limit on the size of storage proof generated while executing a single receipt.
registers_memory_limit: u64
Limit of memory used by registers.
yield_timeout_length_in_blocks: u64
Number of blocks after which a yielded promise times out.
Trait Implementations§
Source§impl Clone for LimitConfig
impl Clone for LimitConfig
Source§fn clone(&self) -> LimitConfig
fn clone(&self) -> LimitConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more