diff --git a/core/parameters/res/runtime_configs/61.yaml b/core/parameters/res/runtime_configs/61.yaml index a7224cca644..c5ea6782e0f 100644 --- a/core/parameters/res/runtime_configs/61.yaml +++ b/core/parameters/res/runtime_configs/61.yaml @@ -1,8 +1,9 @@ # Compute costs to allow for flat storage read-only MVP. # See https://github.com/near/nearcore/issues/8006 -wasm_touching_trie_node: { old: 16_101_955_926, new: { gas: 16_101_955_926, compute: 110_000_000_000 } } -wasm_storage_write_base: { old: 64_196_736_000, new: { gas: 64_196_736_000, compute: 200_000_000_000 } } -wasm_storage_remove_base: { old: 53_473_030_500, new: { gas: 53_473_030_500, compute: 200_000_000_000 } } -wasm_storage_read_base: { old: 56_356_845_750, new: { gas: 56_356_845_750, compute: 200_000_000_000 } } -wasm_storage_has_key_base: { old: 54_039_896_625, new: { gas: 54_039_896_625, compute: 200_000_000_000 } } -flat_storage_reads: { old: false, new: true } +wasm_touching_trie_node: { old: 16_101_955_926, new: { gas: 16_101_955_926, compute: 110_000_000_000 } } +wasm_storage_write_base: { old: 64_196_736_000, new: { gas: 64_196_736_000, compute: 200_000_000_000 } } +wasm_storage_remove_base: { old: 53_473_030_500, new: { gas: 53_473_030_500, compute: 200_000_000_000 } } +wasm_storage_read_base: { old: 56_356_845_750, new: { gas: 56_356_845_750, compute: 200_000_000_000 } } +wasm_storage_small_read_base: { old: 56_356_845_750, new: { gas: 56_356_845_750, compute: 200_000_000_000 } } +wasm_storage_has_key_base: { old: 54_039_896_625, new: { gas: 54_039_896_625, compute: 200_000_000_000 } } +flat_storage_reads: { old: false, new: true } diff --git a/core/parameters/res/runtime_configs/72.yaml b/core/parameters/res/runtime_configs/72.yaml index faac9c28577..cbd0b656e53 100644 --- a/core/parameters/res/runtime_configs/72.yaml +++ b/core/parameters/res/runtime_configs/72.yaml @@ -1 +1,7 @@ -main_storage_proof_size_soft_limit: {old: 3_000_000, new: 4_000_000} \ No newline at end of file +main_storage_proof_size_soft_limit: {old: 3_000_000, new: 4_000_000} +wasm_storage_has_key_base: { old: { gas: 54_039_896_625, compute: 200_000_000_000 }, new: { gas: 54_039_896_625, compute: 8_000_000_000 } } +wasm_storage_has_key_byte: { old: 30_790_845, new: { gas: 30_790_845, compute: 9_000_000 } } +wasm_storage_small_read_base: { old: { gas: 56_356_845_750, compute: 200_000_000_000 }, new: { gas: 56_356_845_750, compute: 159_000_000_000 } } +wasm_storage_small_read_key_byte: { old: 30_952_533, new: { gas: 30_952_533, compute: 10_000_000 } } +wasm_storage_small_read_value_byte: { old: 5_611_005, new: { gas: 5_611_005, compute: 2_500_000 } } +wasm_touching_trie_node: { old: { gas: 16_101_955_926, compute: 110_000_000_000 }, new: { gas: 16_101_955_926, compute: 20_000_000_000 } } diff --git a/core/parameters/res/runtime_configs/parameters.snap b/core/parameters/res/runtime_configs/parameters.snap index 719340de34a..75089050db3 100644 --- a/core/parameters/res/runtime_configs/parameters.snap +++ b/core/parameters/res/runtime_configs/parameters.snap @@ -116,11 +116,14 @@ wasm_storage_write_evicted_byte 32_117_307 wasm_storage_read_base 56_356_845_750, compute: 200_000_000_000 wasm_storage_read_key_byte 30_952_533 wasm_storage_read_value_byte 5_611_005 +wasm_storage_small_read_base 56_356_845_750, compute: 159_000_000_000 +wasm_storage_small_read_key_byte 30_952_533, compute: 10_000_000 +wasm_storage_small_read_value_byte 5_611_005, compute: 2_500_000 wasm_storage_remove_base 53_473_030_500, compute: 200_000_000_000 wasm_storage_remove_key_byte 38_220_384 wasm_storage_remove_ret_value_byte 11_531_556 -wasm_storage_has_key_base 54_039_896_625, compute: 200_000_000_000 -wasm_storage_has_key_byte 30_790_845 +wasm_storage_has_key_base 54_039_896_625, compute: 8_000_000_000 +wasm_storage_has_key_byte 30_790_845, compute: 9_000_000 wasm_storage_iter_create_prefix_base 0 wasm_storage_iter_create_prefix_byte 0 wasm_storage_iter_create_range_base 0 @@ -129,7 +132,7 @@ wasm_storage_iter_create_to_byte 0 wasm_storage_iter_next_base 0 wasm_storage_iter_next_key_byte 0 wasm_storage_iter_next_value_byte 0 -wasm_touching_trie_node 16_101_955_926, compute: 110_000_000_000 +wasm_touching_trie_node 16_101_955_926, compute: 20_000_000_000 wasm_read_cached_trie_node 2_280_000_000 wasm_promise_and_base 1_465_013_400 wasm_promise_and_per_promise 5_452_176 diff --git a/core/parameters/res/runtime_configs/parameters.yaml b/core/parameters/res/runtime_configs/parameters.yaml index 0f005066eaf..4da71cd7a3d 100644 --- a/core/parameters/res/runtime_configs/parameters.yaml +++ b/core/parameters/res/runtime_configs/parameters.yaml @@ -152,6 +152,9 @@ wasm_storage_write_evicted_byte: 32_117_307 wasm_storage_read_base: 56_356_845_750 wasm_storage_read_key_byte: 30_952_533 wasm_storage_read_value_byte: 5_611_005 +wasm_storage_small_read_base: 56_356_845_750 +wasm_storage_small_read_key_byte: 30_952_533 +wasm_storage_small_read_value_byte: 5_611_005 wasm_storage_remove_base: 53_473_030_500 wasm_storage_remove_key_byte: 38_220_384 wasm_storage_remove_ret_value_byte: 11_531_556 diff --git a/core/parameters/res/runtime_configs/parameters_testnet.yaml b/core/parameters/res/runtime_configs/parameters_testnet.yaml index 7ff426ac24d..dc5a2418eda 100644 --- a/core/parameters/res/runtime_configs/parameters_testnet.yaml +++ b/core/parameters/res/runtime_configs/parameters_testnet.yaml @@ -149,6 +149,9 @@ wasm_storage_write_evicted_byte: 32_117_307 wasm_storage_read_base: 56_356_845_750 wasm_storage_read_key_byte: 30_952_533 wasm_storage_read_value_byte: 5_611_005 +wasm_storage_small_read_base: 56_356_845_750 +wasm_storage_small_read_key_byte: 30_952_533 +wasm_storage_small_read_value_byte: 5_611_005 wasm_storage_remove_base: 53_473_030_500 wasm_storage_remove_key_byte: 38_220_384 wasm_storage_remove_ret_value_byte: 11_531_556 diff --git a/core/parameters/src/cost.rs b/core/parameters/src/cost.rs index d978b8aa239..5ead3c51bf0 100644 --- a/core/parameters/src/cost.rs +++ b/core/parameters/src/cost.rs @@ -103,6 +103,9 @@ impl ExtCostsConfig { ExtCosts::storage_read_base => SAFETY_MULTIPLIER * 18785615250, ExtCosts::storage_read_key_byte => SAFETY_MULTIPLIER * 10317511, ExtCosts::storage_read_value_byte => SAFETY_MULTIPLIER * 1870335, + ExtCosts::storage_small_read_base => SAFETY_MULTIPLIER * 18785615250, + ExtCosts::storage_small_read_key_byte => SAFETY_MULTIPLIER * 10317511, + ExtCosts::storage_small_read_value_byte => SAFETY_MULTIPLIER * 1870335, ExtCosts::storage_remove_base => SAFETY_MULTIPLIER * 17824343500, ExtCosts::storage_remove_key_byte => SAFETY_MULTIPLIER * 12740128, ExtCosts::storage_remove_ret_value_byte => SAFETY_MULTIPLIER * 3843852, @@ -268,6 +271,9 @@ pub enum ExtCosts { bls12381_p1_decompress_element = 80, bls12381_p2_decompress_base = 81, bls12381_p2_decompress_element = 82, + storage_small_read_base = 83, + storage_small_read_key_byte = 84, + storage_small_read_value_byte = 85, } // Type of an action, used in fees logic. @@ -351,6 +357,9 @@ impl ExtCosts { ExtCosts::storage_read_base => Parameter::WasmStorageReadBase, ExtCosts::storage_read_key_byte => Parameter::WasmStorageReadKeyByte, ExtCosts::storage_read_value_byte => Parameter::WasmStorageReadValueByte, + ExtCosts::storage_small_read_base => Parameter::WasmStorageSmallReadBase, + ExtCosts::storage_small_read_key_byte => Parameter::WasmStorageSmallReadKeyByte, + ExtCosts::storage_small_read_value_byte => Parameter::WasmStorageSmallReadValueByte, ExtCosts::storage_remove_base => Parameter::WasmStorageRemoveBase, ExtCosts::storage_remove_key_byte => Parameter::WasmStorageRemoveKeyByte, ExtCosts::storage_remove_ret_value_byte => Parameter::WasmStorageRemoveRetValueByte, diff --git a/core/parameters/src/parameter.rs b/core/parameters/src/parameter.rs index ee8e75f5e69..7a866df2bd7 100644 --- a/core/parameters/src/parameter.rs +++ b/core/parameters/src/parameter.rs @@ -110,6 +110,9 @@ pub enum Parameter { WasmStorageReadBase, WasmStorageReadKeyByte, WasmStorageReadValueByte, + WasmStorageSmallReadBase, + WasmStorageSmallReadKeyByte, + WasmStorageSmallReadValueByte, WasmStorageRemoveBase, WasmStorageRemoveKeyByte, WasmStorageRemoveRetValueByte, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__0.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__0.json.snap index ae8e3f1099d..5827353ac84 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__0.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__0.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__129.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__129.json.snap index 46da61afc6f..53b46438501 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__129.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__129.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__35.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__35.json.snap index 30ac71b5126..bd72fc652ec 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__35.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__35.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__42.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__42.json.snap index a8d4c2b762a..07fa051a97d 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__42.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__42.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__46.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__46.json.snap index e822762d150..411160f0674 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__46.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__46.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__48.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__48.json.snap index 15fbe27adc7..0df099f3aeb 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__48.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__48.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__49.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__49.json.snap index bcdba46a9b9..01b4a29a69c 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__49.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__49.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__50.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__50.json.snap index eab9620755f..b359e3c2ded 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__50.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__50.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__52.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__52.json.snap index da7e74cc7d6..1b4719e0875 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__52.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__52.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__53.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__53.json.snap index a21b3335e5e..1d7f004ad39 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__53.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__53.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__55.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__55.json.snap index 5d8d299d487..13a5d8d191e 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__55.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__55.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__57.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__57.json.snap index dd0f2648544..1449866c077 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__57.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__57.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__59.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__59.json.snap index ccbe1dcbaf4..60c4af100e6 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__59.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__59.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__61.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__61.json.snap index 28f332e587d..70576f59832 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__61.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__61.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__62.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__62.json.snap index 9548d786a25..1ed7569955f 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__62.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__62.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__63.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__63.json.snap index 9ef63c04c38..a6d8048495d 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__63.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__63.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__64.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__64.json.snap index 3d2d6808f2e..e9b67c577e8 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__64.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__64.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__66.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__66.json.snap index 4cc699faaa4..18f7d0d093d 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__66.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__66.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__67.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__67.json.snap index d1cc888a825..05cbd9addf7 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__67.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__67.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__68.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__68.json.snap index dc6e882bea1..a9ab15d123d 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__68.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__68.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__69.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__69.json.snap index 92e3ec59091..e7c5f1a44a2 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__69.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__69.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__70.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__70.json.snap index 2bfdd31fc33..ebb75c067f2 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__70.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__70.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__72.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__72.json.snap index c0d17309a78..deff718d2c4 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__72.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__72.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_0.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_0.json.snap index ae8e3f1099d..5827353ac84 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_0.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_0.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_129.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_129.json.snap index 46da61afc6f..53b46438501 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_129.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_129.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_35.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_35.json.snap index 30ac71b5126..bd72fc652ec 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_35.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_35.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_42.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_42.json.snap index a8d4c2b762a..07fa051a97d 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_42.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_42.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_46.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_46.json.snap index e822762d150..411160f0674 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_46.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_46.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_48.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_48.json.snap index 15fbe27adc7..0df099f3aeb 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_48.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_48.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_49.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_49.json.snap index bcdba46a9b9..01b4a29a69c 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_49.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_49.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_50.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_50.json.snap index eab9620755f..b359e3c2ded 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_50.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_50.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_52.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_52.json.snap index da7e74cc7d6..1b4719e0875 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_52.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_52.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_53.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_53.json.snap index a21b3335e5e..1d7f004ad39 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_53.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_53.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_55.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_55.json.snap index 5d8d299d487..13a5d8d191e 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_55.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_55.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_57.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_57.json.snap index dd0f2648544..1449866c077 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_57.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_57.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_59.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_59.json.snap index ccbe1dcbaf4..60c4af100e6 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_59.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_59.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_61.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_61.json.snap index 28f332e587d..70576f59832 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_61.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_61.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_62.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_62.json.snap index 9548d786a25..1ed7569955f 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_62.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_62.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_63.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_63.json.snap index 9ef63c04c38..a6d8048495d 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_63.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_63.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_64.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_64.json.snap index 3d2d6808f2e..e9b67c577e8 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_64.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_64.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_66.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_66.json.snap index 4cc699faaa4..18f7d0d093d 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_66.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_66.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_67.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_67.json.snap index d1cc888a825..05cbd9addf7 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_67.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_67.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_68.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_68.json.snap index dc6e882bea1..a9ab15d123d 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_68.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_68.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_69.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_69.json.snap index 92e3ec59091..e7c5f1a44a2 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_69.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_69.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_70.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_70.json.snap index 2bfdd31fc33..ebb75c067f2 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_70.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_70.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_72.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_72.json.snap index c0d17309a78..deff718d2c4 100644 --- a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_72.json.snap +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_72.json.snap @@ -141,6 +141,9 @@ expression: config_view "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/snapshots/near_parameters__view__tests__runtime_config_view.snap b/core/parameters/src/snapshots/near_parameters__view__tests__runtime_config_view.snap index 1fef56087b2..5e2c41b451e 100644 --- a/core/parameters/src/snapshots/near_parameters__view__tests__runtime_config_view.snap +++ b/core/parameters/src/snapshots/near_parameters__view__tests__runtime_config_view.snap @@ -141,6 +141,9 @@ expression: "&view" "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/parameters/src/view.rs b/core/parameters/src/view.rs index 3c1ffd812a2..0b4db0966fa 100644 --- a/core/parameters/src/view.rs +++ b/core/parameters/src/view.rs @@ -383,6 +383,13 @@ pub struct ExtCostsConfigView { /// Storage trie read value cost per byte cost pub storage_read_value_byte: Gas, + /// Storage trie read key base cost, when doing small reads + pub storage_small_read_base: Gas, + /// Storage trie read key per byte cost, when doing small reads + pub storage_small_read_key_byte: Gas, + /// Storage trie read value cost per byte cost, when doing small reads + pub storage_small_read_value_byte: Gas, + /// Remove key from trie base cost pub storage_remove_base: Gas, /// Remove key from trie per byte cost @@ -522,6 +529,9 @@ impl From for ExtCostsConfigView { storage_read_base: config.gas_cost(ExtCosts::storage_read_base), storage_read_key_byte: config.gas_cost(ExtCosts::storage_read_key_byte), storage_read_value_byte: config.gas_cost(ExtCosts::storage_read_value_byte), + storage_small_read_base: config.gas_cost(ExtCosts::storage_small_read_base), + storage_small_read_key_byte: config.gas_cost(ExtCosts::storage_small_read_key_byte), + storage_small_read_value_byte: config.gas_cost(ExtCosts::storage_small_read_value_byte), storage_remove_base: config.gas_cost(ExtCosts::storage_remove_base), storage_remove_key_byte: config.gas_cost(ExtCosts::storage_remove_key_byte), storage_remove_ret_value_byte: config.gas_cost(ExtCosts::storage_remove_ret_value_byte), @@ -622,6 +632,9 @@ impl From for crate::ExtCostsConfig { ExtCosts::storage_read_base => view.storage_read_base, ExtCosts::storage_read_key_byte => view.storage_read_key_byte, ExtCosts::storage_read_value_byte => view.storage_read_value_byte, + ExtCosts::storage_small_read_base => view.storage_small_read_base, + ExtCosts::storage_small_read_key_byte => view.storage_small_read_key_byte, + ExtCosts::storage_small_read_value_byte => view.storage_small_read_value_byte, ExtCosts::storage_remove_base => view.storage_remove_base, ExtCosts::storage_remove_key_byte => view.storage_remove_key_byte, ExtCosts::storage_remove_ret_value_byte => view.storage_remove_ret_value_byte, diff --git a/core/primitives-core/src/config.rs b/core/primitives-core/src/config.rs index 70b3dd8c436..7f912d2af7d 100644 --- a/core/primitives-core/src/config.rs +++ b/core/primitives-core/src/config.rs @@ -1,6 +1,18 @@ use crate::types::Gas; use std::hash::Hash; +/// Defines value size threshold for flat state inlining. +/// It means that values having size greater than the threshold will be stored +/// in FlatState as `FlatStateValue::Ref`, otherwise the whole value will be +/// stored as `FlatStateValue::Inlined`. +/// See the following comment for reasoning behind the threshold value: +/// +/// +/// Note that this value then propagates to memtrie, and then to the "small read" +/// costs. As such, changing it is a protocol change, and it should be turned +/// into a protocol parameter if we ever want to change it. +pub const INLINE_DISK_VALUE_THRESHOLD: usize = 4000; + #[derive( Debug, Clone, diff --git a/core/primitives/src/profile_data_v3.rs b/core/primitives/src/profile_data_v3.rs index 0a24f1481d2..7da25f45e12 100644 --- a/core/primitives/src/profile_data_v3.rs +++ b/core/primitives/src/profile_data_v3.rs @@ -281,8 +281,8 @@ mod test { storage_read_value_byte -> 32 [0% host] storage_remove_base -> 33 [0% host] storage_remove_key_byte -> 34 [0% host] - storage_remove_ret_value_byte -> 35 [1% host] - storage_has_key_base -> 36 [1% host] + storage_remove_ret_value_byte -> 35 [0% host] + storage_has_key_base -> 36 [0% host] storage_has_key_byte -> 37 [1% host] storage_iter_create_prefix_base -> 38 [1% host] storage_iter_create_prefix_byte -> 39 [1% host] @@ -315,11 +315,11 @@ mod test { bls12381_p1_sum_element -> 66 [1% host] bls12381_p2_sum_base -> 67 [1% host] bls12381_p2_sum_element -> 68 [1% host] - bls12381_g1_multiexp_base -> 69 [2% host] - bls12381_g1_multiexp_element -> 70 [2% host] - bls12381_g2_multiexp_base -> 71 [2% host] - bls12381_g2_multiexp_element -> 72 [2% host] - bls12381_map_fp_to_g1_base -> 73 [2% host] + bls12381_g1_multiexp_base -> 69 [1% host] + bls12381_g1_multiexp_element -> 70 [1% host] + bls12381_g2_multiexp_base -> 71 [1% host] + bls12381_g2_multiexp_element -> 72 [1% host] + bls12381_map_fp_to_g1_base -> 73 [1% host] bls12381_map_fp_to_g1_element -> 74 [2% host] bls12381_map_fp2_to_g2_base -> 75 [2% host] bls12381_map_fp2_to_g2_element -> 76 [2% host] @@ -329,6 +329,9 @@ mod test { bls12381_p1_decompress_element -> 80 [2% host] bls12381_p2_decompress_base -> 81 [2% host] bls12381_p2_decompress_element -> 82 [2% host] + storage_small_read_base -> 83 [2% host] + storage_small_read_key_byte -> 84 [2% host] + storage_small_read_value_byte -> 85 [2% host] ------ Actions -------- create_account -> 1000 delete_account -> 1001 diff --git a/core/primitives/src/snapshots/near_primitives__views__tests__exec_metadata_v2_view.snap b/core/primitives/src/snapshots/near_primitives__views__tests__exec_metadata_v2_view.snap index ad149766e52..4c599678bd6 100644 --- a/core/primitives/src/snapshots/near_primitives__views__tests__exec_metadata_v2_view.snap +++ b/core/primitives/src/snapshots/near_primitives__views__tests__exec_metadata_v2_view.snap @@ -375,6 +375,21 @@ expression: view "cost": "STORAGE_REMOVE_RET_VALUE_BYTE", "gas_used": "35" }, + { + "cost_category": "WASM_HOST_COST", + "cost": "STORAGE_SMALL_READ_BASE", + "gas_used": "0" + }, + { + "cost_category": "WASM_HOST_COST", + "cost": "STORAGE_SMALL_READ_KEY_BYTE", + "gas_used": "0" + }, + { + "cost_category": "WASM_HOST_COST", + "cost": "STORAGE_SMALL_READ_VALUE_BYTE", + "gas_used": "0" + }, { "cost_category": "WASM_HOST_COST", "cost": "STORAGE_WRITE_BASE", diff --git a/core/primitives/src/snapshots/near_primitives__views__tests__exec_metadata_v3_view.snap b/core/primitives/src/snapshots/near_primitives__views__tests__exec_metadata_v3_view.snap index 92e7728152d..2c0100ff3a0 100644 --- a/core/primitives/src/snapshots/near_primitives__views__tests__exec_metadata_v3_view.snap +++ b/core/primitives/src/snapshots/near_primitives__views__tests__exec_metadata_v3_view.snap @@ -400,6 +400,21 @@ expression: view "cost": "STORAGE_REMOVE_RET_VALUE_BYTE", "gas_used": "35" }, + { + "cost_category": "WASM_HOST_COST", + "cost": "STORAGE_SMALL_READ_BASE", + "gas_used": "83" + }, + { + "cost_category": "WASM_HOST_COST", + "cost": "STORAGE_SMALL_READ_KEY_BYTE", + "gas_used": "84" + }, + { + "cost_category": "WASM_HOST_COST", + "cost": "STORAGE_SMALL_READ_VALUE_BYTE", + "gas_used": "85" + }, { "cost_category": "WASM_HOST_COST", "cost": "STORAGE_WRITE_BASE", diff --git a/core/primitives/src/snapshots/near_primitives__views__tests__runtime_config_view.snap b/core/primitives/src/snapshots/near_primitives__views__tests__runtime_config_view.snap index 4025dc7b128..c44c8bc5c9e 100644 --- a/core/primitives/src/snapshots/near_primitives__views__tests__runtime_config_view.snap +++ b/core/primitives/src/snapshots/near_primitives__views__tests__runtime_config_view.snap @@ -141,6 +141,9 @@ expression: "&view" "storage_read_base": 56356845750, "storage_read_key_byte": 30952533, "storage_read_value_byte": 5611005, + "storage_small_read_base": 56356845750, + "storage_small_read_key_byte": 30952533, + "storage_small_read_value_byte": 5611005, "storage_remove_base": 53473030500, "storage_remove_key_byte": 38220384, "storage_remove_ret_value_byte": 11531556, diff --git a/core/primitives/src/state.rs b/core/primitives/src/state.rs index 78d4bf01c1b..dcfd030e07e 100644 --- a/core/primitives/src/state.rs +++ b/core/primitives/src/state.rs @@ -70,13 +70,8 @@ pub enum FlatStateValue { } impl FlatStateValue { - /// Defines value size threshold for flat state inlining. - /// It means that values having size greater than the threshold will be stored - /// in FlatState as `FlatStateValue::Ref`, otherwise the whole value will be - /// stored as `FlatStateValue::Inlined`. - /// See the following comment for reasoning behind the threshold value: - /// - pub const INLINE_DISK_VALUE_THRESHOLD: usize = 4000; + pub const INLINE_DISK_VALUE_THRESHOLD: usize = + near_primitives_core::config::INLINE_DISK_VALUE_THRESHOLD; pub fn on_disk(value: &[u8]) -> Self { if value.len() <= Self::INLINE_DISK_VALUE_THRESHOLD { diff --git a/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap b/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap index 57731f93f9c..1eb16dea9f2 100644 --- a/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap +++ b/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap @@ -196,33 +196,33 @@ expression: receipts_gas_profile }, CostGasUsed { cost_category: "WASM_HOST_COST", - cost: "STORAGE_READ_BASE", - gas_used: 112713691500, + cost: "STORAGE_REMOVE_BASE", + gas_used: 106946061000, }, CostGasUsed { cost_category: "WASM_HOST_COST", - cost: "STORAGE_READ_KEY_BYTE", - gas_used: 278572797, + cost: "STORAGE_REMOVE_KEY_BYTE", + gas_used: 343983456, }, CostGasUsed { cost_category: "WASM_HOST_COST", - cost: "STORAGE_READ_VALUE_BYTE", - gas_used: 28055025, + cost: "STORAGE_REMOVE_RET_VALUE_BYTE", + gas_used: 57657780, }, CostGasUsed { cost_category: "WASM_HOST_COST", - cost: "STORAGE_REMOVE_BASE", - gas_used: 106946061000, + cost: "STORAGE_SMALL_READ_BASE", + gas_used: 56356845750, }, CostGasUsed { cost_category: "WASM_HOST_COST", - cost: "STORAGE_REMOVE_KEY_BYTE", - gas_used: 343983456, + cost: "STORAGE_SMALL_READ_KEY_BYTE", + gas_used: 61905066, }, CostGasUsed { cost_category: "WASM_HOST_COST", - cost: "STORAGE_REMOVE_RET_VALUE_BYTE", - gas_used: 57657780, + cost: "STORAGE_SMALL_READ_VALUE_BYTE", + gas_used: 28055025, }, CostGasUsed { cost_category: "WASM_HOST_COST", diff --git a/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile_nightly.snap b/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile_nightly.snap index 57731f93f9c..1eb16dea9f2 100644 --- a/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile_nightly.snap +++ b/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile_nightly.snap @@ -196,33 +196,33 @@ expression: receipts_gas_profile }, CostGasUsed { cost_category: "WASM_HOST_COST", - cost: "STORAGE_READ_BASE", - gas_used: 112713691500, + cost: "STORAGE_REMOVE_BASE", + gas_used: 106946061000, }, CostGasUsed { cost_category: "WASM_HOST_COST", - cost: "STORAGE_READ_KEY_BYTE", - gas_used: 278572797, + cost: "STORAGE_REMOVE_KEY_BYTE", + gas_used: 343983456, }, CostGasUsed { cost_category: "WASM_HOST_COST", - cost: "STORAGE_READ_VALUE_BYTE", - gas_used: 28055025, + cost: "STORAGE_REMOVE_RET_VALUE_BYTE", + gas_used: 57657780, }, CostGasUsed { cost_category: "WASM_HOST_COST", - cost: "STORAGE_REMOVE_BASE", - gas_used: 106946061000, + cost: "STORAGE_SMALL_READ_BASE", + gas_used: 56356845750, }, CostGasUsed { cost_category: "WASM_HOST_COST", - cost: "STORAGE_REMOVE_KEY_BYTE", - gas_used: 343983456, + cost: "STORAGE_SMALL_READ_KEY_BYTE", + gas_used: 61905066, }, CostGasUsed { cost_category: "WASM_HOST_COST", - cost: "STORAGE_REMOVE_RET_VALUE_BYTE", - gas_used: 57657780, + cost: "STORAGE_SMALL_READ_VALUE_BYTE", + gas_used: 28055025, }, CostGasUsed { cost_category: "WASM_HOST_COST", diff --git a/runtime/near-test-contracts/estimator-contract/src/lib.rs b/runtime/near-test-contracts/estimator-contract/src/lib.rs index a1ec33bbb17..7ebb2a2e9ea 100644 --- a/runtime/near-test-contracts/estimator-contract/src/lib.rs +++ b/runtime/near-test-contracts/estimator-contract/src/lib.rs @@ -1039,66 +1039,60 @@ storage_bench!(key, 10, value, 10240, 1000, storage_write_10b_key_10kib_value_1k storage_write(10, key.as_ptr() as _, 10240, value.as_ptr() as _, 0); }); +// Function to measure `storage_write_base + storage_write_value_byte`. +// Writes to storage with 100kib value 1000 times. +storage_bench!(key, 10, value, 102400, 1000, storage_write_10b_key_100kib_value_1k, { + storage_write(10, key.as_ptr() as _, 102400, value.as_ptr() as _, 0); +}); + +// Function to measure `storage_write_base + storage_write_key_byte`. +// Writes to storage with 10kib key and 10kib value 1000 times. +storage_bench!(key, 10240, value, 10240, 1000, storage_write_10kib_key_10kib_value_1k, { + storage_write(10240, key.as_ptr() as _, 10240, value.as_ptr() as _, 0); +}); + // Storage reading. // Function to measure `storage_read_base`. -// Writes to storage 1k times. -storage_bench!(key, 10, value, 10, 1000, storage_read_10b_key_10b_value_1k, { +// Reads from storage 1k times. +storage_bench!(key, 10, value, 10, 1000, storage_read_10b_key_1k, { storage_read(10, key.as_ptr() as _, 0); }); // Function to measure `storage_read_base + storage_read_key_byte`. -// Writes to storage with 10kib key 1000 times. -storage_bench!(key, 10240, value, 10, 1000, storage_read_10kib_key_10b_value_1k, { +// Reads from storage with 10kib key 1000 times. +storage_bench!(key, 10240, value, 10, 1000, storage_read_10kib_key_1k, { storage_read(10240, key.as_ptr() as _, 0); }); -// Function to measure `storage_read_base + storage_read_value_byte`. -// Writes to storage with 10kib value 1000 times. -storage_bench!(key, 10, value, 10240, 1000, storage_read_10b_key_10kib_value_1k, { - storage_read(10, key.as_ptr() as _, 0); -}); - // Storage removing. // Function to measure `storage_remove_base`. // Writes to storage 1k times. -storage_bench!(key, 10, value, 10, 1000, storage_remove_10b_key_10b_value_1k, { +storage_bench!(key, 10, value, 10, 1000, storage_remove_10b_key_1k, { storage_remove(10, key.as_ptr() as _, 0); }); // Function to measure `storage_remove_base + storage_remove_key_byte`. // Writes to storage with 10kib key 1000 times. -storage_bench!(key, 10240, value, 10, 1000, storage_remove_10kib_key_10b_value_1k, { +storage_bench!(key, 10240, value, 10, 1000, storage_remove_10kib_key_1k, { storage_remove(10240, key.as_ptr() as _, 0); }); -// Function to measure `storage_remove_base + storage_remove_value_byte`. -// Writes to storage with 10kib value 1000 times. -storage_bench!(key, 10, value, 10240, 1000, storage_remove_10b_key_10kib_value_1k, { - storage_remove(10, key.as_ptr() as _, 0); -}); - // Storage has key. // Function to measure `storage_has_key_base`. -// Writes to storage 1k times. -storage_bench!(key, 10, value, 10, 1000, storage_has_key_10b_key_10b_value_1k, { +// Checks from storage 1k times. +storage_bench!(key, 10, value, 10, 1000, storage_has_key_10b_key_1k, { storage_has_key(10, key.as_ptr() as _); }); // Function to measure `storage_has_key_base + storage_has_key_key_byte`. -// Writes to storage with 10kib key 1000 times. -storage_bench!(key, 10240, value, 10, 1000, storage_has_key_10kib_key_10b_value_1k, { +// Checks from storage with 10kib key 1000 times. +storage_bench!(key, 10240, value, 10, 1000, storage_has_key_10kib_key_1k, { storage_has_key(10240, key.as_ptr() as _); }); -// Function to measure `storage_has_key_base + storage_has_key_value_byte`. -// Writes to storage with 10kib value 1000 times. -storage_bench!(key, 10, value, 10240, 1000, storage_has_key_10b_key_10kib_value_1k, { - storage_has_key(10, key.as_ptr() as _); -}); - // Function to measure `promise_and_base`. #[no_mangle] pub unsafe fn promise_and_100k() { diff --git a/runtime/near-vm-runner/src/logic/gas_counter.rs b/runtime/near-vm-runner/src/logic/gas_counter.rs index f11ef3b859e..b16d676afea 100644 --- a/runtime/near-vm-runner/src/logic/gas_counter.rs +++ b/runtime/near-vm-runner/src/logic/gas_counter.rs @@ -116,15 +116,18 @@ impl GasCounter { } } - /// Simpler version of `deduct_gas()` for when no promises are involved. + /// Checks whether the current contract execution is allowed to burn this much new gas. /// - /// Return an error if there are arithmetic overflows. - pub(crate) fn burn_gas(&mut self, gas_burnt: Gas) -> Result<()> { - let new_burnt_gas = - self.fast_counter.burnt_gas.checked_add(gas_burnt).ok_or(HostError::IntegerOverflow)?; + /// If yes, returns the total amount of gas that would have been burnt if this amount of gas + /// were burnt. + pub(crate) fn can_burn_gas(&mut self, gas_to_be_burnt: Gas) -> Result { + let new_burnt_gas = self + .fast_counter + .burnt_gas + .checked_add(gas_to_be_burnt) + .ok_or(HostError::IntegerOverflow)?; if new_burnt_gas <= self.fast_counter.gas_limit { - self.fast_counter.burnt_gas = new_burnt_gas; - Ok(()) + Ok(new_burnt_gas) } else { // In the past `new_used_gas` would be computed using an implicit wrapping addition, // which would then give an opportunity for the `assert` (now `debug_assert`) in the @@ -138,6 +141,14 @@ impl GasCounter { } } + /// Simpler version of `deduct_gas()` for when no promises are involved. + /// + /// Return an error if there are arithmetic overflows. + pub(crate) fn burn_gas(&mut self, gas_burnt: Gas) -> Result<()> { + self.fast_counter.burnt_gas = self.can_burn_gas(gas_burnt)?; + Ok(()) + } + pub(crate) fn process_gas_limit(&mut self, new_burnt_gas: Gas, new_used_gas: Gas) -> HostError { use std::cmp::min; // Never burn more gas than what was paid for. diff --git a/runtime/near-vm-runner/src/logic/logic.rs b/runtime/near-vm-runner/src/logic/logic.rs index 09ddffa74e4..054f00f8027 100644 --- a/runtime/near-vm-runner/src/logic/logic.rs +++ b/runtime/near-vm-runner/src/logic/logic.rs @@ -14,6 +14,7 @@ use near_parameters::vm::{Config, StorageGetMode}; use near_parameters::{ transfer_exec_fee, transfer_send_fee, ActionCosts, ExtCosts, RuntimeFeesConfig, }; +use near_primitives_core::config::INLINE_DISK_VALUE_THRESHOLD; use near_primitives_core::hash::CryptoHash; use near_primitives_core::types::{ AccountId, Balance, Compute, EpochHeight, Gas, GasWeight, StorageUsage, @@ -3157,7 +3158,17 @@ bls12381_p2_decompress_base + bls12381_p2_decompress_element * num_elements` /// cost to read key from register + cost to write value into register`. pub fn storage_read(&mut self, key_len: u64, key_ptr: u64, register_id: u64) -> Result { self.result_state.gas_counter.pay_base(base)?; - self.result_state.gas_counter.pay_base(storage_read_base)?; + // Note: this host function charges the costs only after performing the work. In order to + // not be vulnerable to the various issues that could arise from that, this function does + // check that there is at least enough gas available for the "small" reads before performing + // the reads. And if there is enough gas for small reads but not large reads, the read + // should be interrupted before going down to disk, so there would not be undercharging. + // + // Make sure that we do have enough gas for the "small" reads at least, at the same place + // as we originally did. We will charge the actual gas at the end when we know to which + // cost type we should charge it. + let gas_to_be_burnt = storage_small_read_base.gas(&self.result_state.config.ext_costs); + self.result_state.gas_counter.can_burn_gas(gas_to_be_burnt)?; let key = get_memory_or_register!(self, key_ptr, key_len)?; if key.len() as u64 > self.config.limit_config.max_length_storage_key { return Err(HostError::KeyLengthExceeded { @@ -3166,7 +3177,12 @@ bls12381_p2_decompress_base + bls12381_p2_decompress_element * num_elements` } .into()); } - self.result_state.gas_counter.pay_per(storage_read_key_byte, key.len() as u64)?; + let gas_to_be_burnt = storage_small_read_key_byte + .gas(&self.result_state.config.ext_costs) + .checked_mul(key.len() as u64) + .and_then(|g| g.checked_add(gas_to_be_burnt)) + .ok_or(HostError::IntegerOverflow)?; + self.result_state.gas_counter.can_burn_gas(gas_to_be_burnt)?; let nodes_before = self.ext.get_trie_nodes_count(); let read = self.ext.storage_get(&key, self.config.storage_get_mode); let nodes_delta = self @@ -3175,8 +3191,31 @@ bls12381_p2_decompress_base + bls12381_p2_decompress_element * num_elements` .checked_sub(&nodes_before) .ok_or(InconsistentStateError::IntegerOverflow)?; self.result_state.gas_counter.add_trie_fees(&nodes_delta)?; - let read = - Self::deref_value(&mut self.result_state.gas_counter, storage_read_value_byte, read?)?; + let read = match read? { + Some(read) => { + // Here we'll do u32 -> usize -> u64, which is always infallible + let read_len = read.len() as usize; + if read_len < INLINE_DISK_VALUE_THRESHOLD { + self.result_state.gas_counter.pay_base(storage_small_read_base)?; + self.result_state + .gas_counter + .pay_per(storage_small_read_key_byte, key.len() as u64)?; + self.result_state + .gas_counter + .pay_per(storage_small_read_value_byte, read_len as u64)?; + } else { + self.result_state.gas_counter.pay_base(storage_read_base)?; + self.result_state + .gas_counter + .pay_per(storage_read_key_byte, key.len() as u64)?; + self.result_state + .gas_counter + .pay_per(storage_read_value_byte, read_len as u64)?; + } + Some(read.deref()?) + } + None => None, + }; #[cfg(feature = "io_trace")] tracing::trace!( diff --git a/runtime/near-vm-runner/src/profile.rs b/runtime/near-vm-runner/src/profile.rs index ac164cebdcd..7a3584958a3 100644 --- a/runtime/near-vm-runner/src/profile.rs +++ b/runtime/near-vm-runner/src/profile.rs @@ -280,8 +280,8 @@ mod test { storage_read_value_byte -> 32 [0% host] storage_remove_base -> 33 [0% host] storage_remove_key_byte -> 34 [0% host] - storage_remove_ret_value_byte -> 35 [1% host] - storage_has_key_base -> 36 [1% host] + storage_remove_ret_value_byte -> 35 [0% host] + storage_has_key_base -> 36 [0% host] storage_has_key_byte -> 37 [1% host] storage_iter_create_prefix_base -> 38 [1% host] storage_iter_create_prefix_byte -> 39 [1% host] @@ -314,11 +314,11 @@ mod test { bls12381_p1_sum_element -> 66 [1% host] bls12381_p2_sum_base -> 67 [1% host] bls12381_p2_sum_element -> 68 [1% host] - bls12381_g1_multiexp_base -> 69 [2% host] - bls12381_g1_multiexp_element -> 70 [2% host] - bls12381_g2_multiexp_base -> 71 [2% host] - bls12381_g2_multiexp_element -> 72 [2% host] - bls12381_map_fp_to_g1_base -> 73 [2% host] + bls12381_g1_multiexp_base -> 69 [1% host] + bls12381_g1_multiexp_element -> 70 [1% host] + bls12381_g2_multiexp_base -> 71 [1% host] + bls12381_g2_multiexp_element -> 72 [1% host] + bls12381_map_fp_to_g1_base -> 73 [1% host] bls12381_map_fp_to_g1_element -> 74 [2% host] bls12381_map_fp2_to_g2_base -> 75 [2% host] bls12381_map_fp2_to_g2_element -> 76 [2% host] @@ -328,6 +328,9 @@ mod test { bls12381_p1_decompress_element -> 80 [2% host] bls12381_p2_decompress_base -> 81 [2% host] bls12381_p2_decompress_element -> 82 [2% host] + storage_small_read_base -> 83 [2% host] + storage_small_read_key_byte -> 84 [2% host] + storage_small_read_value_byte -> 85 [2% host] ------ Actions -------- create_account -> 1000 delete_account -> 1001 diff --git a/runtime/runtime-params-estimator/src/lib.rs b/runtime/runtime-params-estimator/src/lib.rs index ce501de2852..18c02a5e793 100644 --- a/runtime/runtime-params-estimator/src/lib.rs +++ b/runtime/runtime-params-estimator/src/lib.rs @@ -1164,8 +1164,8 @@ fn bls12381_p2_decompress_element(ctx: &mut EstimatorContext) -> GasCost { fn storage_has_key_base(ctx: &mut EstimatorContext) -> GasCost { fn_cost_with_setup( ctx, - "storage_write_10b_key_10b_value_1k", - "storage_has_key_10b_key_10b_value_1k", + "storage_write_10b_key_10kib_value_1k", + "storage_has_key_10b_key_1k", ExtCosts::storage_has_key_base, 1000, 0, @@ -1174,8 +1174,8 @@ fn storage_has_key_base(ctx: &mut EstimatorContext) -> GasCost { fn storage_has_key_byte(ctx: &mut EstimatorContext) -> GasCost { fn_cost_with_setup( ctx, - "storage_write_10kib_key_10b_value_1k", - "storage_has_key_10kib_key_10b_value_1k", + "storage_write_10kib_key_10kib_value_1k", + "storage_has_key_10kib_key_1k", ExtCosts::storage_has_key_byte, 10 * 1024 * 1000, 0, @@ -1188,8 +1188,8 @@ fn storage_read_base(ctx: &mut EstimatorContext) -> GasCost { } let cost = fn_cost_with_setup( ctx, - "storage_write_10b_key_10b_value_1k", - "storage_read_10b_key_10b_value_1k", + "storage_write_10b_key_10kib_value_1k", + "storage_read_10b_key_1k", ExtCosts::storage_read_base, 1000, 0, @@ -1199,8 +1199,8 @@ fn storage_read_base(ctx: &mut EstimatorContext) -> GasCost { fn storage_read_key_byte(ctx: &mut EstimatorContext) -> GasCost { fn_cost_with_setup( ctx, - "storage_write_10kib_key_10b_value_1k", - "storage_read_10kib_key_10b_value_1k", + "storage_write_10kib_key_10kib_value_1k", + "storage_read_10kib_key_1k", ExtCosts::storage_read_key_byte, 10 * 1024 * 1000, 0, @@ -1209,10 +1209,10 @@ fn storage_read_key_byte(ctx: &mut EstimatorContext) -> GasCost { fn storage_read_value_byte(ctx: &mut EstimatorContext) -> GasCost { fn_cost_with_setup( ctx, - "storage_write_10b_key_10kib_value_1k", - "storage_read_10b_key_10kib_value_1k", + "storage_write_10b_key_100kib_value_1k", + "storage_read_10b_key_1k", ExtCosts::storage_read_value_byte, - 10 * 1024 * 1000, + 100 * 1024 * 1000, 0, ) } @@ -1251,7 +1251,7 @@ fn storage_remove_base(ctx: &mut EstimatorContext) -> GasCost { fn_cost_with_setup( ctx, "storage_write_10b_key_10b_value_1k", - "storage_remove_10b_key_10b_value_1k", + "storage_remove_10b_key_1k", ExtCosts::storage_remove_base, 1000, 0, @@ -1261,7 +1261,7 @@ fn storage_remove_key_byte(ctx: &mut EstimatorContext) -> GasCost { fn_cost_with_setup( ctx, "storage_write_10kib_key_10b_value_1k", - "storage_remove_10kib_key_10b_value_1k", + "storage_remove_10kib_key_1k", ExtCosts::storage_remove_key_byte, 10 * 1024 * 1000, 0, @@ -1271,7 +1271,7 @@ fn storage_remove_ret_value_byte(ctx: &mut EstimatorContext) -> GasCost { fn_cost_with_setup( ctx, "storage_write_10b_key_10kib_value_1k", - "storage_remove_10b_key_10kib_value_1k", + "storage_remove_10b_key_1k", ExtCosts::storage_remove_ret_value_byte, 10 * 1024 * 1000, 0, diff --git a/tools/protocol-schema-check/res/protocol_schema.toml b/tools/protocol-schema-check/res/protocol_schema.toml index 21632483d7e..8247a2a394c 100644 --- a/tools/protocol-schema-check/res/protocol_schema.toml +++ b/tools/protocol-schema-check/res/protocol_schema.toml @@ -101,13 +101,13 @@ EpochInfoV3 = 91327628 EpochInfoV4 = 434230701 EpochSummary = 742414117 EpochValidatorInfo = 378323971 -ExecutionMetadata = 3532864429 -ExecutionOutcome = 3162058681 -ExecutionOutcomeWithId = 522309703 -ExecutionOutcomeWithIdAndProof = 1300070947 -ExecutionOutcomeWithProof = 3663131288 +ExecutionMetadata = 1028872977 +ExecutionOutcome = 592857008 +ExecutionOutcomeWithId = 530384222 +ExecutionOutcomeWithIdAndProof = 1942647306 +ExecutionOutcomeWithProof = 3990034714 ExecutionStatus = 1810006625 -ExtCosts = 836392984 +ExtCosts = 216912929 FetchingStateStatus = 2204896805 FlatStateChanges = 2811133731 FlatStateDeltaMetadata = 3401366797 @@ -157,7 +157,7 @@ Ping = 2783493472 Pong = 3159638327 PrepareError = 4009037507 ProfileDataV2 = 1955507222 -ProfileDataV3 = 302159633 +ProfileDataV3 = 2037020070 PromiseYieldIndices = 405847541 PromiseYieldTimeout = 3189361393 PublicKey = 601042198