diff --git a/execution_engine/src/shared/opcode_costs.rs b/execution_engine/src/shared/opcode_costs.rs index 8da5449b5a..534bf7af8b 100644 --- a/execution_engine/src/shared/opcode_costs.rs +++ b/execution_engine/src/shared/opcode_costs.rs @@ -51,21 +51,21 @@ pub const DEFAULT_CONTROL_FLOW_ELSE_OPCODE: u32 = 440; /// Default cost of the `end` Wasm opcode. pub const DEFAULT_CONTROL_FLOW_END_OPCODE: u32 = 440; /// Default cost of the `br` Wasm opcode. -pub const DEFAULT_CONTROL_FLOW_BR_OPCODE: u32 = 440_000; +pub const DEFAULT_CONTROL_FLOW_BR_OPCODE: u32 = 35_000; /// Default cost of the `br_if` Wasm opcode. -pub const DEFAULT_CONTROL_FLOW_BR_IF_OPCODE: u32 = 440_000; +pub const DEFAULT_CONTROL_FLOW_BR_IF_OPCODE: u32 = 35_000; /// Default cost of the `return` Wasm opcode. pub const DEFAULT_CONTROL_FLOW_RETURN_OPCODE: u32 = 440; /// Default cost of the `select` Wasm opcode. pub const DEFAULT_CONTROL_FLOW_SELECT_OPCODE: u32 = 440; /// Default cost of the `call` Wasm opcode. -pub const DEFAULT_CONTROL_FLOW_CALL_OPCODE: u32 = 140_000; +pub const DEFAULT_CONTROL_FLOW_CALL_OPCODE: u32 = 68_000; /// Default cost of the `call_indirect` Wasm opcode. -pub const DEFAULT_CONTROL_FLOW_CALL_INDIRECT_OPCODE: u32 = 140_000; +pub const DEFAULT_CONTROL_FLOW_CALL_INDIRECT_OPCODE: u32 = 68_000; /// Default cost of the `drop` Wasm opcode. pub const DEFAULT_CONTROL_FLOW_DROP_OPCODE: u32 = 440; /// Default fixed cost of the `br_table` Wasm opcode. -pub const DEFAULT_CONTROL_FLOW_BR_TABLE_OPCODE: u32 = 440_000; +pub const DEFAULT_CONTROL_FLOW_BR_TABLE_OPCODE: u32 = 35_000; /// Default multiplier for the size of targets in `br_table` Wasm opcode. pub const DEFAULT_CONTROL_FLOW_BR_TABLE_MULTIPLIER: u32 = 100; diff --git a/resources/local/chainspec.toml.in b/resources/local/chainspec.toml.in index e45a01e62b..74df5ebbeb 100644 --- a/resources/local/chainspec.toml.in +++ b/resources/local/chainspec.toml.in @@ -183,17 +183,17 @@ loop = 440 if = 440 else = 440 end = 440 -br = 440_000 -br_if = 440_000 +br = 35_000 +br_if = 35_000 return = 440 select = 440 -call = 140_000 -call_indirect = 140_000 +call = 68_000 +call_indirect = 68_000 drop = 440 [wasm.opcode_costs.control_flow.br_table] # Fixed cost per `br_table` opcode -cost = 440_000 +cost = 35_000 # Size of target labels in the `br_table` opcode will be multiplied by `size_multiplier` size_multiplier = 100 diff --git a/resources/production/chainspec.toml b/resources/production/chainspec.toml index eaa9661aee..4c53f0189d 100644 --- a/resources/production/chainspec.toml +++ b/resources/production/chainspec.toml @@ -29,7 +29,7 @@ era_duration = '120 minutes' # minimum height. minimum_era_height = 20 # Minimum difference between a block's and its child's timestamp. -minimum_block_time = '32768 ms' +minimum_block_time = '16384 ms' # Number of slots available in validator auction. validator_slots = 100 # A number between 0 and 1 representing the fault tolerance threshold as a fraction, used by the internal finalizer. @@ -135,7 +135,7 @@ block_max_transfer_count = 1250 # The maximum number of approvals permitted in a single block. block_max_approval_count = 2600 # The upper limit of total gas of all deploys in a block. -block_gas_limit = 10_000_000_000_000 +block_gas_limit = 4_000_000_000_000 # The limit of length of serialized payment code arguments. payment_args_max_length = 1024 # The limit of length of serialized session code arguments. @@ -194,17 +194,17 @@ loop = 440 if = 440 else = 440 end = 440 -br = 440_000 -br_if = 440_000 +br = 35_000 +br_if = 35_000 return = 440 select = 440 -call = 140_000 -call_indirect = 140_000 +call = 68_000 +call_indirect = 68_000 drop = 440 [wasm.opcode_costs.control_flow.br_table] # Fixed cost per `br_table` opcode -cost = 440_000 +cost = 35_000 # Size of target labels in the `br_table` opcode will be multiplied by `size_multiplier` size_multiplier = 100