pub struct LimitConfig {Show 30 fields
pub account_id_validity_rules_version: AccountIdValidityRulesVersion,
pub initial_memory_pages: Option<u32>,
pub max_actions_per_receipt: Option<u64>,
pub max_arguments_length: Option<u64>,
pub max_contract_size: Option<u64>,
pub max_elements_per_contract_table: Option<u32>,
pub max_functions_number_per_contract: Option<u64>,
pub max_gas_burnt: Option<NearGas>,
pub max_length_method_name: Option<u64>,
pub max_length_returned_data: Option<u64>,
pub max_length_storage_key: Option<u64>,
pub max_length_storage_value: Option<u64>,
pub max_locals_per_contract: Option<u64>,
pub max_memory_pages: Option<u32>,
pub max_number_bytes_method_names: Option<u64>,
pub max_number_input_data_dependencies: Option<u64>,
pub max_number_logs: Option<u64>,
pub max_number_registers: Option<u64>,
pub max_promises_per_function_call_action: Option<u64>,
pub max_receipt_size: Option<u64>,
pub max_register_size: Option<u64>,
pub max_stack_height: Option<u32>,
pub max_tables_per_contract: Option<u32>,
pub max_total_log_length: Option<u64>,
pub max_total_prepaid_gas: Option<NearGas>,
pub max_transaction_size: Option<u64>,
pub max_yield_payload_size: Option<u64>,
pub per_receipt_storage_proof_size_limit: Option<u32>,
pub registers_memory_limit: Option<u64>,
pub yield_timeout_length_in_blocks: Option<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",
"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_elements_per_contract_table": {
"description": "If present, stores max number of elements in a single contract's table",
"type": [
"integer",
"null"
],
"format": "uint",
"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.",
"allOf": [
{
"$ref": "#/components/schemas/NearGas"
}
]
},
"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_tables_per_contract": {
"description": "If present, stores max number of tables declared globally in one contract",
"type": [
"integer",
"null"
],
"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.",
"allOf": [
{
"$ref": "#/components/schemas/NearGas"
}
]
},
"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: AccountIdValidityRulesVersionWhether to enforce account_id well-formed-ness where it wasn’t enforced historically.
initial_memory_pages: Option<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: Option<u64>Max number of actions per receipt.
max_arguments_length: Option<u64>Max length of arguments in a function call action.
max_contract_size: Option<u64>Max contract size
max_elements_per_contract_table: Option<u32>If present, stores max number of elements in a single contract’s table
max_functions_number_per_contract: Option<u64>If present, stores max number of functions in one contract
max_gas_burnt: Option<NearGas>Max amount of gas that can be used, excluding gas attached to promises.
max_length_method_name: Option<u64>Max length of any method name (without terminating character).
max_length_returned_data: Option<u64>Max length of returned data
max_length_storage_key: Option<u64>Max storage key size
max_length_storage_value: Option<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: Option<u32>What is the maximal memory pages amount is allowed to have for a contract.
max_number_bytes_method_names: Option<u64>Max total length of all method names (including terminating character) for a function call permission access key.
max_number_input_data_dependencies: Option<u64>Max number of input data dependencies
max_number_logs: Option<u64>Maximum number of log entries.
max_number_registers: Option<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: Option<u64>Max number of promises that a function call can create
max_receipt_size: Option<u64>Max receipt size
max_register_size: Option<u64>Maximum number of bytes that can be stored in a single register.
max_stack_height: Option<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_tables_per_contract: Option<u32>If present, stores max number of tables declared globally in one contract
max_total_log_length: Option<u64>Maximum total length in bytes of all log messages.
max_total_prepaid_gas: Option<NearGas>Max total prepaid gas for all function call actions per receipt.
max_transaction_size: Option<u64>Max transaction size
max_yield_payload_size: Option<u64>Maximum number of bytes for payload passed over a yield resume.
per_receipt_storage_proof_size_limit: Option<u32>Hard limit on the size of storage proof generated while executing a single receipt.
registers_memory_limit: Option<u64>Limit of memory used by registers.
yield_timeout_length_in_blocks: Option<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