From 3e2c81f23041c83967c9493a49164ed91e43666e Mon Sep 17 00:00:00 2001 From: tayfunelmas-assistbox Date: Thu, 4 Jul 2024 11:16:17 +0300 Subject: [PATCH 01/10] Statelessnet-only: Move versions 68 and 69 back to 80 and 81. --- .../jsonrpc-tests/res/genesis_config.json | 2 +- .../res/runtime_configs/{68.yaml => 80.yaml} | 0 .../res/runtime_configs/{69.yaml => 81.yaml} | 0 .../res/runtime_configs/parameters.snap | 46 ++-- core/parameters/src/config_store.rs | 4 +- ...ameters__config_store__tests__80.json.snap | 246 ++++++++++++++++++ ...ameters__config_store__tests__81.json.snap | 246 ++++++++++++++++++ ..._config_store__tests__testnet_80.json.snap | 246 ++++++++++++++++++ ..._config_store__tests__testnet_81.json.snap | 246 ++++++++++++++++++ core/primitives-core/src/version.rs | 4 +- 10 files changed, 1012 insertions(+), 28 deletions(-) rename core/parameters/res/runtime_configs/{68.yaml => 80.yaml} (100%) rename core/parameters/res/runtime_configs/{69.yaml => 81.yaml} (100%) create mode 100644 core/parameters/src/snapshots/near_parameters__config_store__tests__80.json.snap create mode 100644 core/parameters/src/snapshots/near_parameters__config_store__tests__81.json.snap create mode 100644 core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_80.json.snap create mode 100644 core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_81.json.snap diff --git a/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json b/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json index 9b3402fcc21..41a861a0be3 100644 --- a/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json +++ b/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json @@ -1,5 +1,5 @@ { - "protocol_version": 69, + "protocol_version": 81, "genesis_time": "1970-01-01T00:00:00.000000000Z", "chain_id": "sample", "genesis_height": 0, diff --git a/core/parameters/res/runtime_configs/68.yaml b/core/parameters/res/runtime_configs/80.yaml similarity index 100% rename from core/parameters/res/runtime_configs/68.yaml rename to core/parameters/res/runtime_configs/80.yaml diff --git a/core/parameters/res/runtime_configs/69.yaml b/core/parameters/res/runtime_configs/81.yaml similarity index 100% rename from core/parameters/res/runtime_configs/69.yaml rename to core/parameters/res/runtime_configs/81.yaml diff --git a/core/parameters/res/runtime_configs/parameters.snap b/core/parameters/res/runtime_configs/parameters.snap index fb48e82260f..a4b8114dd1f 100644 --- a/core/parameters/res/runtime_configs/parameters.snap +++ b/core/parameters/res/runtime_configs/parameters.snap @@ -4,12 +4,12 @@ description: THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. --- burnt_gas_reward 3 / 10 pessimistic_gas_price_inflation 103 / 100 -main_storage_proof_size_soft_limit 3_000_000 -per_receipt_storage_proof_size_limit 4_000_000 -new_transactions_validation_state_size_soft_limit 572_864 -combined_transactions_size_limit 4_194_304 -outgoing_receipts_usual_size_limit 102_400 -outgoing_receipts_big_size_limit 4_718_592 +main_storage_proof_size_soft_limit 999_999_999_999_999 +per_receipt_storage_proof_size_limit 999_999_999_999_999 +new_transactions_validation_state_size_soft_limit 999_999_999_999_999 +combined_transactions_size_limit 999_999_999_999_999 +outgoing_receipts_usual_size_limit 999_999_999_999_999 +outgoing_receipts_big_size_limit 999_999_999_999_999 min_allowed_top_level_account_length 65 registrar_account_id registrar storage_amount_per_byte 10000000000000000000 @@ -25,7 +25,7 @@ data_receipt_creation_base - execution: 36_486_732_312 data_receipt_creation_per_byte - send_sir: 17_212_011 -- send_not_sir: 47_683_715 +- send_not_sir: 17_212_011 - execution: 17_212_011 action_create_account - send_sir: 3_850_000_000_000 @@ -41,7 +41,7 @@ action_deploy_contract - execution: 184_765_750_000 action_deploy_contract_per_byte - send_sir: 6_812_999 -- send_not_sir: 47_683_715 +- send_not_sir: 6_812_999 - execution: 64_572_944 action_function_call - send_sir: 200_000_000_000 @@ -49,7 +49,7 @@ action_function_call - execution: 780_000_000_000 action_function_call_per_byte - send_sir: 2_235_934 -- send_not_sir: 47_683_715 +- send_not_sir: 2_235_934 - execution: 2_235_934 action_transfer - send_sir: 115_123_062_500 @@ -69,7 +69,7 @@ action_add_function_call_key - execution: 102_217_625_000 action_add_function_call_key_per_byte - send_sir: 1_925_331 -- send_not_sir: 47_683_715 +- send_not_sir: 1_925_331 - execution: 1_925_331 action_delete_key - send_sir: 94_946_625_000 @@ -145,7 +145,7 @@ wasm_alt_bn128_g1_sum_element 5_000_000_000 wasm_yield_create_base 153_411_779_276 wasm_yield_create_byte 15_643_988 wasm_yield_resume_base 1_195_627_285_210 -wasm_yield_resume_byte 47_683_715 +wasm_yield_resume_byte 17_212_011 max_gas_burnt 300_000_000_000_000 max_gas_burnt_view 300_000_000_000_000 max_stack_height 262_144 @@ -164,8 +164,8 @@ max_length_method_name 256 max_arguments_length 4_194_304 max_length_returned_data 4_194_304 max_contract_size 4_194_304 -max_transaction_size 1_572_864 -max_receipt_size 4_194_304 +max_transaction_size 4_194_304 +max_receipt_size 999_999_999_999_999 max_length_storage_key 2_048 max_length_storage_value 4_194_304 max_promises_per_function_call_action 1_024 @@ -187,13 +187,13 @@ function_call_weight true vm_kind NearVm eth_implicit_accounts false yield_resume true -max_congestion_incoming_gas 20_000_000_000_000_000 -max_congestion_outgoing_gas 10_000_000_000_000_000 -max_congestion_memory_consumption 1_000_000_000 -max_congestion_missed_chunks 5 -max_outgoing_gas 300_000_000_000_000_000 -min_outgoing_gas 1_000_000_000_000_000 -allowed_shard_outgoing_gas 1_000_000_000_000_000 -max_tx_gas 500_000_000_000_000 -min_tx_gas 20_000_000_000_000 -reject_tx_congestion_threshold 50 / 100 +max_congestion_incoming_gas 9_223_372_036_854_775_807 +max_congestion_outgoing_gas 9_223_372_036_854_775_807 +max_congestion_memory_consumption 9_223_372_036_854_775_807 +max_congestion_missed_chunks 9_223_372_036_854_775_807 +max_outgoing_gas 9_223_372_036_854_775_807 +min_outgoing_gas 9_223_372_036_854_775_807 +allowed_shard_outgoing_gas 9_223_372_036_854_775_807 +max_tx_gas 9_223_372_036_854_775_807 +min_tx_gas 9_223_372_036_854_775_807 +reject_tx_congestion_threshold 1 / 1 diff --git a/core/parameters/src/config_store.rs b/core/parameters/src/config_store.rs index bbcbec31305..96b60cefafa 100644 --- a/core/parameters/src/config_store.rs +++ b/core/parameters/src/config_store.rs @@ -40,9 +40,9 @@ static CONFIG_DIFFS: &[(ProtocolVersion, &str)] = &[ (66, include_config!("66.yaml")), (67, include_config!("67.yaml")), // Congestion Control. - (68, include_config!("68.yaml")), + (80, include_config!("80.yaml")), // Stateless Validation. - (69, include_config!("69.yaml")), + (81, include_config!("81.yaml")), (129, include_config!("129.yaml")), // Introduce ETH-implicit accounts. (138, include_config!("138.yaml")), diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__80.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__80.json.snap new file mode 100644 index 00000000000..5d92187d626 --- /dev/null +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__80.json.snap @@ -0,0 +1,246 @@ +--- +source: core/parameters/src/config_store.rs +expression: config_view +--- +{ + "storage_amount_per_byte": "10000000000000000000", + "transaction_costs": { + "action_receipt_creation_config": { + "send_sir": 108059500000, + "send_not_sir": 108059500000, + "execution": 108059500000 + }, + "data_receipt_creation_config": { + "base_cost": { + "send_sir": 36486732312, + "send_not_sir": 36486732312, + "execution": 36486732312 + }, + "cost_per_byte": { + "send_sir": 17212011, + "send_not_sir": 17212011, + "execution": 17212011 + } + }, + "action_creation_config": { + "create_account_cost": { + "send_sir": 3850000000000, + "send_not_sir": 3850000000000, + "execution": 3850000000000 + }, + "deploy_contract_cost": { + "send_sir": 184765750000, + "send_not_sir": 184765750000, + "execution": 184765750000 + }, + "deploy_contract_cost_per_byte": { + "send_sir": 6812999, + "send_not_sir": 6812999, + "execution": 64572944 + }, + "function_call_cost": { + "send_sir": 200000000000, + "send_not_sir": 200000000000, + "execution": 780000000000 + }, + "function_call_cost_per_byte": { + "send_sir": 2235934, + "send_not_sir": 2235934, + "execution": 2235934 + }, + "transfer_cost": { + "send_sir": 115123062500, + "send_not_sir": 115123062500, + "execution": 115123062500 + }, + "stake_cost": { + "send_sir": 141715687500, + "send_not_sir": 141715687500, + "execution": 102217625000 + }, + "add_key_cost": { + "full_access_cost": { + "send_sir": 101765125000, + "send_not_sir": 101765125000, + "execution": 101765125000 + }, + "function_call_cost": { + "send_sir": 102217625000, + "send_not_sir": 102217625000, + "execution": 102217625000 + }, + "function_call_cost_per_byte": { + "send_sir": 1925331, + "send_not_sir": 1925331, + "execution": 1925331 + } + }, + "delete_key_cost": { + "send_sir": 94946625000, + "send_not_sir": 94946625000, + "execution": 94946625000 + }, + "delete_account_cost": { + "send_sir": 147489000000, + "send_not_sir": 147489000000, + "execution": 147489000000 + }, + "delegate_cost": { + "send_sir": 200000000000, + "send_not_sir": 200000000000, + "execution": 200000000000 + } + }, + "storage_usage_config": { + "num_bytes_account": 100, + "num_extra_bytes_record": 40 + }, + "burnt_gas_reward": [ + 3, + 10 + ], + "pessimistic_gas_price_inflation_ratio": [ + 103, + 100 + ] + }, + "wasm_config": { + "ext_costs": { + "base": 264768111, + "contract_loading_base": 35445963, + "contract_loading_bytes": 1089295, + "read_memory_base": 2609863200, + "read_memory_byte": 3801333, + "write_memory_base": 2803794861, + "write_memory_byte": 2723772, + "read_register_base": 2517165186, + "read_register_byte": 98562, + "write_register_base": 2865522486, + "write_register_byte": 3801564, + "utf8_decoding_base": 3111779061, + "utf8_decoding_byte": 291580479, + "utf16_decoding_base": 3543313050, + "utf16_decoding_byte": 163577493, + "sha256_base": 4540970250, + "sha256_byte": 24117351, + "keccak256_base": 5879491275, + "keccak256_byte": 21471105, + "keccak512_base": 5811388236, + "keccak512_byte": 36649701, + "ripemd160_base": 853675086, + "ripemd160_block": 680107584, + "ed25519_verify_base": 210000000000, + "ed25519_verify_byte": 9000000, + "ecrecover_base": 278821988457, + "log_base": 3543313050, + "log_byte": 13198791, + "storage_write_base": 64196736000, + "storage_write_key_byte": 70482867, + "storage_write_value_byte": 31018539, + "storage_write_evicted_byte": 32117307, + "storage_read_base": 56356845750, + "storage_read_key_byte": 30952533, + "storage_read_value_byte": 5611005, + "storage_remove_base": 53473030500, + "storage_remove_key_byte": 38220384, + "storage_remove_ret_value_byte": 11531556, + "storage_has_key_base": 54039896625, + "storage_has_key_byte": 30790845, + "storage_iter_create_prefix_base": 0, + "storage_iter_create_prefix_byte": 0, + "storage_iter_create_range_base": 0, + "storage_iter_create_from_byte": 0, + "storage_iter_create_to_byte": 0, + "storage_iter_next_base": 0, + "storage_iter_next_key_byte": 0, + "storage_iter_next_value_byte": 0, + "touching_trie_node": 16101955926, + "read_cached_trie_node": 2280000000, + "promise_and_base": 1465013400, + "promise_and_per_promise": 5452176, + "promise_return": 560152386, + "validator_stake_base": 911834726400, + "validator_total_stake_base": 911834726400, + "contract_compile_base": 0, + "contract_compile_bytes": 0, + "alt_bn128_g1_multiexp_base": 713000000000, + "alt_bn128_g1_multiexp_element": 320000000000, + "alt_bn128_g1_sum_base": 3000000000, + "alt_bn128_g1_sum_element": 5000000000, + "alt_bn128_pairing_check_base": 9686000000000, + "alt_bn128_pairing_check_element": 5102000000000, + "yield_create_base": 153411779276, + "yield_create_byte": 15643988, + "yield_resume_base": 1195627285210, + "yield_resume_byte": 1195627285210 + }, + "grow_mem_cost": 1, + "regular_op_cost": 822756, + "vm_kind": "", + "disable_9393_fix": false, + "storage_get_mode": "FlatStorage", + "fix_contract_loading_cost": false, + "implicit_account_creation": true, + "math_extension": true, + "ed25519_verify": true, + "alt_bn128": true, + "function_call_weight": true, + "eth_implicit_accounts": false, + "yield_resume_host_functions": true, + "limit_config": { + "max_gas_burnt": 300000000000000, + "max_stack_height": 262144, + "contract_prepare_version": 2, + "initial_memory_pages": 1024, + "max_memory_pages": 2048, + "registers_memory_limit": 1073741824, + "max_register_size": 104857600, + "max_number_registers": 100, + "max_number_logs": 100, + "max_total_log_length": 16384, + "max_total_prepaid_gas": 300000000000000, + "max_actions_per_receipt": 100, + "max_number_bytes_method_names": 2000, + "max_length_method_name": 256, + "max_arguments_length": 4194304, + "max_length_returned_data": 4194304, + "max_contract_size": 4194304, + "max_transaction_size": 4194304, + "max_receipt_size": 999999999999999, + "max_length_storage_key": 2048, + "max_length_storage_value": 4194304, + "max_promises_per_function_call_action": 1024, + "max_number_input_data_dependencies": 128, + "max_functions_number_per_contract": 10000, + "wasmer2_stack_limit": 204800, + "max_locals_per_contract": 1000000, + "account_id_validity_rules_version": 1, + "yield_timeout_length_in_blocks": 200, + "max_yield_payload_size": 1024, + "per_receipt_storage_proof_size_limit": 999999999999999 + } + }, + "account_creation_config": { + "min_allowed_top_level_account_length": 65, + "registrar_account_id": "registrar" + }, + "congestion_control_config": { + "max_congestion_incoming_gas": 20000000000000000, + "max_congestion_outgoing_gas": 10000000000000000, + "max_congestion_memory_consumption": 1000000000, + "max_congestion_missed_chunks": 5, + "max_outgoing_gas": 300000000000000000, + "min_outgoing_gas": 1000000000000000, + "allowed_shard_outgoing_gas": 1000000000000000, + "max_tx_gas": 500000000000000, + "min_tx_gas": 20000000000000, + "reject_tx_congestion_threshold": 0.5, + "outgoing_receipts_usual_size_limit": 999999999999999, + "outgoing_receipts_big_size_limit": 999999999999999 + }, + "witness_config": { + "main_storage_proof_size_soft_limit": 999999999999999, + "combined_transactions_size_limit": 999999999999999, + "new_transactions_validation_state_size_soft_limit": 999999999999999 + } +} diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__81.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__81.json.snap new file mode 100644 index 00000000000..f9986bfaa9d --- /dev/null +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__81.json.snap @@ -0,0 +1,246 @@ +--- +source: core/parameters/src/config_store.rs +expression: config_view +--- +{ + "storage_amount_per_byte": "10000000000000000000", + "transaction_costs": { + "action_receipt_creation_config": { + "send_sir": 108059500000, + "send_not_sir": 108059500000, + "execution": 108059500000 + }, + "data_receipt_creation_config": { + "base_cost": { + "send_sir": 36486732312, + "send_not_sir": 36486732312, + "execution": 36486732312 + }, + "cost_per_byte": { + "send_sir": 17212011, + "send_not_sir": 47683715, + "execution": 17212011 + } + }, + "action_creation_config": { + "create_account_cost": { + "send_sir": 3850000000000, + "send_not_sir": 3850000000000, + "execution": 3850000000000 + }, + "deploy_contract_cost": { + "send_sir": 184765750000, + "send_not_sir": 184765750000, + "execution": 184765750000 + }, + "deploy_contract_cost_per_byte": { + "send_sir": 6812999, + "send_not_sir": 47683715, + "execution": 64572944 + }, + "function_call_cost": { + "send_sir": 200000000000, + "send_not_sir": 200000000000, + "execution": 780000000000 + }, + "function_call_cost_per_byte": { + "send_sir": 2235934, + "send_not_sir": 47683715, + "execution": 2235934 + }, + "transfer_cost": { + "send_sir": 115123062500, + "send_not_sir": 115123062500, + "execution": 115123062500 + }, + "stake_cost": { + "send_sir": 141715687500, + "send_not_sir": 141715687500, + "execution": 102217625000 + }, + "add_key_cost": { + "full_access_cost": { + "send_sir": 101765125000, + "send_not_sir": 101765125000, + "execution": 101765125000 + }, + "function_call_cost": { + "send_sir": 102217625000, + "send_not_sir": 102217625000, + "execution": 102217625000 + }, + "function_call_cost_per_byte": { + "send_sir": 1925331, + "send_not_sir": 47683715, + "execution": 1925331 + } + }, + "delete_key_cost": { + "send_sir": 94946625000, + "send_not_sir": 94946625000, + "execution": 94946625000 + }, + "delete_account_cost": { + "send_sir": 147489000000, + "send_not_sir": 147489000000, + "execution": 147489000000 + }, + "delegate_cost": { + "send_sir": 200000000000, + "send_not_sir": 200000000000, + "execution": 200000000000 + } + }, + "storage_usage_config": { + "num_bytes_account": 100, + "num_extra_bytes_record": 40 + }, + "burnt_gas_reward": [ + 3, + 10 + ], + "pessimistic_gas_price_inflation_ratio": [ + 103, + 100 + ] + }, + "wasm_config": { + "ext_costs": { + "base": 264768111, + "contract_loading_base": 35445963, + "contract_loading_bytes": 1089295, + "read_memory_base": 2609863200, + "read_memory_byte": 3801333, + "write_memory_base": 2803794861, + "write_memory_byte": 2723772, + "read_register_base": 2517165186, + "read_register_byte": 98562, + "write_register_base": 2865522486, + "write_register_byte": 3801564, + "utf8_decoding_base": 3111779061, + "utf8_decoding_byte": 291580479, + "utf16_decoding_base": 3543313050, + "utf16_decoding_byte": 163577493, + "sha256_base": 4540970250, + "sha256_byte": 24117351, + "keccak256_base": 5879491275, + "keccak256_byte": 21471105, + "keccak512_base": 5811388236, + "keccak512_byte": 36649701, + "ripemd160_base": 853675086, + "ripemd160_block": 680107584, + "ed25519_verify_base": 210000000000, + "ed25519_verify_byte": 9000000, + "ecrecover_base": 278821988457, + "log_base": 3543313050, + "log_byte": 13198791, + "storage_write_base": 64196736000, + "storage_write_key_byte": 70482867, + "storage_write_value_byte": 31018539, + "storage_write_evicted_byte": 32117307, + "storage_read_base": 56356845750, + "storage_read_key_byte": 30952533, + "storage_read_value_byte": 5611005, + "storage_remove_base": 53473030500, + "storage_remove_key_byte": 38220384, + "storage_remove_ret_value_byte": 11531556, + "storage_has_key_base": 54039896625, + "storage_has_key_byte": 30790845, + "storage_iter_create_prefix_base": 0, + "storage_iter_create_prefix_byte": 0, + "storage_iter_create_range_base": 0, + "storage_iter_create_from_byte": 0, + "storage_iter_create_to_byte": 0, + "storage_iter_next_base": 0, + "storage_iter_next_key_byte": 0, + "storage_iter_next_value_byte": 0, + "touching_trie_node": 16101955926, + "read_cached_trie_node": 2280000000, + "promise_and_base": 1465013400, + "promise_and_per_promise": 5452176, + "promise_return": 560152386, + "validator_stake_base": 911834726400, + "validator_total_stake_base": 911834726400, + "contract_compile_base": 0, + "contract_compile_bytes": 0, + "alt_bn128_g1_multiexp_base": 713000000000, + "alt_bn128_g1_multiexp_element": 320000000000, + "alt_bn128_g1_sum_base": 3000000000, + "alt_bn128_g1_sum_element": 5000000000, + "alt_bn128_pairing_check_base": 9686000000000, + "alt_bn128_pairing_check_element": 5102000000000, + "yield_create_base": 153411779276, + "yield_create_byte": 15643988, + "yield_resume_base": 1195627285210, + "yield_resume_byte": 1195627285210 + }, + "grow_mem_cost": 1, + "regular_op_cost": 822756, + "vm_kind": "", + "disable_9393_fix": false, + "storage_get_mode": "FlatStorage", + "fix_contract_loading_cost": false, + "implicit_account_creation": true, + "math_extension": true, + "ed25519_verify": true, + "alt_bn128": true, + "function_call_weight": true, + "eth_implicit_accounts": false, + "yield_resume_host_functions": true, + "limit_config": { + "max_gas_burnt": 300000000000000, + "max_stack_height": 262144, + "contract_prepare_version": 2, + "initial_memory_pages": 1024, + "max_memory_pages": 2048, + "registers_memory_limit": 1073741824, + "max_register_size": 104857600, + "max_number_registers": 100, + "max_number_logs": 100, + "max_total_log_length": 16384, + "max_total_prepaid_gas": 300000000000000, + "max_actions_per_receipt": 100, + "max_number_bytes_method_names": 2000, + "max_length_method_name": 256, + "max_arguments_length": 4194304, + "max_length_returned_data": 4194304, + "max_contract_size": 4194304, + "max_transaction_size": 1572864, + "max_receipt_size": 4194304, + "max_length_storage_key": 2048, + "max_length_storage_value": 4194304, + "max_promises_per_function_call_action": 1024, + "max_number_input_data_dependencies": 128, + "max_functions_number_per_contract": 10000, + "wasmer2_stack_limit": 204800, + "max_locals_per_contract": 1000000, + "account_id_validity_rules_version": 1, + "yield_timeout_length_in_blocks": 200, + "max_yield_payload_size": 1024, + "per_receipt_storage_proof_size_limit": 4000000 + } + }, + "account_creation_config": { + "min_allowed_top_level_account_length": 65, + "registrar_account_id": "registrar" + }, + "congestion_control_config": { + "max_congestion_incoming_gas": 20000000000000000, + "max_congestion_outgoing_gas": 10000000000000000, + "max_congestion_memory_consumption": 1000000000, + "max_congestion_missed_chunks": 5, + "max_outgoing_gas": 300000000000000000, + "min_outgoing_gas": 1000000000000000, + "allowed_shard_outgoing_gas": 1000000000000000, + "max_tx_gas": 500000000000000, + "min_tx_gas": 20000000000000, + "reject_tx_congestion_threshold": 0.5, + "outgoing_receipts_usual_size_limit": 102400, + "outgoing_receipts_big_size_limit": 4718592 + }, + "witness_config": { + "main_storage_proof_size_soft_limit": 3000000, + "combined_transactions_size_limit": 4194304, + "new_transactions_validation_state_size_soft_limit": 572864 + } +} diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_80.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_80.json.snap new file mode 100644 index 00000000000..5d92187d626 --- /dev/null +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_80.json.snap @@ -0,0 +1,246 @@ +--- +source: core/parameters/src/config_store.rs +expression: config_view +--- +{ + "storage_amount_per_byte": "10000000000000000000", + "transaction_costs": { + "action_receipt_creation_config": { + "send_sir": 108059500000, + "send_not_sir": 108059500000, + "execution": 108059500000 + }, + "data_receipt_creation_config": { + "base_cost": { + "send_sir": 36486732312, + "send_not_sir": 36486732312, + "execution": 36486732312 + }, + "cost_per_byte": { + "send_sir": 17212011, + "send_not_sir": 17212011, + "execution": 17212011 + } + }, + "action_creation_config": { + "create_account_cost": { + "send_sir": 3850000000000, + "send_not_sir": 3850000000000, + "execution": 3850000000000 + }, + "deploy_contract_cost": { + "send_sir": 184765750000, + "send_not_sir": 184765750000, + "execution": 184765750000 + }, + "deploy_contract_cost_per_byte": { + "send_sir": 6812999, + "send_not_sir": 6812999, + "execution": 64572944 + }, + "function_call_cost": { + "send_sir": 200000000000, + "send_not_sir": 200000000000, + "execution": 780000000000 + }, + "function_call_cost_per_byte": { + "send_sir": 2235934, + "send_not_sir": 2235934, + "execution": 2235934 + }, + "transfer_cost": { + "send_sir": 115123062500, + "send_not_sir": 115123062500, + "execution": 115123062500 + }, + "stake_cost": { + "send_sir": 141715687500, + "send_not_sir": 141715687500, + "execution": 102217625000 + }, + "add_key_cost": { + "full_access_cost": { + "send_sir": 101765125000, + "send_not_sir": 101765125000, + "execution": 101765125000 + }, + "function_call_cost": { + "send_sir": 102217625000, + "send_not_sir": 102217625000, + "execution": 102217625000 + }, + "function_call_cost_per_byte": { + "send_sir": 1925331, + "send_not_sir": 1925331, + "execution": 1925331 + } + }, + "delete_key_cost": { + "send_sir": 94946625000, + "send_not_sir": 94946625000, + "execution": 94946625000 + }, + "delete_account_cost": { + "send_sir": 147489000000, + "send_not_sir": 147489000000, + "execution": 147489000000 + }, + "delegate_cost": { + "send_sir": 200000000000, + "send_not_sir": 200000000000, + "execution": 200000000000 + } + }, + "storage_usage_config": { + "num_bytes_account": 100, + "num_extra_bytes_record": 40 + }, + "burnt_gas_reward": [ + 3, + 10 + ], + "pessimistic_gas_price_inflation_ratio": [ + 103, + 100 + ] + }, + "wasm_config": { + "ext_costs": { + "base": 264768111, + "contract_loading_base": 35445963, + "contract_loading_bytes": 1089295, + "read_memory_base": 2609863200, + "read_memory_byte": 3801333, + "write_memory_base": 2803794861, + "write_memory_byte": 2723772, + "read_register_base": 2517165186, + "read_register_byte": 98562, + "write_register_base": 2865522486, + "write_register_byte": 3801564, + "utf8_decoding_base": 3111779061, + "utf8_decoding_byte": 291580479, + "utf16_decoding_base": 3543313050, + "utf16_decoding_byte": 163577493, + "sha256_base": 4540970250, + "sha256_byte": 24117351, + "keccak256_base": 5879491275, + "keccak256_byte": 21471105, + "keccak512_base": 5811388236, + "keccak512_byte": 36649701, + "ripemd160_base": 853675086, + "ripemd160_block": 680107584, + "ed25519_verify_base": 210000000000, + "ed25519_verify_byte": 9000000, + "ecrecover_base": 278821988457, + "log_base": 3543313050, + "log_byte": 13198791, + "storage_write_base": 64196736000, + "storage_write_key_byte": 70482867, + "storage_write_value_byte": 31018539, + "storage_write_evicted_byte": 32117307, + "storage_read_base": 56356845750, + "storage_read_key_byte": 30952533, + "storage_read_value_byte": 5611005, + "storage_remove_base": 53473030500, + "storage_remove_key_byte": 38220384, + "storage_remove_ret_value_byte": 11531556, + "storage_has_key_base": 54039896625, + "storage_has_key_byte": 30790845, + "storage_iter_create_prefix_base": 0, + "storage_iter_create_prefix_byte": 0, + "storage_iter_create_range_base": 0, + "storage_iter_create_from_byte": 0, + "storage_iter_create_to_byte": 0, + "storage_iter_next_base": 0, + "storage_iter_next_key_byte": 0, + "storage_iter_next_value_byte": 0, + "touching_trie_node": 16101955926, + "read_cached_trie_node": 2280000000, + "promise_and_base": 1465013400, + "promise_and_per_promise": 5452176, + "promise_return": 560152386, + "validator_stake_base": 911834726400, + "validator_total_stake_base": 911834726400, + "contract_compile_base": 0, + "contract_compile_bytes": 0, + "alt_bn128_g1_multiexp_base": 713000000000, + "alt_bn128_g1_multiexp_element": 320000000000, + "alt_bn128_g1_sum_base": 3000000000, + "alt_bn128_g1_sum_element": 5000000000, + "alt_bn128_pairing_check_base": 9686000000000, + "alt_bn128_pairing_check_element": 5102000000000, + "yield_create_base": 153411779276, + "yield_create_byte": 15643988, + "yield_resume_base": 1195627285210, + "yield_resume_byte": 1195627285210 + }, + "grow_mem_cost": 1, + "regular_op_cost": 822756, + "vm_kind": "", + "disable_9393_fix": false, + "storage_get_mode": "FlatStorage", + "fix_contract_loading_cost": false, + "implicit_account_creation": true, + "math_extension": true, + "ed25519_verify": true, + "alt_bn128": true, + "function_call_weight": true, + "eth_implicit_accounts": false, + "yield_resume_host_functions": true, + "limit_config": { + "max_gas_burnt": 300000000000000, + "max_stack_height": 262144, + "contract_prepare_version": 2, + "initial_memory_pages": 1024, + "max_memory_pages": 2048, + "registers_memory_limit": 1073741824, + "max_register_size": 104857600, + "max_number_registers": 100, + "max_number_logs": 100, + "max_total_log_length": 16384, + "max_total_prepaid_gas": 300000000000000, + "max_actions_per_receipt": 100, + "max_number_bytes_method_names": 2000, + "max_length_method_name": 256, + "max_arguments_length": 4194304, + "max_length_returned_data": 4194304, + "max_contract_size": 4194304, + "max_transaction_size": 4194304, + "max_receipt_size": 999999999999999, + "max_length_storage_key": 2048, + "max_length_storage_value": 4194304, + "max_promises_per_function_call_action": 1024, + "max_number_input_data_dependencies": 128, + "max_functions_number_per_contract": 10000, + "wasmer2_stack_limit": 204800, + "max_locals_per_contract": 1000000, + "account_id_validity_rules_version": 1, + "yield_timeout_length_in_blocks": 200, + "max_yield_payload_size": 1024, + "per_receipt_storage_proof_size_limit": 999999999999999 + } + }, + "account_creation_config": { + "min_allowed_top_level_account_length": 65, + "registrar_account_id": "registrar" + }, + "congestion_control_config": { + "max_congestion_incoming_gas": 20000000000000000, + "max_congestion_outgoing_gas": 10000000000000000, + "max_congestion_memory_consumption": 1000000000, + "max_congestion_missed_chunks": 5, + "max_outgoing_gas": 300000000000000000, + "min_outgoing_gas": 1000000000000000, + "allowed_shard_outgoing_gas": 1000000000000000, + "max_tx_gas": 500000000000000, + "min_tx_gas": 20000000000000, + "reject_tx_congestion_threshold": 0.5, + "outgoing_receipts_usual_size_limit": 999999999999999, + "outgoing_receipts_big_size_limit": 999999999999999 + }, + "witness_config": { + "main_storage_proof_size_soft_limit": 999999999999999, + "combined_transactions_size_limit": 999999999999999, + "new_transactions_validation_state_size_soft_limit": 999999999999999 + } +} diff --git a/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_81.json.snap b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_81.json.snap new file mode 100644 index 00000000000..f9986bfaa9d --- /dev/null +++ b/core/parameters/src/snapshots/near_parameters__config_store__tests__testnet_81.json.snap @@ -0,0 +1,246 @@ +--- +source: core/parameters/src/config_store.rs +expression: config_view +--- +{ + "storage_amount_per_byte": "10000000000000000000", + "transaction_costs": { + "action_receipt_creation_config": { + "send_sir": 108059500000, + "send_not_sir": 108059500000, + "execution": 108059500000 + }, + "data_receipt_creation_config": { + "base_cost": { + "send_sir": 36486732312, + "send_not_sir": 36486732312, + "execution": 36486732312 + }, + "cost_per_byte": { + "send_sir": 17212011, + "send_not_sir": 47683715, + "execution": 17212011 + } + }, + "action_creation_config": { + "create_account_cost": { + "send_sir": 3850000000000, + "send_not_sir": 3850000000000, + "execution": 3850000000000 + }, + "deploy_contract_cost": { + "send_sir": 184765750000, + "send_not_sir": 184765750000, + "execution": 184765750000 + }, + "deploy_contract_cost_per_byte": { + "send_sir": 6812999, + "send_not_sir": 47683715, + "execution": 64572944 + }, + "function_call_cost": { + "send_sir": 200000000000, + "send_not_sir": 200000000000, + "execution": 780000000000 + }, + "function_call_cost_per_byte": { + "send_sir": 2235934, + "send_not_sir": 47683715, + "execution": 2235934 + }, + "transfer_cost": { + "send_sir": 115123062500, + "send_not_sir": 115123062500, + "execution": 115123062500 + }, + "stake_cost": { + "send_sir": 141715687500, + "send_not_sir": 141715687500, + "execution": 102217625000 + }, + "add_key_cost": { + "full_access_cost": { + "send_sir": 101765125000, + "send_not_sir": 101765125000, + "execution": 101765125000 + }, + "function_call_cost": { + "send_sir": 102217625000, + "send_not_sir": 102217625000, + "execution": 102217625000 + }, + "function_call_cost_per_byte": { + "send_sir": 1925331, + "send_not_sir": 47683715, + "execution": 1925331 + } + }, + "delete_key_cost": { + "send_sir": 94946625000, + "send_not_sir": 94946625000, + "execution": 94946625000 + }, + "delete_account_cost": { + "send_sir": 147489000000, + "send_not_sir": 147489000000, + "execution": 147489000000 + }, + "delegate_cost": { + "send_sir": 200000000000, + "send_not_sir": 200000000000, + "execution": 200000000000 + } + }, + "storage_usage_config": { + "num_bytes_account": 100, + "num_extra_bytes_record": 40 + }, + "burnt_gas_reward": [ + 3, + 10 + ], + "pessimistic_gas_price_inflation_ratio": [ + 103, + 100 + ] + }, + "wasm_config": { + "ext_costs": { + "base": 264768111, + "contract_loading_base": 35445963, + "contract_loading_bytes": 1089295, + "read_memory_base": 2609863200, + "read_memory_byte": 3801333, + "write_memory_base": 2803794861, + "write_memory_byte": 2723772, + "read_register_base": 2517165186, + "read_register_byte": 98562, + "write_register_base": 2865522486, + "write_register_byte": 3801564, + "utf8_decoding_base": 3111779061, + "utf8_decoding_byte": 291580479, + "utf16_decoding_base": 3543313050, + "utf16_decoding_byte": 163577493, + "sha256_base": 4540970250, + "sha256_byte": 24117351, + "keccak256_base": 5879491275, + "keccak256_byte": 21471105, + "keccak512_base": 5811388236, + "keccak512_byte": 36649701, + "ripemd160_base": 853675086, + "ripemd160_block": 680107584, + "ed25519_verify_base": 210000000000, + "ed25519_verify_byte": 9000000, + "ecrecover_base": 278821988457, + "log_base": 3543313050, + "log_byte": 13198791, + "storage_write_base": 64196736000, + "storage_write_key_byte": 70482867, + "storage_write_value_byte": 31018539, + "storage_write_evicted_byte": 32117307, + "storage_read_base": 56356845750, + "storage_read_key_byte": 30952533, + "storage_read_value_byte": 5611005, + "storage_remove_base": 53473030500, + "storage_remove_key_byte": 38220384, + "storage_remove_ret_value_byte": 11531556, + "storage_has_key_base": 54039896625, + "storage_has_key_byte": 30790845, + "storage_iter_create_prefix_base": 0, + "storage_iter_create_prefix_byte": 0, + "storage_iter_create_range_base": 0, + "storage_iter_create_from_byte": 0, + "storage_iter_create_to_byte": 0, + "storage_iter_next_base": 0, + "storage_iter_next_key_byte": 0, + "storage_iter_next_value_byte": 0, + "touching_trie_node": 16101955926, + "read_cached_trie_node": 2280000000, + "promise_and_base": 1465013400, + "promise_and_per_promise": 5452176, + "promise_return": 560152386, + "validator_stake_base": 911834726400, + "validator_total_stake_base": 911834726400, + "contract_compile_base": 0, + "contract_compile_bytes": 0, + "alt_bn128_g1_multiexp_base": 713000000000, + "alt_bn128_g1_multiexp_element": 320000000000, + "alt_bn128_g1_sum_base": 3000000000, + "alt_bn128_g1_sum_element": 5000000000, + "alt_bn128_pairing_check_base": 9686000000000, + "alt_bn128_pairing_check_element": 5102000000000, + "yield_create_base": 153411779276, + "yield_create_byte": 15643988, + "yield_resume_base": 1195627285210, + "yield_resume_byte": 1195627285210 + }, + "grow_mem_cost": 1, + "regular_op_cost": 822756, + "vm_kind": "", + "disable_9393_fix": false, + "storage_get_mode": "FlatStorage", + "fix_contract_loading_cost": false, + "implicit_account_creation": true, + "math_extension": true, + "ed25519_verify": true, + "alt_bn128": true, + "function_call_weight": true, + "eth_implicit_accounts": false, + "yield_resume_host_functions": true, + "limit_config": { + "max_gas_burnt": 300000000000000, + "max_stack_height": 262144, + "contract_prepare_version": 2, + "initial_memory_pages": 1024, + "max_memory_pages": 2048, + "registers_memory_limit": 1073741824, + "max_register_size": 104857600, + "max_number_registers": 100, + "max_number_logs": 100, + "max_total_log_length": 16384, + "max_total_prepaid_gas": 300000000000000, + "max_actions_per_receipt": 100, + "max_number_bytes_method_names": 2000, + "max_length_method_name": 256, + "max_arguments_length": 4194304, + "max_length_returned_data": 4194304, + "max_contract_size": 4194304, + "max_transaction_size": 1572864, + "max_receipt_size": 4194304, + "max_length_storage_key": 2048, + "max_length_storage_value": 4194304, + "max_promises_per_function_call_action": 1024, + "max_number_input_data_dependencies": 128, + "max_functions_number_per_contract": 10000, + "wasmer2_stack_limit": 204800, + "max_locals_per_contract": 1000000, + "account_id_validity_rules_version": 1, + "yield_timeout_length_in_blocks": 200, + "max_yield_payload_size": 1024, + "per_receipt_storage_proof_size_limit": 4000000 + } + }, + "account_creation_config": { + "min_allowed_top_level_account_length": 65, + "registrar_account_id": "registrar" + }, + "congestion_control_config": { + "max_congestion_incoming_gas": 20000000000000000, + "max_congestion_outgoing_gas": 10000000000000000, + "max_congestion_memory_consumption": 1000000000, + "max_congestion_missed_chunks": 5, + "max_outgoing_gas": 300000000000000000, + "min_outgoing_gas": 1000000000000000, + "allowed_shard_outgoing_gas": 1000000000000000, + "max_tx_gas": 500000000000000, + "min_tx_gas": 20000000000000, + "reject_tx_congestion_threshold": 0.5, + "outgoing_receipts_usual_size_limit": 102400, + "outgoing_receipts_big_size_limit": 4718592 + }, + "witness_config": { + "main_storage_proof_size_soft_limit": 3000000, + "combined_transactions_size_limit": 4194304, + "new_transactions_validation_state_size_soft_limit": 572864 + } +} diff --git a/core/primitives-core/src/version.rs b/core/primitives-core/src/version.rs index 9b3d9eb7d69..3ad2f5697f9 100644 --- a/core/primitives-core/src/version.rs +++ b/core/primitives-core/src/version.rs @@ -220,7 +220,7 @@ impl ProtocolFeature { ProtocolFeature::SimpleNightshadeV3 => 65, ProtocolFeature::DecreaseFunctionCallBaseCost => 66, ProtocolFeature::YieldExecution => 67, - ProtocolFeature::CongestionControl => 68, + ProtocolFeature::CongestionControl => 80, // Stateless validation features. // TODO All of the stateless validation features should be collapsed // into a single protocol feature. @@ -235,7 +235,7 @@ impl ProtocolFeature { | ProtocolFeature::NoChunkOnlyProducers | ProtocolFeature::ChangePartialWitnessDataPartsRequired | ProtocolFeature::BiggerCombinedTransactionLimit - | ProtocolFeature::HigherSendingCost => 69, + | ProtocolFeature::HigherSendingCost => 81, // This protocol version is reserved for use in resharding tests. An extra resharding // is simulated on top of the latest shard layout in production. Note that later From 3fa77d4ac6bb8bc93f4f5d2eacb6300a6b496a74 Mon Sep 17 00:00:00 2001 From: Tayfun Elmas Date: Thu, 4 Jul 2024 01:35:54 -0700 Subject: [PATCH 02/10] Fix the hashes in simple chain test due to version changes. --- chain/chain/src/tests/simple_chain.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chain/chain/src/tests/simple_chain.rs b/chain/chain/src/tests/simple_chain.rs index 139c130d8ef..9dc501d5bff 100644 --- a/chain/chain/src/tests/simple_chain.rs +++ b/chain/chain/src/tests/simple_chain.rs @@ -34,7 +34,7 @@ fn build_chain() { if cfg!(feature = "nightly") { insta::assert_snapshot!(hash, @"C3zeKRZubVungxfrSdq379TSCYnuz2YzjEkcJTdm3pU4"); } else { - insta::assert_snapshot!(hash, @"EKBbsbiindwuPwbiARE9LevUffurNhprbSaUjgPKCwEq"); + insta::assert_snapshot!(hash, @"5wim4MwZA1t1Szk8yegHLUAShJw1aaGYirBi1ateuMq8"); } for i in 1..5 { @@ -52,7 +52,7 @@ fn build_chain() { if cfg!(feature = "nightly") { insta::assert_snapshot!(hash, @"EjLaoHRiAdRp2NcDqwbMcAYYxGfcv5R7GuYUNfRpaJvB"); } else { - insta::assert_snapshot!(hash, @"9Ag5sa6bF9knuJKe9XECTKZi7HwtDhCSxCZ8P9AdSvWH"); + insta::assert_snapshot!(hash, @"7G2JFhfgCDREqFLjmGgZa1aKdcyL9kG4mEHz3tHkaa2D"); } } From 4146ce2d17a73577921ba73e7e08ae7c16a353c6 Mon Sep 17 00:00:00 2001 From: Tayfun Elmas Date: Thu, 4 Jul 2024 02:13:25 -0700 Subject: [PATCH 03/10] Update runtime_config_view to pass the test. --- .../jsonrpc-tests/res/genesis_config.json | 2 +- ...es__views__tests__runtime_config_view.snap | 44 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json b/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json index 41a861a0be3..9b3402fcc21 100644 --- a/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json +++ b/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json @@ -1,5 +1,5 @@ { - "protocol_version": 81, + "protocol_version": 69, "genesis_time": "1970-01-01T00:00:00.000000000Z", "chain_id": "sample", "genesis_height": 0, 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 5bba9e355d6..1bd07dae54b 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 @@ -18,7 +18,7 @@ expression: "&view" }, "cost_per_byte": { "send_sir": 17212011, - "send_not_sir": 47683715, + "send_not_sir": 17212011, "execution": 17212011 } }, @@ -35,7 +35,7 @@ expression: "&view" }, "deploy_contract_cost_per_byte": { "send_sir": 6812999, - "send_not_sir": 47683715, + "send_not_sir": 6812999, "execution": 64572944 }, "function_call_cost": { @@ -45,7 +45,7 @@ expression: "&view" }, "function_call_cost_per_byte": { "send_sir": 2235934, - "send_not_sir": 47683715, + "send_not_sir": 2235934, "execution": 2235934 }, "transfer_cost": { @@ -71,7 +71,7 @@ expression: "&view" }, "function_call_cost_per_byte": { "send_sir": 1925331, - "send_not_sir": 47683715, + "send_not_sir": 1925331, "execution": 1925331 } }, @@ -205,8 +205,8 @@ expression: "&view" "max_arguments_length": 4194304, "max_length_returned_data": 4194304, "max_contract_size": 4194304, - "max_transaction_size": 1572864, - "max_receipt_size": 4194304, + "max_transaction_size": 4194304, + "max_receipt_size": 999999999999999, "max_length_storage_key": 2048, "max_length_storage_value": 4194304, "max_promises_per_function_call_action": 1024, @@ -217,7 +217,7 @@ expression: "&view" "account_id_validity_rules_version": 1, "yield_timeout_length_in_blocks": 200, "max_yield_payload_size": 1024, - "per_receipt_storage_proof_size_limit": 4000000 + "per_receipt_storage_proof_size_limit": 999999999999999 } }, "account_creation_config": { @@ -225,22 +225,22 @@ expression: "&view" "registrar_account_id": "registrar" }, "congestion_control_config": { - "max_congestion_incoming_gas": 20000000000000000, - "max_congestion_outgoing_gas": 10000000000000000, - "max_congestion_memory_consumption": 1000000000, - "max_congestion_missed_chunks": 5, - "max_outgoing_gas": 300000000000000000, - "min_outgoing_gas": 1000000000000000, - "allowed_shard_outgoing_gas": 1000000000000000, - "max_tx_gas": 500000000000000, - "min_tx_gas": 20000000000000, - "reject_tx_congestion_threshold": 0.5, - "outgoing_receipts_usual_size_limit": 102400, - "outgoing_receipts_big_size_limit": 4718592 + "max_congestion_incoming_gas": 9223372036854775807, + "max_congestion_outgoing_gas": 9223372036854775807, + "max_congestion_memory_consumption": 9223372036854775807, + "max_congestion_missed_chunks": 9223372036854775807, + "max_outgoing_gas": 9223372036854775807, + "min_outgoing_gas": 9223372036854775807, + "allowed_shard_outgoing_gas": 9223372036854775807, + "max_tx_gas": 9223372036854775807, + "min_tx_gas": 9223372036854775807, + "reject_tx_congestion_threshold": 1.0, + "outgoing_receipts_usual_size_limit": 999999999999999, + "outgoing_receipts_big_size_limit": 999999999999999 }, "witness_config": { - "main_storage_proof_size_soft_limit": 3000000, - "combined_transactions_size_limit": 4194304, - "new_transactions_validation_state_size_soft_limit": 572864 + "main_storage_proof_size_soft_limit": 999999999999999, + "combined_transactions_size_limit": 999999999999999, + "new_transactions_validation_state_size_soft_limit": 999999999999999 } } From e579867e1f730307ce367e82ec729b77e9a41137 Mon Sep 17 00:00:00 2001 From: Tayfun Elmas Date: Thu, 4 Jul 2024 02:53:09 -0700 Subject: [PATCH 04/10] Set STABLE_PROTOOL_VERSION to 81 --- chain/chain/src/tests/simple_chain.rs | 4 +- .../jsonrpc-tests/res/genesis_config.json | 2 +- .../res/runtime_configs/parameters.snap | 46 +++++++++---------- core/primitives-core/src/version.rs | 2 +- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/chain/chain/src/tests/simple_chain.rs b/chain/chain/src/tests/simple_chain.rs index 9dc501d5bff..4f8c3d4b2c6 100644 --- a/chain/chain/src/tests/simple_chain.rs +++ b/chain/chain/src/tests/simple_chain.rs @@ -34,7 +34,7 @@ fn build_chain() { if cfg!(feature = "nightly") { insta::assert_snapshot!(hash, @"C3zeKRZubVungxfrSdq379TSCYnuz2YzjEkcJTdm3pU4"); } else { - insta::assert_snapshot!(hash, @"5wim4MwZA1t1Szk8yegHLUAShJw1aaGYirBi1ateuMq8"); + insta::assert_snapshot!(hash, @"Higa6Tm9M67mEj3kQmTuvKBnt751V58mHdjhMqNzAkGG"); } for i in 1..5 { @@ -52,7 +52,7 @@ fn build_chain() { if cfg!(feature = "nightly") { insta::assert_snapshot!(hash, @"EjLaoHRiAdRp2NcDqwbMcAYYxGfcv5R7GuYUNfRpaJvB"); } else { - insta::assert_snapshot!(hash, @"7G2JFhfgCDREqFLjmGgZa1aKdcyL9kG4mEHz3tHkaa2D"); + insta::assert_snapshot!(hash, @"EBR8vambKzvBK5RBSfEpcAE4MCcFEoDwsPfE2E1xbTZ1"); } } diff --git a/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json b/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json index 9b3402fcc21..41a861a0be3 100644 --- a/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json +++ b/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json @@ -1,5 +1,5 @@ { - "protocol_version": 69, + "protocol_version": 81, "genesis_time": "1970-01-01T00:00:00.000000000Z", "chain_id": "sample", "genesis_height": 0, diff --git a/core/parameters/res/runtime_configs/parameters.snap b/core/parameters/res/runtime_configs/parameters.snap index a4b8114dd1f..fb48e82260f 100644 --- a/core/parameters/res/runtime_configs/parameters.snap +++ b/core/parameters/res/runtime_configs/parameters.snap @@ -4,12 +4,12 @@ description: THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. --- burnt_gas_reward 3 / 10 pessimistic_gas_price_inflation 103 / 100 -main_storage_proof_size_soft_limit 999_999_999_999_999 -per_receipt_storage_proof_size_limit 999_999_999_999_999 -new_transactions_validation_state_size_soft_limit 999_999_999_999_999 -combined_transactions_size_limit 999_999_999_999_999 -outgoing_receipts_usual_size_limit 999_999_999_999_999 -outgoing_receipts_big_size_limit 999_999_999_999_999 +main_storage_proof_size_soft_limit 3_000_000 +per_receipt_storage_proof_size_limit 4_000_000 +new_transactions_validation_state_size_soft_limit 572_864 +combined_transactions_size_limit 4_194_304 +outgoing_receipts_usual_size_limit 102_400 +outgoing_receipts_big_size_limit 4_718_592 min_allowed_top_level_account_length 65 registrar_account_id registrar storage_amount_per_byte 10000000000000000000 @@ -25,7 +25,7 @@ data_receipt_creation_base - execution: 36_486_732_312 data_receipt_creation_per_byte - send_sir: 17_212_011 -- send_not_sir: 17_212_011 +- send_not_sir: 47_683_715 - execution: 17_212_011 action_create_account - send_sir: 3_850_000_000_000 @@ -41,7 +41,7 @@ action_deploy_contract - execution: 184_765_750_000 action_deploy_contract_per_byte - send_sir: 6_812_999 -- send_not_sir: 6_812_999 +- send_not_sir: 47_683_715 - execution: 64_572_944 action_function_call - send_sir: 200_000_000_000 @@ -49,7 +49,7 @@ action_function_call - execution: 780_000_000_000 action_function_call_per_byte - send_sir: 2_235_934 -- send_not_sir: 2_235_934 +- send_not_sir: 47_683_715 - execution: 2_235_934 action_transfer - send_sir: 115_123_062_500 @@ -69,7 +69,7 @@ action_add_function_call_key - execution: 102_217_625_000 action_add_function_call_key_per_byte - send_sir: 1_925_331 -- send_not_sir: 1_925_331 +- send_not_sir: 47_683_715 - execution: 1_925_331 action_delete_key - send_sir: 94_946_625_000 @@ -145,7 +145,7 @@ wasm_alt_bn128_g1_sum_element 5_000_000_000 wasm_yield_create_base 153_411_779_276 wasm_yield_create_byte 15_643_988 wasm_yield_resume_base 1_195_627_285_210 -wasm_yield_resume_byte 17_212_011 +wasm_yield_resume_byte 47_683_715 max_gas_burnt 300_000_000_000_000 max_gas_burnt_view 300_000_000_000_000 max_stack_height 262_144 @@ -164,8 +164,8 @@ max_length_method_name 256 max_arguments_length 4_194_304 max_length_returned_data 4_194_304 max_contract_size 4_194_304 -max_transaction_size 4_194_304 -max_receipt_size 999_999_999_999_999 +max_transaction_size 1_572_864 +max_receipt_size 4_194_304 max_length_storage_key 2_048 max_length_storage_value 4_194_304 max_promises_per_function_call_action 1_024 @@ -187,13 +187,13 @@ function_call_weight true vm_kind NearVm eth_implicit_accounts false yield_resume true -max_congestion_incoming_gas 9_223_372_036_854_775_807 -max_congestion_outgoing_gas 9_223_372_036_854_775_807 -max_congestion_memory_consumption 9_223_372_036_854_775_807 -max_congestion_missed_chunks 9_223_372_036_854_775_807 -max_outgoing_gas 9_223_372_036_854_775_807 -min_outgoing_gas 9_223_372_036_854_775_807 -allowed_shard_outgoing_gas 9_223_372_036_854_775_807 -max_tx_gas 9_223_372_036_854_775_807 -min_tx_gas 9_223_372_036_854_775_807 -reject_tx_congestion_threshold 1 / 1 +max_congestion_incoming_gas 20_000_000_000_000_000 +max_congestion_outgoing_gas 10_000_000_000_000_000 +max_congestion_memory_consumption 1_000_000_000 +max_congestion_missed_chunks 5 +max_outgoing_gas 300_000_000_000_000_000 +min_outgoing_gas 1_000_000_000_000_000 +allowed_shard_outgoing_gas 1_000_000_000_000_000 +max_tx_gas 500_000_000_000_000 +min_tx_gas 20_000_000_000_000 +reject_tx_congestion_threshold 50 / 100 diff --git a/core/primitives-core/src/version.rs b/core/primitives-core/src/version.rs index 3ad2f5697f9..ec99873e369 100644 --- a/core/primitives-core/src/version.rs +++ b/core/primitives-core/src/version.rs @@ -266,7 +266,7 @@ impl ProtocolFeature { /// Current protocol version used on the mainnet. /// Some features (e. g. FixStorageUsage) require that there is at least one epoch with exactly /// the corresponding version -const STABLE_PROTOCOL_VERSION: ProtocolVersion = 69; +const STABLE_PROTOCOL_VERSION: ProtocolVersion = 81; /// Largest protocol version supported by the current binary. pub const PROTOCOL_VERSION: ProtocolVersion = if cfg!(feature = "statelessnet_protocol") { From 8d6ef475a8b27f33867508b7e226d52bd47f3823 Mon Sep 17 00:00:00 2001 From: Tayfun Elmas Date: Thu, 4 Jul 2024 02:58:00 -0700 Subject: [PATCH 05/10] Update snapshot files for runtime_config_view test --- ...es__views__tests__runtime_config_view.snap | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) 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 1bd07dae54b..5bba9e355d6 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 @@ -18,7 +18,7 @@ expression: "&view" }, "cost_per_byte": { "send_sir": 17212011, - "send_not_sir": 17212011, + "send_not_sir": 47683715, "execution": 17212011 } }, @@ -35,7 +35,7 @@ expression: "&view" }, "deploy_contract_cost_per_byte": { "send_sir": 6812999, - "send_not_sir": 6812999, + "send_not_sir": 47683715, "execution": 64572944 }, "function_call_cost": { @@ -45,7 +45,7 @@ expression: "&view" }, "function_call_cost_per_byte": { "send_sir": 2235934, - "send_not_sir": 2235934, + "send_not_sir": 47683715, "execution": 2235934 }, "transfer_cost": { @@ -71,7 +71,7 @@ expression: "&view" }, "function_call_cost_per_byte": { "send_sir": 1925331, - "send_not_sir": 1925331, + "send_not_sir": 47683715, "execution": 1925331 } }, @@ -205,8 +205,8 @@ expression: "&view" "max_arguments_length": 4194304, "max_length_returned_data": 4194304, "max_contract_size": 4194304, - "max_transaction_size": 4194304, - "max_receipt_size": 999999999999999, + "max_transaction_size": 1572864, + "max_receipt_size": 4194304, "max_length_storage_key": 2048, "max_length_storage_value": 4194304, "max_promises_per_function_call_action": 1024, @@ -217,7 +217,7 @@ expression: "&view" "account_id_validity_rules_version": 1, "yield_timeout_length_in_blocks": 200, "max_yield_payload_size": 1024, - "per_receipt_storage_proof_size_limit": 999999999999999 + "per_receipt_storage_proof_size_limit": 4000000 } }, "account_creation_config": { @@ -225,22 +225,22 @@ expression: "&view" "registrar_account_id": "registrar" }, "congestion_control_config": { - "max_congestion_incoming_gas": 9223372036854775807, - "max_congestion_outgoing_gas": 9223372036854775807, - "max_congestion_memory_consumption": 9223372036854775807, - "max_congestion_missed_chunks": 9223372036854775807, - "max_outgoing_gas": 9223372036854775807, - "min_outgoing_gas": 9223372036854775807, - "allowed_shard_outgoing_gas": 9223372036854775807, - "max_tx_gas": 9223372036854775807, - "min_tx_gas": 9223372036854775807, - "reject_tx_congestion_threshold": 1.0, - "outgoing_receipts_usual_size_limit": 999999999999999, - "outgoing_receipts_big_size_limit": 999999999999999 + "max_congestion_incoming_gas": 20000000000000000, + "max_congestion_outgoing_gas": 10000000000000000, + "max_congestion_memory_consumption": 1000000000, + "max_congestion_missed_chunks": 5, + "max_outgoing_gas": 300000000000000000, + "min_outgoing_gas": 1000000000000000, + "allowed_shard_outgoing_gas": 1000000000000000, + "max_tx_gas": 500000000000000, + "min_tx_gas": 20000000000000, + "reject_tx_congestion_threshold": 0.5, + "outgoing_receipts_usual_size_limit": 102400, + "outgoing_receipts_big_size_limit": 4718592 }, "witness_config": { - "main_storage_proof_size_soft_limit": 999999999999999, - "combined_transactions_size_limit": 999999999999999, - "new_transactions_validation_state_size_soft_limit": 999999999999999 + "main_storage_proof_size_soft_limit": 3000000, + "combined_transactions_size_limit": 4194304, + "new_transactions_validation_state_size_soft_limit": 572864 } } From 981e7cdf7431e735463f731fed0de086b253b020 Mon Sep 17 00:00:00 2001 From: Tayfun Elmas Date: Thu, 4 Jul 2024 03:59:09 -0700 Subject: [PATCH 06/10] Revert stable version back to 69 --- chain/chain/src/tests/simple_chain.rs | 4 +- .../jsonrpc-tests/res/genesis_config.json | 2 +- .../res/runtime_configs/parameters.snap | 46 +++++++++---------- core/primitives-core/src/version.rs | 2 +- ...es__views__tests__runtime_config_view.snap | 44 +++++++++--------- 5 files changed, 49 insertions(+), 49 deletions(-) diff --git a/chain/chain/src/tests/simple_chain.rs b/chain/chain/src/tests/simple_chain.rs index 4f8c3d4b2c6..9dc501d5bff 100644 --- a/chain/chain/src/tests/simple_chain.rs +++ b/chain/chain/src/tests/simple_chain.rs @@ -34,7 +34,7 @@ fn build_chain() { if cfg!(feature = "nightly") { insta::assert_snapshot!(hash, @"C3zeKRZubVungxfrSdq379TSCYnuz2YzjEkcJTdm3pU4"); } else { - insta::assert_snapshot!(hash, @"Higa6Tm9M67mEj3kQmTuvKBnt751V58mHdjhMqNzAkGG"); + insta::assert_snapshot!(hash, @"5wim4MwZA1t1Szk8yegHLUAShJw1aaGYirBi1ateuMq8"); } for i in 1..5 { @@ -52,7 +52,7 @@ fn build_chain() { if cfg!(feature = "nightly") { insta::assert_snapshot!(hash, @"EjLaoHRiAdRp2NcDqwbMcAYYxGfcv5R7GuYUNfRpaJvB"); } else { - insta::assert_snapshot!(hash, @"EBR8vambKzvBK5RBSfEpcAE4MCcFEoDwsPfE2E1xbTZ1"); + insta::assert_snapshot!(hash, @"7G2JFhfgCDREqFLjmGgZa1aKdcyL9kG4mEHz3tHkaa2D"); } } diff --git a/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json b/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json index 41a861a0be3..9b3402fcc21 100644 --- a/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json +++ b/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json @@ -1,5 +1,5 @@ { - "protocol_version": 81, + "protocol_version": 69, "genesis_time": "1970-01-01T00:00:00.000000000Z", "chain_id": "sample", "genesis_height": 0, diff --git a/core/parameters/res/runtime_configs/parameters.snap b/core/parameters/res/runtime_configs/parameters.snap index fb48e82260f..a4b8114dd1f 100644 --- a/core/parameters/res/runtime_configs/parameters.snap +++ b/core/parameters/res/runtime_configs/parameters.snap @@ -4,12 +4,12 @@ description: THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. --- burnt_gas_reward 3 / 10 pessimistic_gas_price_inflation 103 / 100 -main_storage_proof_size_soft_limit 3_000_000 -per_receipt_storage_proof_size_limit 4_000_000 -new_transactions_validation_state_size_soft_limit 572_864 -combined_transactions_size_limit 4_194_304 -outgoing_receipts_usual_size_limit 102_400 -outgoing_receipts_big_size_limit 4_718_592 +main_storage_proof_size_soft_limit 999_999_999_999_999 +per_receipt_storage_proof_size_limit 999_999_999_999_999 +new_transactions_validation_state_size_soft_limit 999_999_999_999_999 +combined_transactions_size_limit 999_999_999_999_999 +outgoing_receipts_usual_size_limit 999_999_999_999_999 +outgoing_receipts_big_size_limit 999_999_999_999_999 min_allowed_top_level_account_length 65 registrar_account_id registrar storage_amount_per_byte 10000000000000000000 @@ -25,7 +25,7 @@ data_receipt_creation_base - execution: 36_486_732_312 data_receipt_creation_per_byte - send_sir: 17_212_011 -- send_not_sir: 47_683_715 +- send_not_sir: 17_212_011 - execution: 17_212_011 action_create_account - send_sir: 3_850_000_000_000 @@ -41,7 +41,7 @@ action_deploy_contract - execution: 184_765_750_000 action_deploy_contract_per_byte - send_sir: 6_812_999 -- send_not_sir: 47_683_715 +- send_not_sir: 6_812_999 - execution: 64_572_944 action_function_call - send_sir: 200_000_000_000 @@ -49,7 +49,7 @@ action_function_call - execution: 780_000_000_000 action_function_call_per_byte - send_sir: 2_235_934 -- send_not_sir: 47_683_715 +- send_not_sir: 2_235_934 - execution: 2_235_934 action_transfer - send_sir: 115_123_062_500 @@ -69,7 +69,7 @@ action_add_function_call_key - execution: 102_217_625_000 action_add_function_call_key_per_byte - send_sir: 1_925_331 -- send_not_sir: 47_683_715 +- send_not_sir: 1_925_331 - execution: 1_925_331 action_delete_key - send_sir: 94_946_625_000 @@ -145,7 +145,7 @@ wasm_alt_bn128_g1_sum_element 5_000_000_000 wasm_yield_create_base 153_411_779_276 wasm_yield_create_byte 15_643_988 wasm_yield_resume_base 1_195_627_285_210 -wasm_yield_resume_byte 47_683_715 +wasm_yield_resume_byte 17_212_011 max_gas_burnt 300_000_000_000_000 max_gas_burnt_view 300_000_000_000_000 max_stack_height 262_144 @@ -164,8 +164,8 @@ max_length_method_name 256 max_arguments_length 4_194_304 max_length_returned_data 4_194_304 max_contract_size 4_194_304 -max_transaction_size 1_572_864 -max_receipt_size 4_194_304 +max_transaction_size 4_194_304 +max_receipt_size 999_999_999_999_999 max_length_storage_key 2_048 max_length_storage_value 4_194_304 max_promises_per_function_call_action 1_024 @@ -187,13 +187,13 @@ function_call_weight true vm_kind NearVm eth_implicit_accounts false yield_resume true -max_congestion_incoming_gas 20_000_000_000_000_000 -max_congestion_outgoing_gas 10_000_000_000_000_000 -max_congestion_memory_consumption 1_000_000_000 -max_congestion_missed_chunks 5 -max_outgoing_gas 300_000_000_000_000_000 -min_outgoing_gas 1_000_000_000_000_000 -allowed_shard_outgoing_gas 1_000_000_000_000_000 -max_tx_gas 500_000_000_000_000 -min_tx_gas 20_000_000_000_000 -reject_tx_congestion_threshold 50 / 100 +max_congestion_incoming_gas 9_223_372_036_854_775_807 +max_congestion_outgoing_gas 9_223_372_036_854_775_807 +max_congestion_memory_consumption 9_223_372_036_854_775_807 +max_congestion_missed_chunks 9_223_372_036_854_775_807 +max_outgoing_gas 9_223_372_036_854_775_807 +min_outgoing_gas 9_223_372_036_854_775_807 +allowed_shard_outgoing_gas 9_223_372_036_854_775_807 +max_tx_gas 9_223_372_036_854_775_807 +min_tx_gas 9_223_372_036_854_775_807 +reject_tx_congestion_threshold 1 / 1 diff --git a/core/primitives-core/src/version.rs b/core/primitives-core/src/version.rs index ec99873e369..3ad2f5697f9 100644 --- a/core/primitives-core/src/version.rs +++ b/core/primitives-core/src/version.rs @@ -266,7 +266,7 @@ impl ProtocolFeature { /// Current protocol version used on the mainnet. /// Some features (e. g. FixStorageUsage) require that there is at least one epoch with exactly /// the corresponding version -const STABLE_PROTOCOL_VERSION: ProtocolVersion = 81; +const STABLE_PROTOCOL_VERSION: ProtocolVersion = 69; /// Largest protocol version supported by the current binary. pub const PROTOCOL_VERSION: ProtocolVersion = if cfg!(feature = "statelessnet_protocol") { 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 5bba9e355d6..1bd07dae54b 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 @@ -18,7 +18,7 @@ expression: "&view" }, "cost_per_byte": { "send_sir": 17212011, - "send_not_sir": 47683715, + "send_not_sir": 17212011, "execution": 17212011 } }, @@ -35,7 +35,7 @@ expression: "&view" }, "deploy_contract_cost_per_byte": { "send_sir": 6812999, - "send_not_sir": 47683715, + "send_not_sir": 6812999, "execution": 64572944 }, "function_call_cost": { @@ -45,7 +45,7 @@ expression: "&view" }, "function_call_cost_per_byte": { "send_sir": 2235934, - "send_not_sir": 47683715, + "send_not_sir": 2235934, "execution": 2235934 }, "transfer_cost": { @@ -71,7 +71,7 @@ expression: "&view" }, "function_call_cost_per_byte": { "send_sir": 1925331, - "send_not_sir": 47683715, + "send_not_sir": 1925331, "execution": 1925331 } }, @@ -205,8 +205,8 @@ expression: "&view" "max_arguments_length": 4194304, "max_length_returned_data": 4194304, "max_contract_size": 4194304, - "max_transaction_size": 1572864, - "max_receipt_size": 4194304, + "max_transaction_size": 4194304, + "max_receipt_size": 999999999999999, "max_length_storage_key": 2048, "max_length_storage_value": 4194304, "max_promises_per_function_call_action": 1024, @@ -217,7 +217,7 @@ expression: "&view" "account_id_validity_rules_version": 1, "yield_timeout_length_in_blocks": 200, "max_yield_payload_size": 1024, - "per_receipt_storage_proof_size_limit": 4000000 + "per_receipt_storage_proof_size_limit": 999999999999999 } }, "account_creation_config": { @@ -225,22 +225,22 @@ expression: "&view" "registrar_account_id": "registrar" }, "congestion_control_config": { - "max_congestion_incoming_gas": 20000000000000000, - "max_congestion_outgoing_gas": 10000000000000000, - "max_congestion_memory_consumption": 1000000000, - "max_congestion_missed_chunks": 5, - "max_outgoing_gas": 300000000000000000, - "min_outgoing_gas": 1000000000000000, - "allowed_shard_outgoing_gas": 1000000000000000, - "max_tx_gas": 500000000000000, - "min_tx_gas": 20000000000000, - "reject_tx_congestion_threshold": 0.5, - "outgoing_receipts_usual_size_limit": 102400, - "outgoing_receipts_big_size_limit": 4718592 + "max_congestion_incoming_gas": 9223372036854775807, + "max_congestion_outgoing_gas": 9223372036854775807, + "max_congestion_memory_consumption": 9223372036854775807, + "max_congestion_missed_chunks": 9223372036854775807, + "max_outgoing_gas": 9223372036854775807, + "min_outgoing_gas": 9223372036854775807, + "allowed_shard_outgoing_gas": 9223372036854775807, + "max_tx_gas": 9223372036854775807, + "min_tx_gas": 9223372036854775807, + "reject_tx_congestion_threshold": 1.0, + "outgoing_receipts_usual_size_limit": 999999999999999, + "outgoing_receipts_big_size_limit": 999999999999999 }, "witness_config": { - "main_storage_proof_size_soft_limit": 3000000, - "combined_transactions_size_limit": 4194304, - "new_transactions_validation_state_size_soft_limit": 572864 + "main_storage_proof_size_soft_limit": 999999999999999, + "combined_transactions_size_limit": 999999999999999, + "new_transactions_validation_state_size_soft_limit": 999999999999999 } } From a9024bd3c90d89a81376e632bb0d15f365a6fdca Mon Sep 17 00:00:00 2001 From: Tayfun Elmas Date: Thu, 4 Jul 2024 04:47:45 -0700 Subject: [PATCH 07/10] Fix param file --- ...ers__view__tests__runtime_config_view.snap | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) 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 45b8e7e432a..3d2d144fd69 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 @@ -18,7 +18,7 @@ expression: "&view" }, "cost_per_byte": { "send_sir": 17212011, - "send_not_sir": 47683715, + "send_not_sir": 17212011, "execution": 17212011 } }, @@ -35,7 +35,7 @@ expression: "&view" }, "deploy_contract_cost_per_byte": { "send_sir": 6812999, - "send_not_sir": 47683715, + "send_not_sir": 6812999, "execution": 64572944 }, "function_call_cost": { @@ -45,7 +45,7 @@ expression: "&view" }, "function_call_cost_per_byte": { "send_sir": 2235934, - "send_not_sir": 47683715, + "send_not_sir": 2235934, "execution": 2235934 }, "transfer_cost": { @@ -71,7 +71,7 @@ expression: "&view" }, "function_call_cost_per_byte": { "send_sir": 1925331, - "send_not_sir": 47683715, + "send_not_sir": 1925331, "execution": 1925331 } }, @@ -205,8 +205,8 @@ expression: "&view" "max_arguments_length": 4194304, "max_length_returned_data": 4194304, "max_contract_size": 4194304, - "max_transaction_size": 1572864, - "max_receipt_size": 4194304, + "max_transaction_size": 4194304, + "max_receipt_size": 999999999999999, "max_length_storage_key": 2048, "max_length_storage_value": 4194304, "max_promises_per_function_call_action": 1024, @@ -217,7 +217,7 @@ expression: "&view" "account_id_validity_rules_version": 1, "yield_timeout_length_in_blocks": 200, "max_yield_payload_size": 1024, - "per_receipt_storage_proof_size_limit": 4000000 + "per_receipt_storage_proof_size_limit": 999999999999999 } }, "account_creation_config": { @@ -225,22 +225,22 @@ expression: "&view" "registrar_account_id": "registrar" }, "congestion_control_config": { - "max_congestion_incoming_gas": 20000000000000000, - "max_congestion_outgoing_gas": 10000000000000000, - "max_congestion_memory_consumption": 1000000000, - "max_congestion_missed_chunks": 5, - "max_outgoing_gas": 300000000000000000, - "min_outgoing_gas": 1000000000000000, - "allowed_shard_outgoing_gas": 1000000000000000, - "max_tx_gas": 500000000000000, - "min_tx_gas": 20000000000000, - "reject_tx_congestion_threshold": 0.5, - "outgoing_receipts_usual_size_limit": 102400, - "outgoing_receipts_big_size_limit": 4718592 + "max_congestion_incoming_gas": 9223372036854775807, + "max_congestion_outgoing_gas": 9223372036854775807, + "max_congestion_memory_consumption": 9223372036854775807, + "max_congestion_missed_chunks": 9223372036854775807, + "max_outgoing_gas": 9223372036854775807, + "min_outgoing_gas": 9223372036854775807, + "allowed_shard_outgoing_gas": 9223372036854775807, + "max_tx_gas": 9223372036854775807, + "min_tx_gas": 9223372036854775807, + "reject_tx_congestion_threshold": 1.0, + "outgoing_receipts_usual_size_limit": 999999999999999, + "outgoing_receipts_big_size_limit": 999999999999999 }, "witness_config": { - "main_storage_proof_size_soft_limit": 3000000, - "combined_transactions_size_limit": 4194304, - "new_transactions_validation_state_size_soft_limit": 572864 + "main_storage_proof_size_soft_limit": 999999999999999, + "combined_transactions_size_limit": 999999999999999, + "new_transactions_validation_state_size_soft_limit": 999999999999999 } } From 88f994731b6bf0efecfd391142b556596be637ce Mon Sep 17 00:00:00 2001 From: Tayfun Elmas Date: Thu, 4 Jul 2024 05:33:09 -0700 Subject: [PATCH 08/10] Fix another test. --- ...nity_checks__receipts_gas_profile.snap.new | 501 ++++++++++++++++++ 1 file changed, 501 insertions(+) create mode 100644 integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap.new diff --git a/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap.new b/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap.new new file mode 100644 index 00000000000..7b6f5dfdb70 --- /dev/null +++ b/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap.new @@ -0,0 +1,501 @@ +--- +source: integration-tests/src/tests/runtime/sanity_checks.rs +assertion_line: 152 +expression: receipts_gas_profile +--- +[ + [ + CostGasUsed { + cost_category: "ACTION_COST", + cost: "ADD_FULL_ACCESS_KEY", + gas_used: 101765125000, + }, + CostGasUsed { + cost_category: "ACTION_COST", + cost: "ADD_FUNCTION_CALL_KEY_BASE", + gas_used: 102217625000, + }, + CostGasUsed { + cost_category: "ACTION_COST", + cost: "ADD_FUNCTION_CALL_KEY_BYTE", + gas_used: 9626655, + }, + CostGasUsed { + cost_category: "ACTION_COST", + cost: "CREATE_ACCOUNT", + gas_used: 7700000000000, + }, + CostGasUsed { + cost_category: "ACTION_COST", + cost: "DELETE_ACCOUNT", + gas_used: 147489000000, + }, + CostGasUsed { + cost_category: "ACTION_COST", + cost: "DELETE_KEY", + gas_used: 94946625000, + }, + CostGasUsed { + cost_category: "ACTION_COST", + cost: "DEPLOY_CONTRACT_BASE", + gas_used: 184765750000, + }, + CostGasUsed { + cost_category: "ACTION_COST", + cost: "DEPLOY_CONTRACT_BYTE", + gas_used: 231641966, + }, + CostGasUsed { + cost_category: "ACTION_COST", + cost: "FUNCTION_CALL_BASE", + gas_used: 1800000000000, + }, + CostGasUsed { + cost_category: "ACTION_COST", + cost: "FUNCTION_CALL_BYTE", + gas_used: 207941862, + }, + CostGasUsed { + cost_category: "ACTION_COST", + cost: "NEW_ACTION_RECEIPT", + gas_used: 1480548358496, + }, + CostGasUsed { + cost_category: "ACTION_COST", + cost: "STAKE", + gas_used: 141715687500, + }, + CostGasUsed { + cost_category: "ACTION_COST", + cost: "TRANSFER", + gas_used: 230246125000, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "ALT_BN128_G1_MULTIEXP_BASE", + gas_used: 713000000000, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "ALT_BN128_G1_MULTIEXP_ELEMENT", + gas_used: 320000000000, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "ALT_BN128_G1_SUM_BASE", + gas_used: 3000000000, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "ALT_BN128_G1_SUM_ELEMENT", + gas_used: 5000000000, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "ALT_BN128_PAIRING_CHECK_BASE", + gas_used: 9686000000000, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "ALT_BN128_PAIRING_CHECK_ELEMENT", + gas_used: 5102000000000, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "BASE", + gas_used: 17209927215, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BASE", + gas_used: 35445963, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BYTES", + gas_used: 0, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "LOG_BASE", + gas_used: 7086626100, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "LOG_BYTE", + gas_used: 131987910, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "PROMISE_AND_BASE", + gas_used: 1465013400, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "PROMISE_AND_PER_PROMISE", + gas_used: 87234816, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "PROMISE_RETURN", + gas_used: 560152386, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "READ_CACHED_TRIE_NODE", + gas_used: 4560000000, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "READ_MEMORY_BASE", + gas_used: 182690424000, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "READ_MEMORY_BYTE", + gas_used: 4744063584, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "READ_REGISTER_BASE", + gas_used: 7551495558, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "READ_REGISTER_BYTE", + gas_used: 25034748, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "RIPEMD160_BASE", + gas_used: 853675086, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "RIPEMD160_BLOCK", + gas_used: 680107584, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "SHA256_BASE", + gas_used: 4540970250, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "SHA256_BYTE", + gas_used: 120586755, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "STORAGE_HAS_KEY_BASE", + gas_used: 108079793250, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "STORAGE_HAS_KEY_BYTE", + gas_used: 277117605, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "STORAGE_READ_BASE", + gas_used: 112713691500, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "STORAGE_READ_KEY_BYTE", + gas_used: 278572797, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "STORAGE_READ_VALUE_BYTE", + gas_used: 28055025, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "STORAGE_REMOVE_BASE", + gas_used: 106946061000, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "STORAGE_REMOVE_KEY_BYTE", + gas_used: 343983456, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "STORAGE_REMOVE_RET_VALUE_BYTE", + gas_used: 57657780, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "STORAGE_WRITE_BASE", + gas_used: 128393472000, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "STORAGE_WRITE_EVICTED_BYTE", + gas_used: 160586535, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "STORAGE_WRITE_KEY_BYTE", + gas_used: 281931468, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "STORAGE_WRITE_VALUE_BYTE", + gas_used: 310185390, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "TOUCHING_TRIE_NODE", + gas_used: 32203911852, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "UTF16_DECODING_BASE", + gas_used: 3543313050, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "UTF16_DECODING_BYTE", + gas_used: 1635774930, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "UTF8_DECODING_BASE", + gas_used: 46676685915, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "UTF8_DECODING_BYTE", + gas_used: 98262621423, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "VALIDATOR_STAKE_BASE", + gas_used: 911834726400, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "VALIDATOR_TOTAL_STAKE_BASE", + gas_used: 911834726400, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WASM_INSTRUCTION", + gas_used: 0, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WRITE_MEMORY_BASE", + gas_used: 19626564027, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WRITE_MEMORY_BYTE", + gas_used: 866159496, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WRITE_REGISTER_BASE", + gas_used: 37251792318, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WRITE_REGISTER_BYTE", + gas_used: 1904583564, + }, + ], + [ + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "BASE", + gas_used: 264768111, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BASE", + gas_used: 35445963, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BYTES", + gas_used: 0, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WASM_INSTRUCTION", + gas_used: 0, + }, + ], + [], + [ + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "BASE", + gas_used: 264768111, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BASE", + gas_used: 35445963, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BYTES", + gas_used: 0, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "READ_MEMORY_BASE", + gas_used: 2609863200, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "READ_MEMORY_BYTE", + gas_used: 11403999, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "UTF8_DECODING_BASE", + gas_used: 3111779061, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "UTF8_DECODING_BYTE", + gas_used: 874741437, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WASM_INSTRUCTION", + gas_used: 0, + }, + ], + [], + [ + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BASE", + gas_used: 35445963, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BYTES", + gas_used: 0, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WASM_INSTRUCTION", + gas_used: 0, + }, + ], + [], + [ + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BASE", + gas_used: 35445963, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BYTES", + gas_used: 0, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WASM_INSTRUCTION", + gas_used: 0, + }, + ], + [], + [ + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BASE", + gas_used: 35445963, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BYTES", + gas_used: 0, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WASM_INSTRUCTION", + gas_used: 0, + }, + ], + [], + [], + [], + [], + [], + [ + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BASE", + gas_used: 70891926, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BYTES", + gas_used: 0, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WASM_INSTRUCTION", + gas_used: 0, + }, + ], + [], + [], + [], + [], + [ + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BASE", + gas_used: 35445963, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BYTES", + gas_used: 0, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WASM_INSTRUCTION", + gas_used: 0, + }, + ], + [], + [ + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "BASE", + gas_used: 529536222, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BASE", + gas_used: 35445963, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "CONTRACT_LOADING_BYTES", + gas_used: 0, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WASM_INSTRUCTION", + gas_used: 0, + }, + CostGasUsed { + cost_category: "WASM_HOST_COST", + cost: "WRITE_REGISTER_BASE", + gas_used: 2865522486, + }, + ], + [], + [], +] From d6888b10ec0008f137b1e8960bf64aa225333ce6 Mon Sep 17 00:00:00 2001 From: Tayfun Elmas Date: Thu, 4 Jul 2024 06:07:48 -0700 Subject: [PATCH 09/10] Revert back to 81, there are many failuires., --- chain/chain/src/tests/simple_chain.rs | 4 +- .../jsonrpc-tests/res/genesis_config.json | 2 +- .../res/runtime_configs/parameters.snap | 46 +- core/primitives-core/src/version.rs | 2 +- ...es__views__tests__runtime_config_view.snap | 44 +- ...nity_checks__receipts_gas_profile.snap.new | 501 ------------------ 6 files changed, 49 insertions(+), 550 deletions(-) delete mode 100644 integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap.new diff --git a/chain/chain/src/tests/simple_chain.rs b/chain/chain/src/tests/simple_chain.rs index 9dc501d5bff..4f8c3d4b2c6 100644 --- a/chain/chain/src/tests/simple_chain.rs +++ b/chain/chain/src/tests/simple_chain.rs @@ -34,7 +34,7 @@ fn build_chain() { if cfg!(feature = "nightly") { insta::assert_snapshot!(hash, @"C3zeKRZubVungxfrSdq379TSCYnuz2YzjEkcJTdm3pU4"); } else { - insta::assert_snapshot!(hash, @"5wim4MwZA1t1Szk8yegHLUAShJw1aaGYirBi1ateuMq8"); + insta::assert_snapshot!(hash, @"Higa6Tm9M67mEj3kQmTuvKBnt751V58mHdjhMqNzAkGG"); } for i in 1..5 { @@ -52,7 +52,7 @@ fn build_chain() { if cfg!(feature = "nightly") { insta::assert_snapshot!(hash, @"EjLaoHRiAdRp2NcDqwbMcAYYxGfcv5R7GuYUNfRpaJvB"); } else { - insta::assert_snapshot!(hash, @"7G2JFhfgCDREqFLjmGgZa1aKdcyL9kG4mEHz3tHkaa2D"); + insta::assert_snapshot!(hash, @"EBR8vambKzvBK5RBSfEpcAE4MCcFEoDwsPfE2E1xbTZ1"); } } diff --git a/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json b/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json index 9b3402fcc21..41a861a0be3 100644 --- a/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json +++ b/chain/jsonrpc/jsonrpc-tests/res/genesis_config.json @@ -1,5 +1,5 @@ { - "protocol_version": 69, + "protocol_version": 81, "genesis_time": "1970-01-01T00:00:00.000000000Z", "chain_id": "sample", "genesis_height": 0, diff --git a/core/parameters/res/runtime_configs/parameters.snap b/core/parameters/res/runtime_configs/parameters.snap index a4b8114dd1f..fb48e82260f 100644 --- a/core/parameters/res/runtime_configs/parameters.snap +++ b/core/parameters/res/runtime_configs/parameters.snap @@ -4,12 +4,12 @@ description: THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. --- burnt_gas_reward 3 / 10 pessimistic_gas_price_inflation 103 / 100 -main_storage_proof_size_soft_limit 999_999_999_999_999 -per_receipt_storage_proof_size_limit 999_999_999_999_999 -new_transactions_validation_state_size_soft_limit 999_999_999_999_999 -combined_transactions_size_limit 999_999_999_999_999 -outgoing_receipts_usual_size_limit 999_999_999_999_999 -outgoing_receipts_big_size_limit 999_999_999_999_999 +main_storage_proof_size_soft_limit 3_000_000 +per_receipt_storage_proof_size_limit 4_000_000 +new_transactions_validation_state_size_soft_limit 572_864 +combined_transactions_size_limit 4_194_304 +outgoing_receipts_usual_size_limit 102_400 +outgoing_receipts_big_size_limit 4_718_592 min_allowed_top_level_account_length 65 registrar_account_id registrar storage_amount_per_byte 10000000000000000000 @@ -25,7 +25,7 @@ data_receipt_creation_base - execution: 36_486_732_312 data_receipt_creation_per_byte - send_sir: 17_212_011 -- send_not_sir: 17_212_011 +- send_not_sir: 47_683_715 - execution: 17_212_011 action_create_account - send_sir: 3_850_000_000_000 @@ -41,7 +41,7 @@ action_deploy_contract - execution: 184_765_750_000 action_deploy_contract_per_byte - send_sir: 6_812_999 -- send_not_sir: 6_812_999 +- send_not_sir: 47_683_715 - execution: 64_572_944 action_function_call - send_sir: 200_000_000_000 @@ -49,7 +49,7 @@ action_function_call - execution: 780_000_000_000 action_function_call_per_byte - send_sir: 2_235_934 -- send_not_sir: 2_235_934 +- send_not_sir: 47_683_715 - execution: 2_235_934 action_transfer - send_sir: 115_123_062_500 @@ -69,7 +69,7 @@ action_add_function_call_key - execution: 102_217_625_000 action_add_function_call_key_per_byte - send_sir: 1_925_331 -- send_not_sir: 1_925_331 +- send_not_sir: 47_683_715 - execution: 1_925_331 action_delete_key - send_sir: 94_946_625_000 @@ -145,7 +145,7 @@ wasm_alt_bn128_g1_sum_element 5_000_000_000 wasm_yield_create_base 153_411_779_276 wasm_yield_create_byte 15_643_988 wasm_yield_resume_base 1_195_627_285_210 -wasm_yield_resume_byte 17_212_011 +wasm_yield_resume_byte 47_683_715 max_gas_burnt 300_000_000_000_000 max_gas_burnt_view 300_000_000_000_000 max_stack_height 262_144 @@ -164,8 +164,8 @@ max_length_method_name 256 max_arguments_length 4_194_304 max_length_returned_data 4_194_304 max_contract_size 4_194_304 -max_transaction_size 4_194_304 -max_receipt_size 999_999_999_999_999 +max_transaction_size 1_572_864 +max_receipt_size 4_194_304 max_length_storage_key 2_048 max_length_storage_value 4_194_304 max_promises_per_function_call_action 1_024 @@ -187,13 +187,13 @@ function_call_weight true vm_kind NearVm eth_implicit_accounts false yield_resume true -max_congestion_incoming_gas 9_223_372_036_854_775_807 -max_congestion_outgoing_gas 9_223_372_036_854_775_807 -max_congestion_memory_consumption 9_223_372_036_854_775_807 -max_congestion_missed_chunks 9_223_372_036_854_775_807 -max_outgoing_gas 9_223_372_036_854_775_807 -min_outgoing_gas 9_223_372_036_854_775_807 -allowed_shard_outgoing_gas 9_223_372_036_854_775_807 -max_tx_gas 9_223_372_036_854_775_807 -min_tx_gas 9_223_372_036_854_775_807 -reject_tx_congestion_threshold 1 / 1 +max_congestion_incoming_gas 20_000_000_000_000_000 +max_congestion_outgoing_gas 10_000_000_000_000_000 +max_congestion_memory_consumption 1_000_000_000 +max_congestion_missed_chunks 5 +max_outgoing_gas 300_000_000_000_000_000 +min_outgoing_gas 1_000_000_000_000_000 +allowed_shard_outgoing_gas 1_000_000_000_000_000 +max_tx_gas 500_000_000_000_000 +min_tx_gas 20_000_000_000_000 +reject_tx_congestion_threshold 50 / 100 diff --git a/core/primitives-core/src/version.rs b/core/primitives-core/src/version.rs index 3ad2f5697f9..ec99873e369 100644 --- a/core/primitives-core/src/version.rs +++ b/core/primitives-core/src/version.rs @@ -266,7 +266,7 @@ impl ProtocolFeature { /// Current protocol version used on the mainnet. /// Some features (e. g. FixStorageUsage) require that there is at least one epoch with exactly /// the corresponding version -const STABLE_PROTOCOL_VERSION: ProtocolVersion = 69; +const STABLE_PROTOCOL_VERSION: ProtocolVersion = 81; /// Largest protocol version supported by the current binary. pub const PROTOCOL_VERSION: ProtocolVersion = if cfg!(feature = "statelessnet_protocol") { 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 1bd07dae54b..5bba9e355d6 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 @@ -18,7 +18,7 @@ expression: "&view" }, "cost_per_byte": { "send_sir": 17212011, - "send_not_sir": 17212011, + "send_not_sir": 47683715, "execution": 17212011 } }, @@ -35,7 +35,7 @@ expression: "&view" }, "deploy_contract_cost_per_byte": { "send_sir": 6812999, - "send_not_sir": 6812999, + "send_not_sir": 47683715, "execution": 64572944 }, "function_call_cost": { @@ -45,7 +45,7 @@ expression: "&view" }, "function_call_cost_per_byte": { "send_sir": 2235934, - "send_not_sir": 2235934, + "send_not_sir": 47683715, "execution": 2235934 }, "transfer_cost": { @@ -71,7 +71,7 @@ expression: "&view" }, "function_call_cost_per_byte": { "send_sir": 1925331, - "send_not_sir": 1925331, + "send_not_sir": 47683715, "execution": 1925331 } }, @@ -205,8 +205,8 @@ expression: "&view" "max_arguments_length": 4194304, "max_length_returned_data": 4194304, "max_contract_size": 4194304, - "max_transaction_size": 4194304, - "max_receipt_size": 999999999999999, + "max_transaction_size": 1572864, + "max_receipt_size": 4194304, "max_length_storage_key": 2048, "max_length_storage_value": 4194304, "max_promises_per_function_call_action": 1024, @@ -217,7 +217,7 @@ expression: "&view" "account_id_validity_rules_version": 1, "yield_timeout_length_in_blocks": 200, "max_yield_payload_size": 1024, - "per_receipt_storage_proof_size_limit": 999999999999999 + "per_receipt_storage_proof_size_limit": 4000000 } }, "account_creation_config": { @@ -225,22 +225,22 @@ expression: "&view" "registrar_account_id": "registrar" }, "congestion_control_config": { - "max_congestion_incoming_gas": 9223372036854775807, - "max_congestion_outgoing_gas": 9223372036854775807, - "max_congestion_memory_consumption": 9223372036854775807, - "max_congestion_missed_chunks": 9223372036854775807, - "max_outgoing_gas": 9223372036854775807, - "min_outgoing_gas": 9223372036854775807, - "allowed_shard_outgoing_gas": 9223372036854775807, - "max_tx_gas": 9223372036854775807, - "min_tx_gas": 9223372036854775807, - "reject_tx_congestion_threshold": 1.0, - "outgoing_receipts_usual_size_limit": 999999999999999, - "outgoing_receipts_big_size_limit": 999999999999999 + "max_congestion_incoming_gas": 20000000000000000, + "max_congestion_outgoing_gas": 10000000000000000, + "max_congestion_memory_consumption": 1000000000, + "max_congestion_missed_chunks": 5, + "max_outgoing_gas": 300000000000000000, + "min_outgoing_gas": 1000000000000000, + "allowed_shard_outgoing_gas": 1000000000000000, + "max_tx_gas": 500000000000000, + "min_tx_gas": 20000000000000, + "reject_tx_congestion_threshold": 0.5, + "outgoing_receipts_usual_size_limit": 102400, + "outgoing_receipts_big_size_limit": 4718592 }, "witness_config": { - "main_storage_proof_size_soft_limit": 999999999999999, - "combined_transactions_size_limit": 999999999999999, - "new_transactions_validation_state_size_soft_limit": 999999999999999 + "main_storage_proof_size_soft_limit": 3000000, + "combined_transactions_size_limit": 4194304, + "new_transactions_validation_state_size_soft_limit": 572864 } } diff --git a/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap.new b/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap.new deleted file mode 100644 index 7b6f5dfdb70..00000000000 --- a/integration-tests/src/tests/runtime/snapshots/integration_tests__tests__runtime__sanity_checks__receipts_gas_profile.snap.new +++ /dev/null @@ -1,501 +0,0 @@ ---- -source: integration-tests/src/tests/runtime/sanity_checks.rs -assertion_line: 152 -expression: receipts_gas_profile ---- -[ - [ - CostGasUsed { - cost_category: "ACTION_COST", - cost: "ADD_FULL_ACCESS_KEY", - gas_used: 101765125000, - }, - CostGasUsed { - cost_category: "ACTION_COST", - cost: "ADD_FUNCTION_CALL_KEY_BASE", - gas_used: 102217625000, - }, - CostGasUsed { - cost_category: "ACTION_COST", - cost: "ADD_FUNCTION_CALL_KEY_BYTE", - gas_used: 9626655, - }, - CostGasUsed { - cost_category: "ACTION_COST", - cost: "CREATE_ACCOUNT", - gas_used: 7700000000000, - }, - CostGasUsed { - cost_category: "ACTION_COST", - cost: "DELETE_ACCOUNT", - gas_used: 147489000000, - }, - CostGasUsed { - cost_category: "ACTION_COST", - cost: "DELETE_KEY", - gas_used: 94946625000, - }, - CostGasUsed { - cost_category: "ACTION_COST", - cost: "DEPLOY_CONTRACT_BASE", - gas_used: 184765750000, - }, - CostGasUsed { - cost_category: "ACTION_COST", - cost: "DEPLOY_CONTRACT_BYTE", - gas_used: 231641966, - }, - CostGasUsed { - cost_category: "ACTION_COST", - cost: "FUNCTION_CALL_BASE", - gas_used: 1800000000000, - }, - CostGasUsed { - cost_category: "ACTION_COST", - cost: "FUNCTION_CALL_BYTE", - gas_used: 207941862, - }, - CostGasUsed { - cost_category: "ACTION_COST", - cost: "NEW_ACTION_RECEIPT", - gas_used: 1480548358496, - }, - CostGasUsed { - cost_category: "ACTION_COST", - cost: "STAKE", - gas_used: 141715687500, - }, - CostGasUsed { - cost_category: "ACTION_COST", - cost: "TRANSFER", - gas_used: 230246125000, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "ALT_BN128_G1_MULTIEXP_BASE", - gas_used: 713000000000, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "ALT_BN128_G1_MULTIEXP_ELEMENT", - gas_used: 320000000000, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "ALT_BN128_G1_SUM_BASE", - gas_used: 3000000000, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "ALT_BN128_G1_SUM_ELEMENT", - gas_used: 5000000000, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "ALT_BN128_PAIRING_CHECK_BASE", - gas_used: 9686000000000, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "ALT_BN128_PAIRING_CHECK_ELEMENT", - gas_used: 5102000000000, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "BASE", - gas_used: 17209927215, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BASE", - gas_used: 35445963, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BYTES", - gas_used: 0, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "LOG_BASE", - gas_used: 7086626100, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "LOG_BYTE", - gas_used: 131987910, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "PROMISE_AND_BASE", - gas_used: 1465013400, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "PROMISE_AND_PER_PROMISE", - gas_used: 87234816, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "PROMISE_RETURN", - gas_used: 560152386, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "READ_CACHED_TRIE_NODE", - gas_used: 4560000000, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "READ_MEMORY_BASE", - gas_used: 182690424000, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "READ_MEMORY_BYTE", - gas_used: 4744063584, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "READ_REGISTER_BASE", - gas_used: 7551495558, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "READ_REGISTER_BYTE", - gas_used: 25034748, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "RIPEMD160_BASE", - gas_used: 853675086, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "RIPEMD160_BLOCK", - gas_used: 680107584, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "SHA256_BASE", - gas_used: 4540970250, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "SHA256_BYTE", - gas_used: 120586755, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "STORAGE_HAS_KEY_BASE", - gas_used: 108079793250, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "STORAGE_HAS_KEY_BYTE", - gas_used: 277117605, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "STORAGE_READ_BASE", - gas_used: 112713691500, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "STORAGE_READ_KEY_BYTE", - gas_used: 278572797, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "STORAGE_READ_VALUE_BYTE", - gas_used: 28055025, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "STORAGE_REMOVE_BASE", - gas_used: 106946061000, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "STORAGE_REMOVE_KEY_BYTE", - gas_used: 343983456, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "STORAGE_REMOVE_RET_VALUE_BYTE", - gas_used: 57657780, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "STORAGE_WRITE_BASE", - gas_used: 128393472000, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "STORAGE_WRITE_EVICTED_BYTE", - gas_used: 160586535, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "STORAGE_WRITE_KEY_BYTE", - gas_used: 281931468, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "STORAGE_WRITE_VALUE_BYTE", - gas_used: 310185390, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "TOUCHING_TRIE_NODE", - gas_used: 32203911852, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "UTF16_DECODING_BASE", - gas_used: 3543313050, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "UTF16_DECODING_BYTE", - gas_used: 1635774930, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "UTF8_DECODING_BASE", - gas_used: 46676685915, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "UTF8_DECODING_BYTE", - gas_used: 98262621423, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "VALIDATOR_STAKE_BASE", - gas_used: 911834726400, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "VALIDATOR_TOTAL_STAKE_BASE", - gas_used: 911834726400, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WASM_INSTRUCTION", - gas_used: 0, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WRITE_MEMORY_BASE", - gas_used: 19626564027, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WRITE_MEMORY_BYTE", - gas_used: 866159496, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WRITE_REGISTER_BASE", - gas_used: 37251792318, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WRITE_REGISTER_BYTE", - gas_used: 1904583564, - }, - ], - [ - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "BASE", - gas_used: 264768111, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BASE", - gas_used: 35445963, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BYTES", - gas_used: 0, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WASM_INSTRUCTION", - gas_used: 0, - }, - ], - [], - [ - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "BASE", - gas_used: 264768111, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BASE", - gas_used: 35445963, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BYTES", - gas_used: 0, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "READ_MEMORY_BASE", - gas_used: 2609863200, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "READ_MEMORY_BYTE", - gas_used: 11403999, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "UTF8_DECODING_BASE", - gas_used: 3111779061, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "UTF8_DECODING_BYTE", - gas_used: 874741437, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WASM_INSTRUCTION", - gas_used: 0, - }, - ], - [], - [ - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BASE", - gas_used: 35445963, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BYTES", - gas_used: 0, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WASM_INSTRUCTION", - gas_used: 0, - }, - ], - [], - [ - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BASE", - gas_used: 35445963, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BYTES", - gas_used: 0, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WASM_INSTRUCTION", - gas_used: 0, - }, - ], - [], - [ - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BASE", - gas_used: 35445963, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BYTES", - gas_used: 0, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WASM_INSTRUCTION", - gas_used: 0, - }, - ], - [], - [], - [], - [], - [], - [ - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BASE", - gas_used: 70891926, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BYTES", - gas_used: 0, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WASM_INSTRUCTION", - gas_used: 0, - }, - ], - [], - [], - [], - [], - [ - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BASE", - gas_used: 35445963, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BYTES", - gas_used: 0, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WASM_INSTRUCTION", - gas_used: 0, - }, - ], - [], - [ - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "BASE", - gas_used: 529536222, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BASE", - gas_used: 35445963, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "CONTRACT_LOADING_BYTES", - gas_used: 0, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WASM_INSTRUCTION", - gas_used: 0, - }, - CostGasUsed { - cost_category: "WASM_HOST_COST", - cost: "WRITE_REGISTER_BASE", - gas_used: 2865522486, - }, - ], - [], - [], -] From 42355c911afe8cbdf4028930190d582c13ce7b33 Mon Sep 17 00:00:00 2001 From: Tayfun Elmas Date: Thu, 4 Jul 2024 07:09:23 -0700 Subject: [PATCH 10/10] Check testUpdate runtime_config_view snapshot. --- ...ers__view__tests__runtime_config_view.snap | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) 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 3d2d144fd69..45b8e7e432a 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 @@ -18,7 +18,7 @@ expression: "&view" }, "cost_per_byte": { "send_sir": 17212011, - "send_not_sir": 17212011, + "send_not_sir": 47683715, "execution": 17212011 } }, @@ -35,7 +35,7 @@ expression: "&view" }, "deploy_contract_cost_per_byte": { "send_sir": 6812999, - "send_not_sir": 6812999, + "send_not_sir": 47683715, "execution": 64572944 }, "function_call_cost": { @@ -45,7 +45,7 @@ expression: "&view" }, "function_call_cost_per_byte": { "send_sir": 2235934, - "send_not_sir": 2235934, + "send_not_sir": 47683715, "execution": 2235934 }, "transfer_cost": { @@ -71,7 +71,7 @@ expression: "&view" }, "function_call_cost_per_byte": { "send_sir": 1925331, - "send_not_sir": 1925331, + "send_not_sir": 47683715, "execution": 1925331 } }, @@ -205,8 +205,8 @@ expression: "&view" "max_arguments_length": 4194304, "max_length_returned_data": 4194304, "max_contract_size": 4194304, - "max_transaction_size": 4194304, - "max_receipt_size": 999999999999999, + "max_transaction_size": 1572864, + "max_receipt_size": 4194304, "max_length_storage_key": 2048, "max_length_storage_value": 4194304, "max_promises_per_function_call_action": 1024, @@ -217,7 +217,7 @@ expression: "&view" "account_id_validity_rules_version": 1, "yield_timeout_length_in_blocks": 200, "max_yield_payload_size": 1024, - "per_receipt_storage_proof_size_limit": 999999999999999 + "per_receipt_storage_proof_size_limit": 4000000 } }, "account_creation_config": { @@ -225,22 +225,22 @@ expression: "&view" "registrar_account_id": "registrar" }, "congestion_control_config": { - "max_congestion_incoming_gas": 9223372036854775807, - "max_congestion_outgoing_gas": 9223372036854775807, - "max_congestion_memory_consumption": 9223372036854775807, - "max_congestion_missed_chunks": 9223372036854775807, - "max_outgoing_gas": 9223372036854775807, - "min_outgoing_gas": 9223372036854775807, - "allowed_shard_outgoing_gas": 9223372036854775807, - "max_tx_gas": 9223372036854775807, - "min_tx_gas": 9223372036854775807, - "reject_tx_congestion_threshold": 1.0, - "outgoing_receipts_usual_size_limit": 999999999999999, - "outgoing_receipts_big_size_limit": 999999999999999 + "max_congestion_incoming_gas": 20000000000000000, + "max_congestion_outgoing_gas": 10000000000000000, + "max_congestion_memory_consumption": 1000000000, + "max_congestion_missed_chunks": 5, + "max_outgoing_gas": 300000000000000000, + "min_outgoing_gas": 1000000000000000, + "allowed_shard_outgoing_gas": 1000000000000000, + "max_tx_gas": 500000000000000, + "min_tx_gas": 20000000000000, + "reject_tx_congestion_threshold": 0.5, + "outgoing_receipts_usual_size_limit": 102400, + "outgoing_receipts_big_size_limit": 4718592 }, "witness_config": { - "main_storage_proof_size_soft_limit": 999999999999999, - "combined_transactions_size_limit": 999999999999999, - "new_transactions_validation_state_size_soft_limit": 999999999999999 + "main_storage_proof_size_soft_limit": 3000000, + "combined_transactions_size_limit": 4194304, + "new_transactions_validation_state_size_soft_limit": 572864 } }