Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take IO costs into account #3771

Merged
merged 8 commits into from
Jan 16, 2021
Merged

Take IO costs into account #3771

merged 8 commits into from
Jan 16, 2021

Conversation

olonho
Copy link
Contributor

@olonho olonho commented Dec 22, 2020

No description provided.

@olonho olonho force-pushed the io_costs_prod2 branch 2 times, most recently from 5439914 to be4e68f Compare December 23, 2020 15:46
@olonho
Copy link
Contributor Author

olonho commented Dec 23, 2020

IO not taken into account

RuntimeConfig {
    storage_amount_per_byte: 90900000000000000000,
    transaction_costs: RuntimeFeesConfig {
        action_receipt_creation_config: Fee {
            send_sir: 180543000000,
            send_not_sir: 180543000000,
            execution: 180543000000,
        },
        data_receipt_creation_config: DataReceiptCreationConfig {
            base_cost: Fee {
                send_sir: 287756586375,
                send_not_sir: 287756586375,
                execution: 287756586375,
            },
            cost_per_byte: Fee {
                send_sir: 13495819,
                send_not_sir: 13495819,
                execution: 13495819,
            },
        },
        action_creation_config: ActionCreationConfig {
            create_account_cost: Fee {
                send_sir: 26664375000,
                send_not_sir: 26664375000,
                execution: 26664375000,
            },
            deploy_contract_cost: Fee {
                send_sir: 52970812500,
                send_not_sir: 52970812500,
                execution: 52970812500,
            },
            deploy_contract_cost_per_byte: Fee {
                send_sir: 6412714,
                send_not_sir: 6412714,
                execution: 6412714,
            },
            function_call_cost: Fee {
                send_sir: 208035125000,
                send_not_sir: 208035125000,
                execution: 208035125000,
            },
            function_call_cost_per_byte: Fee {
                send_sir: 29545,
                send_not_sir: 29545,
                execution: 29545,
            },
            transfer_cost: Fee {
                send_sir: 21798437500,
                send_not_sir: 21798437500,
                execution: 21798437500,
            },
            stake_cost: Fee {
                send_sir: 62318625000,
                send_not_sir: 62318625000,
                execution: 62318625000,
            },
            add_key_cost: AccessKeyCreationConfig {
                full_access_cost: Fee {
                    send_sir: 31225750000,
                    send_not_sir: 31225750000,
                    execution: 31225750000,
                },
                function_call_cost: Fee {
                    send_sir: 33343187500,
                    send_not_sir: 33343187500,
                    execution: 33343187500,
                },
                function_call_cost_per_byte: Fee {
                    send_sir: 8952556,
                    send_not_sir: 8952556,
                    execution: 8952556,
                },
            },
            delete_key_cost: Fee {
                send_sir: 10598500000,
                send_not_sir: 10598500000,
                execution: 10598500000,
            },
            delete_account_cost: Fee {
                send_sir: 120858375000,
                send_not_sir: 120858375000,
                execution: 120858375000,
            },
        },
        storage_usage_config: StorageUsageConfig {
            num_bytes_account: 100,
            num_extra_bytes_record: 40,
        },
        burnt_gas_reward: Ratio {
            numer: 3,
            denom: 10,
        },
        pessimistic_gas_price_inflation_ratio: Ratio {
            numer: 103,
            denom: 100,
        },
    },
    wasm_config: VMConfig {
        ext_costs: ExtCostsConfig {
            base: 85027593,
            contract_compile_base: 41583437500,
            contract_compile_bytes: 349680329,
            read_memory_base: 238635650,
            read_memory_byte: 1266898,
            write_memory_base: 300836450,
            write_memory_byte: 61618,
            read_register_base: 206312187,
            read_register_byte: 32242,
            write_register_base: 331894550,
            write_register_byte: 1266986,
            utf8_decoding_base: 420020962,
            utf8_decoding_byte: 101516783,
            utf16_decoding_base: 560934925,
            utf16_decoding_byte: 56218622,
            sha256_base: 873091687,
            sha256_byte: 7682440,
            keccak256_base: 1313919425,
            keccak256_byte: 7063004,
            keccak512_base: 1309280462,
            keccak512_byte: 12118966,
            log_base: 560934925,
            log_byte: 4191470,
            storage_write_base: 12236571875,
            storage_write_key_byte: 21431466,
            storage_write_value_byte: 15119631,
            storage_write_evicted_byte: 19106565,
            storage_read_base: 21609273625,
            storage_read_key_byte: 34763076,
            storage_read_value_byte: 24374069,
            storage_remove_base: 31274407625,
            storage_remove_key_byte: 54384388,
            storage_remove_ret_value_byte: 30364969,
            storage_has_key_base: 20386679625,
            storage_has_key_byte: 32174820,
            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: 6174078178,
            promise_and_base: 453767540,
            promise_and_per_promise: 2043834,
            promise_return: 145534851,
            validator_stake_base: 303944908800,
            validator_total_stake_base: 303944908800,
        },
        grow_mem_cost: 1,
        regular_op_cost: 1139575,
        limit_config: VMLimitConfig {
            max_gas_burnt: 200000000000000,
            max_gas_burnt_view: 200000000000000,
            max_stack_height: 16384,
            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_length_storage_key: 4194304,
            max_length_storage_value: 4194304,
            max_promises_per_function_call_action: 1024,
            max_number_input_data_dependencies: 128,
        },
    },
    account_creation_config: AccountCreationConfig {
        min_allowed_top_level_account_length: 0,
        registrar_account_id: "registrar",
    },
}

@olonho
Copy link
Contributor Author

olonho commented Dec 23, 2020

IO taken into account

RuntimeConfig {
    storage_amount_per_byte: 90900000000000000000,
    transaction_costs: RuntimeFeesConfig {
        action_receipt_creation_config: Fee {
            send_sir: 186640250000,
            send_not_sir: 186640250000,
            execution: 186640250000,
        },
        data_receipt_creation_config: DataReceiptCreationConfig {
            base_cost: Fee {
                send_sir: 51173834316750,
                send_not_sir: 51173834316750,
                execution: 51173834316750,
            },
            cost_per_byte: Fee {
                send_sir: 13802730,
                send_not_sir: 13802730,
                execution: 13802730,
            },
        },
        action_creation_config: ActionCreationConfig {
            create_account_cost: Fee {
                send_sir: 33078125000,
                send_not_sir: 33078125000,
                execution: 33078125000,
            },
            deploy_contract_cost: Fee {
                send_sir: 62688062500,
                send_not_sir: 62688062500,
                execution: 62688062500,
            },
            deploy_contract_cost_per_byte: Fee {
                send_sir: 6444823,
                send_not_sir: 6444823,
                execution: 6444823,
            },
            function_call_cost: Fee {
                send_sir: 211055375000,
                send_not_sir: 211055375000,
                execution: 211055375000,
            },
            function_call_cost_per_byte: Fee {
                send_sir: 29902,
                send_not_sir: 29902,
                execution: 29902,
            },
            transfer_cost: Fee {
                send_sir: 32994687500,
                send_not_sir: 32994687500,
                execution: 32994687500,
            },
            stake_cost: Fee {
                send_sir: 66023437500,
                send_not_sir: 66023437500,
                execution: 66023437500,
            },
            add_key_cost: AccessKeyCreationConfig {
                full_access_cost: Fee {
                    send_sir: 37235125000,
                    send_not_sir: 37235125000,
                    execution: 37235125000,
                },
                function_call_cost: Fee {
                    send_sir: 38095937500,
                    send_not_sir: 38095937500,
                    execution: 38095937500,
                },
                function_call_cost_per_byte: Fee {
                    send_sir: 8893750,
                    send_not_sir: 8893750,
                    execution: 8893750,
                },
            },
            delete_key_cost: Fee {
                send_sir: 16142312500,
                send_not_sir: 16142312500,
                execution: 16142312500,
            },
            delete_account_cost: Fee {
                send_sir: 134032375000,
                send_not_sir: 134032375000,
                execution: 134032375000,
            },
        },
        storage_usage_config: StorageUsageConfig {
            num_bytes_account: 100,
            num_extra_bytes_record: 40,
        },
        burnt_gas_reward: Ratio {
            numer: 3,
            denom: 10,
        },
        pessimistic_gas_price_inflation_ratio: Ratio {
            numer: 103,
            denom: 100,
        },
    },
    wasm_config: VMConfig {
        ext_costs: ExtCostsConfig {
            base: 85065630,
            contract_compile_base: 41497687500,
            contract_compile_bytes: 349805161,
            read_memory_base: 241831800,
            read_memory_byte: 1266803,
            write_memory_base: 304446537,
            write_memory_byte: 61620,
            read_register_base: 209626437,
            read_register_byte: 32244,
            write_register_base: 335491012,
            write_register_byte: 1267044,
            utf8_decoding_base: 423512950,
            utf8_decoding_byte: 101529925,
            utf16_decoding_base: 563464087,
            utf16_decoding_byte: 56217592,
            sha256_base: 877054825,
            sha256_byte: 7684722,
            keccak256_base: 1317098775,
            keccak256_byte: 7065298,
            keccak512_base: 1312690525,
            keccak512_byte: 12107413,
            log_base: 563464087,
            log_byte: 4191963,
            storage_write_base: 15938258250,
            storage_write_key_byte: 24716455,
            storage_write_value_byte: 1860836987,
            storage_write_evicted_byte: 2942323474,
            storage_read_base: 23625238625,
            storage_read_key_byte: 5129172978,
            storage_read_value_byte: 4859938771,
            storage_remove_base: 32269261500,
            storage_remove_key_byte: 5987656337,
            storage_remove_ret_value_byte: 5475012101,
            storage_has_key_base: 22457695750,
            storage_has_key_byte: 4720572258,
            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: 6750068178,
            promise_and_base: 5710280416,
            promise_and_per_promise: 43505742,
            promise_return: 5074945813,
            validator_stake_base: 303944908800,
            validator_total_stake_base: 303944908800,
        },
        grow_mem_cost: 1,
        regular_op_cost: 1139718,
        limit_config: VMLimitConfig {
            max_gas_burnt: 200000000000000,
            max_gas_burnt_view: 200000000000000,
            max_stack_height: 16384,
            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_length_storage_key: 4194304,
            max_length_storage_value: 4194304,
            max_promises_per_function_call_action: 1024,
            max_number_input_data_dependencies: 128,
        },
    },
    account_creation_config: AccountCreationConfig {
        min_allowed_top_level_account_length: 0,
        registrar_account_id: "registrar",
    },
}

@olonho
Copy link
Contributor Author

olonho commented Dec 23, 2020

Comparison:

storage_amount_per_byte: first=90900000000000000000 second=90900000000000000000 second/first=1.00
action_receipt_creation_config: send_sir: first=180543000000 second=186640250000 second/first=1.03
action_receipt_creation_config: send_not_sir: first=180543000000 second=186640250000 second/first=1.03
action_receipt_creation_config: execution: first=180543000000 second=186640250000 second/first=1.03
base_cost: send_sir: first=287756586375 second=51173834316750 second/first=177.84
base_cost: send_not_sir: first=287756586375 second=51173834316750 second/first=177.84
base_cost: execution: first=287756586375 second=51173834316750 second/first=177.84
cost_per_byte: send_sir: first=13495819 second=13802730 second/first=1.02
cost_per_byte: send_not_sir: first=13495819 second=13802730 second/first=1.02
cost_per_byte: execution: first=13495819 second=13802730 second/first=1.02
create_account_cost: send_sir: first=26664375000 second=33078125000 second/first=1.24
create_account_cost: send_not_sir: first=26664375000 second=33078125000 second/first=1.24
create_account_cost: execution: first=26664375000 second=33078125000 second/first=1.24
deploy_contract_cost: send_sir: first=52970812500 second=62688062500 second/first=1.18
deploy_contract_cost: send_not_sir: first=52970812500 second=62688062500 second/first=1.18
deploy_contract_cost: execution: first=52970812500 second=62688062500 second/first=1.18
deploy_contract_cost_per_byte: send_sir: first=6412714 second=6444823 second/first=1.01
deploy_contract_cost_per_byte: send_not_sir: first=6412714 second=6444823 second/first=1.01
deploy_contract_cost_per_byte: execution: first=6412714 second=6444823 second/first=1.01
function_call_cost: send_sir: first=33343187500 second=38095937500 second/first=1.14
function_call_cost: send_not_sir: first=33343187500 second=38095937500 second/first=1.14
function_call_cost: execution: first=33343187500 second=38095937500 second/first=1.14
function_call_cost_per_byte: send_sir: first=8952556 second=8893750 second/first=0.99
function_call_cost_per_byte: send_not_sir: first=8952556 second=8893750 second/first=0.99
function_call_cost_per_byte: execution: first=8952556 second=8893750 second/first=0.99
transfer_cost: send_sir: first=21798437500 second=32994687500 second/first=1.51
transfer_cost: send_not_sir: first=21798437500 second=32994687500 second/first=1.51
transfer_cost: execution: first=21798437500 second=32994687500 second/first=1.51
stake_cost: send_sir: first=62318625000 second=66023437500 second/first=1.06
stake_cost: send_not_sir: first=62318625000 second=66023437500 second/first=1.06
stake_cost: execution: first=62318625000 second=66023437500 second/first=1.06
full_access_cost: send_sir: first=31225750000 second=37235125000 second/first=1.19
full_access_cost: send_not_sir: first=31225750000 second=37235125000 second/first=1.19
full_access_cost: execution: first=31225750000 second=37235125000 second/first=1.19
delete_key_cost: send_sir: first=10598500000 second=16142312500 second/first=1.52
delete_key_cost: send_not_sir: first=10598500000 second=16142312500 second/first=1.52
delete_key_cost: execution: first=10598500000 second=16142312500 second/first=1.52
delete_account_cost: send_sir: first=120858375000 second=134032375000 second/first=1.11
delete_account_cost: send_not_sir: first=120858375000 second=134032375000 second/first=1.11
delete_account_cost: execution: first=120858375000 second=134032375000 second/first=1.11
storage_usage_config: num_bytes_account: first=100 second=100 second/first=1.00
storage_usage_config: num_extra_bytes_record: first=40 second=40 second/first=1.00
burnt_gas_reward: numer: first=3 second=3 second/first=1.00
burnt_gas_reward: denom: first=10 second=10 second/first=1.00
pessimistic_gas_price_inflation_ratio: numer: first=103 second=103 second/first=1.00
pessimistic_gas_price_inflation_ratio: denom: first=100 second=100 second/first=1.00
ext_costs: base: first=85027593 second=85065630 second/first=1.00
ext_costs: contract_compile_base: first=41583437500 second=41497687500 second/first=1.00
ext_costs: contract_compile_bytes: first=349680329 second=349805161 second/first=1.00
ext_costs: read_memory_base: first=238635650 second=241831800 second/first=1.01
ext_costs: read_memory_byte: first=1266898 second=1266803 second/first=1.00
ext_costs: write_memory_base: first=300836450 second=304446537 second/first=1.01
ext_costs: write_memory_byte: first=61618 second=61620 second/first=1.00
ext_costs: read_register_base: first=206312187 second=209626437 second/first=1.02
ext_costs: read_register_byte: first=32242 second=32244 second/first=1.00
ext_costs: write_register_base: first=331894550 second=335491012 second/first=1.01
ext_costs: write_register_byte: first=1266986 second=1267044 second/first=1.00
ext_costs: utf8_decoding_base: first=420020962 second=423512950 second/first=1.01
ext_costs: utf8_decoding_byte: first=101516783 second=101529925 second/first=1.00
ext_costs: utf16_decoding_base: first=560934925 second=563464087 second/first=1.00
ext_costs: utf16_decoding_byte: first=56218622 second=56217592 second/first=1.00
ext_costs: sha256_base: first=873091687 second=877054825 second/first=1.00
ext_costs: sha256_byte: first=7682440 second=7684722 second/first=1.00
ext_costs: keccak256_base: first=1313919425 second=1317098775 second/first=1.00
ext_costs: keccak256_byte: first=7063004 second=7065298 second/first=1.00
ext_costs: keccak512_base: first=1309280462 second=1312690525 second/first=1.00
ext_costs: keccak512_byte: first=12118966 second=12107413 second/first=1.00
ext_costs: log_base: first=560934925 second=563464087 second/first=1.00
ext_costs: log_byte: first=4191470 second=4191963 second/first=1.00
ext_costs: storage_write_base: first=12236571875 second=15938258250 second/first=1.30
ext_costs: storage_write_key_byte: first=21431466 second=24716455 second/first=1.15
ext_costs: storage_write_value_byte: first=15119631 second=1860836987 second/first=123.07
ext_costs: storage_write_evicted_byte: first=19106565 second=2942323474 second/first=154.00
ext_costs: storage_read_base: first=21609273625 second=23625238625 second/first=1.09
ext_costs: storage_read_key_byte: first=34763076 second=5129172978 second/first=147.55
ext_costs: storage_read_value_byte: first=24374069 second=4859938771 second/first=199.39
ext_costs: storage_remove_base: first=31274407625 second=32269261500 second/first=1.03
ext_costs: storage_remove_key_byte: first=54384388 second=5987656337 second/first=110.10
ext_costs: storage_remove_ret_value_byte: first=30364969 second=5475012101 second/first=180.31
ext_costs: storage_has_key_base: first=20386679625 second=22457695750 second/first=1.10
ext_costs: storage_has_key_byte: first=32174820 second=4720572258 second/first=146.72
ext_costs: storage_iter_create_prefix_base: first=0 second=0 second/first=n/a
ext_costs: storage_iter_create_prefix_byte: first=0 second=0 second/first=n/a
ext_costs: storage_iter_create_range_base: first=0 second=0 second/first=n/a
ext_costs: storage_iter_create_from_byte: first=0 second=0 second/first=n/a
ext_costs: storage_iter_create_to_byte: first=0 second=0 second/first=n/a
ext_costs: storage_iter_next_base: first=0 second=0 second/first=n/a
ext_costs: storage_iter_next_key_byte: first=0 second=0 second/first=n/a
ext_costs: storage_iter_next_value_byte: first=0 second=0 second/first=n/a
ext_costs: touching_trie_node: first=6174078178 second=6750068178 second/first=1.09
ext_costs: promise_and_base: first=453767540 second=5710280416 second/first=12.58
ext_costs: promise_and_per_promise: first=2043834 second=43505742 second/first=21.29
ext_costs: promise_return: first=145534851 second=5074945813 second/first=34.87
ext_costs: validator_stake_base: first=303944908800 second=303944908800 second/first=1.00
ext_costs: validator_total_stake_base: first=303944908800 second=303944908800 second/first=1.00
ext_costs: grow_mem_cost: first=1 second=1 second/first=1.00
ext_costs: regular_op_cost: first=1139575 second=1139718 second/first=1.00
limit_config: max_gas_burnt: first=200000000000000 second=200000000000000 second/first=1.00
limit_config: max_gas_burnt_view: first=200000000000000 second=200000000000000 second/first=1.00
limit_config: max_stack_height: first=16384 second=16384 second/first=1.00
limit_config: initial_memory_pages: first=1024 second=1024 second/first=1.00
limit_config: max_memory_pages: first=2048 second=2048 second/first=1.00
limit_config: registers_memory_limit: first=1073741824 second=1073741824 second/first=1.00
limit_config: max_register_size: first=104857600 second=104857600 second/first=1.00
limit_config: max_number_registers: first=100 second=100 second/first=1.00
limit_config: max_number_logs: first=100 second=100 second/first=1.00
limit_config: max_total_log_length: first=16384 second=16384 second/first=1.00
limit_config: max_total_prepaid_gas: first=300000000000000 second=300000000000000 second/first=1.00
limit_config: max_actions_per_receipt: first=100 second=100 second/first=1.00
limit_config: max_number_bytes_method_names: first=2000 second=2000 second/first=1.00
limit_config: max_length_method_name: first=256 second=256 second/first=1.00
limit_config: max_arguments_length: first=4194304 second=4194304 second/first=1.00
limit_config: max_length_returned_data: first=4194304 second=4194304 second/first=1.00
limit_config: max_contract_size: first=4194304 second=4194304 second/first=1.00
limit_config: max_length_storage_key: first=4194304 second=4194304 second/first=1.00
limit_config: max_length_storage_value: first=4194304 second=4194304 second/first=1.00
limit_config: max_promises_per_function_call_action: first=1024 second=1024 second/first=1.00
limit_config: max_number_input_data_dependencies: first=128 second=128 second/first=1.00
account_creation_config: min_allowed_top_level_account_length: first=0 second=0 second/first=n/a

@olonho
Copy link
Contributor Author

olonho commented Dec 23, 2020

So significant changes are:

base_cost: send_sir: first=287756586375 second=51173834316750 second/first=177.84
base_cost: send_not_sir: first=287756586375 second=51173834316750 second/first=177.84
base_cost: execution: first=287756586375 second=51173834316750 second/first=177.84
create_account_cost: send_sir: first=26664375000 second=33078125000 second/first=1.24
create_account_cost: send_not_sir: first=26664375000 second=33078125000 second/first=1.24
create_account_cost: execution: first=26664375000 second=33078125000 second/first=1.24
transfer_cost: send_sir: first=21798437500 second=32994687500 second/first=1.51
transfer_cost: send_not_sir: first=21798437500 second=32994687500 second/first=1.51
transfer_cost: execution: first=21798437500 second=32994687500 second/first=1.51
delete_key_cost: send_sir: first=10598500000 second=16142312500 second/first=1.52
delete_key_cost: send_not_sir: first=10598500000 second=16142312500 second/first=1.52
delete_key_cost: execution: first=10598500000 second=16142312500 second/first=1.52
ext_costs: storage_write_base: first=12236571875 second=15938258250 second/first=1.30
ext_costs: storage_write_value_byte: first=15119631 second=1860836987 second/first=123.07
ext_costs: storage_write_evicted_byte: first=19106565 second=2942323474 second/first=154.00
ext_costs: storage_read_key_byte: first=34763076 second=5129172978 second/first=147.55
ext_costs: storage_read_value_byte: first=24374069 second=4859938771 second/first=199.39
ext_costs: storage_remove_key_byte: first=54384388 second=5987656337 second/first=110.10
ext_costs: storage_remove_ret_value_byte: first=30364969 second=5475012101 second/first=180.31
ext_costs: storage_has_key_byte: first=32174820 second=4720572258 second/first=146.72
ext_costs: promise_and_base: first=453767540 second=5710280416 second/first=12.58
ext_costs: promise_and_per_promise: first=2043834 second=43505742 second/first=21.29
ext_costs: promise_return: first=145534851 second=5074945813 second/first=34.87

@olonho
Copy link
Contributor Author

olonho commented Dec 25, 2020

Recomputed after merging #3505.

No IO costs:

RuntimeConfig {
    storage_amount_per_byte: 90900000000000000000,
    transaction_costs: RuntimeFeesConfig {
        action_receipt_creation_config: Fee {
            send_sir: 164716125000,
            send_not_sir: 164716125000,
            execution: 164716125000,
        },
        data_receipt_creation_config: DataReceiptCreationConfig {
            base_cost: Fee {
                send_sir: 42353144000,
                send_not_sir: 42353144000,
                execution: 42353144000,
            },
            cost_per_byte: Fee {
                send_sir: 13468757,
                send_not_sir: 13468757,
                execution: 13468757,
            },
        },
        action_creation_config: ActionCreationConfig {
            create_account_cost: Fee {
                send_sir: 21683687500,
                send_not_sir: 21683687500,
                execution: 21683687500,
            },
            deploy_contract_cost: Fee {
                send_sir: 38226437500,
                send_not_sir: 38226437500,
                execution: 79628012500,
            },
            deploy_contract_cost_per_byte: Fee {
                send_sir: 6414629,
                send_not_sir: 6414629,
                execution: 356270478,
            },
            function_call_cost: Fee {
                send_sir: 255138750000,
                send_not_sir: 255138750000,
                execution: 255138750000,
            },
            function_call_cost_per_byte: Fee {
                send_sir: 28071,
                send_not_sir: 28071,
                execution: 28071,
            },
            transfer_cost: Fee {
                send_sir: 21374000000,
                send_not_sir: 21374000000,
                execution: 21374000000,
            },
            stake_cost: Fee {
                send_sir: 56763375000,
                send_not_sir: 56763375000,
                execution: 56763375000,
            },
            add_key_cost: AccessKeyCreationConfig {
                full_access_cost: Fee {
                    send_sir: 26357625000,
                    send_not_sir: 26357625000,
                    execution: 26357625000,
                },
                function_call_cost: Fee {
                    send_sir: 24927875000,
                    send_not_sir: 24927875000,
                    execution: 24927875000,
                },
                function_call_cost_per_byte: Fee {
                    send_sir: 8589800,
                    send_not_sir: 8589800,
                    execution: 8589800,
                },
            },
            delete_key_cost: Fee {
                send_sir: 9657437500,
                send_not_sir: 9657437500,
                execution: 9657437500,
            },
            delete_account_cost: Fee {
                send_sir: 110551875000,
                send_not_sir: 110551875000,
                execution: 110551875000,
            },
        },
        storage_usage_config: StorageUsageConfig {
            num_bytes_account: 100,
            num_extra_bytes_record: 40,
        },
        burnt_gas_reward: Ratio {
            numer: 3,
            denom: 10,
        },
        pessimistic_gas_price_inflation_ratio: Ratio {
            numer: 103,
            denom: 100,
        },
    },
    wasm_config: VMConfig {
        ext_costs: ExtCostsConfig {
            base: 85059460,
            contract_compile_base: 0,
            contract_compile_bytes: 0,
            read_memory_base: 241792212,
            read_memory_byte: 1266500,
            write_memory_base: 303983437,
            write_memory_byte: 61618,
            read_register_base: 210457462,
            read_register_byte: 32244,
            write_register_base: 335059062,
            write_register_byte: 1266588,
            utf8_decoding_base: 423119212,
            utf8_decoding_byte: 101494713,
            utf16_decoding_base: 563024600,
            utf16_decoding_byte: 56214220,
            sha256_base: 876501100,
            sha256_byte: 7684740,
            keccak256_base: 1318007837,
            keccak256_byte: 7065297,
            keccak512_base: 1312951275,
            keccak512_byte: 12107468,
            log_base: 563024600,
            log_byte: 4193151,
            storage_write_base: 16065908250,
            storage_write_key_byte: 21856919,
            storage_write_value_byte: 9535941,
            storage_write_evicted_byte: 6070600,
            storage_read_base: 26398029125,
            storage_read_key_byte: 11261650,
            storage_read_value_byte: 3336690,
            storage_remove_base: 31017325250,
            storage_remove_key_byte: 24012448,
            storage_remove_ret_value_byte: 3878240,
            storage_has_key_base: 24630659125,
            storage_has_key_byte: 10979890,
            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: 7542294035,
            promise_and_base: 430022715,
            promise_and_per_promise: 1833835,
            promise_return: 123471245,
            validator_stake_base: 303944908800,
            validator_total_stake_base: 303944908800,
        },
        grow_mem_cost: 1,
        regular_op_cost: 1139879,
        limit_config: VMLimitConfig {
            max_gas_burnt: 200000000000000,
            max_gas_burnt_view: 200000000000000,
            max_stack_height: 16384,
            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_length_storage_key: 4194304,
            max_length_storage_value: 4194304,
            max_promises_per_function_call_action: 1024,
            max_number_input_data_dependencies: 128,
        },
    },
    account_creation_config: AccountCreationConfig {
        min_allowed_top_level_account_length: 0,
        registrar_account_id: "registrar",
    },
}

With IO costs

RuntimeConfig {
    storage_amount_per_byte: 90900000000000000000,
    transaction_costs: RuntimeFeesConfig {
        action_receipt_creation_config: Fee {
            send_sir: 167797937500,
            send_not_sir: 167797937500,
            execution: 167797937500,
        },
        data_receipt_creation_config: DataReceiptCreationConfig {
            base_cost: Fee {
                send_sir: 40992798937,
                send_not_sir: 40992798937,
                execution: 40992798937,
            },
            cost_per_byte: Fee {
                send_sir: 13484751,
                send_not_sir: 13484751,
                execution: 13484751,
            },
        },
        action_creation_config: ActionCreationConfig {
            create_account_cost: Fee {
                send_sir: 30199625000,
                send_not_sir: 30199625000,
                execution: 30199625000,
            },
            deploy_contract_cost: Fee {
                send_sir: 54242000000,
                send_not_sir: 54242000000,
                execution: 95694037500,
            },
            deploy_contract_cost_per_byte: Fee {
                send_sir: 6439828,
                send_not_sir: 6439828,
                execution: 356273715,
            },
            function_call_cost: Fee {
                send_sir: 257530187500,
                send_not_sir: 257530187500,
                execution: 257530187500,
            },
            function_call_cost_per_byte: Fee {
                send_sir: 27663,
                send_not_sir: 27663,
                execution: 27663,
            },
            transfer_cost: Fee {
                send_sir: 29604125000,
                send_not_sir: 29604125000,
                execution: 29604125000,
            },
            stake_cost: Fee {
                send_sir: 63200750000,
                send_not_sir: 63200750000,
                execution: 63200750000,
            },
            add_key_cost: AccessKeyCreationConfig {
                full_access_cost: Fee {
                    send_sir: 33018625000,
                    send_not_sir: 33018625000,
                    execution: 33018625000,
                },
                function_call_cost: Fee {
                    send_sir: 33741937500,
                    send_not_sir: 33741937500,
                    execution: 33741937500,
                },
                function_call_cost_per_byte: Fee {
                    send_sir: 8751675,
                    send_not_sir: 8751675,
                    execution: 8751675,
                },
            },
            delete_key_cost: Fee {
                send_sir: 14645625000,
                send_not_sir: 14645625000,
                execution: 14645625000,
            },
            delete_account_cost: Fee {
                send_sir: 123681312500,
                send_not_sir: 123681312500,
                execution: 123681312500,
            },
        },
        storage_usage_config: StorageUsageConfig {
            num_bytes_account: 100,
            num_extra_bytes_record: 40,
        },
        burnt_gas_reward: Ratio {
            numer: 3,
            denom: 10,
        },
        pessimistic_gas_price_inflation_ratio: Ratio {
            numer: 103,
            denom: 100,
        },
    },
    wasm_config: VMConfig {
        ext_costs: ExtCostsConfig {
            base: 85071961,
            contract_compile_base: 0,
            contract_compile_bytes: 0,
            read_memory_base: 242189875,
            read_memory_byte: 1266500,
            write_memory_base: 304557537,
            write_memory_byte: 61619,
            read_register_base: 210743137,
            read_register_byte: 32245,
            write_register_base: 336020575,
            write_register_byte: 1266589,
            utf8_decoding_base: 424295937,
            utf8_decoding_byte: 101492764,
            utf16_decoding_base: 563934137,
            utf16_decoding_byte: 56213781,
            sha256_base: 876972212,
            sha256_byte: 7684766,
            keccak256_base: 1318330112,
            keccak256_byte: 7065361,
            keccak512_base: 1313808525,
            keccak512_byte: 12107483,
            log_base: 563934137,
            log_byte: 4192575,
            storage_write_base: 15634840125,
            storage_write_key_byte: 24838226,
            storage_write_value_byte: 12445976,
            storage_write_evicted_byte: 6026285,
            storage_read_base: 25707189750,
            storage_read_key_byte: 11021546,
            storage_read_value_byte: 3089426,
            storage_remove_base: 31843195375,
            storage_remove_key_byte: 23943147,
            storage_remove_ret_value_byte: 3981952,
            storage_has_key_base: 23953265750,
            storage_has_key_byte: 10882338,
            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: 7344911357,
            promise_and_base: 431978233,
            promise_and_per_promise: 1830232,
            promise_return: 123461916,
            validator_stake_base: 303944908800,
            validator_total_stake_base: 303944908800,
        },
        grow_mem_cost: 1,
        regular_op_cost: 1139851,
        limit_config: VMLimitConfig {
            max_gas_burnt: 200000000000000,
            max_gas_burnt_view: 200000000000000,
            max_stack_height: 16384,
            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_length_storage_key: 4194304,
            max_length_storage_value: 4194304,
            max_promises_per_function_call_action: 1024,
            max_number_input_data_dependencies: 128,
        },
    },
    account_creation_config: AccountCreationConfig {
        min_allowed_top_level_account_length: 0,
        registrar_account_id: "registrar",
    },
}

Significant difference:

create_account_cost: send_sir: first=21683687500 second=30199625000 second/first=1.39
create_account_cost: send_not_sir: first=21683687500 second=30199625000 second/first=1.39
create_account_cost: execution: first=21683687500 second=30199625000 second/first=1.39
deploy_contract_cost: send_sir: first=38226437500 second=54242000000 second/first=1.42
deploy_contract_cost: send_not_sir: first=38226437500 second=54242000000 second/first=1.42
deploy_contract_cost: execution: first=79628012500 second=95694037500 second/first=1.20
function_call_cost: send_sir: first=24927875000 second=33741937500 second/first=1.35
function_call_cost: send_not_sir: first=24927875000 second=33741937500 second/first=1.35
function_call_cost: execution: first=24927875000 second=33741937500 second/first=1.35
transfer_cost: send_sir: first=21374000000 second=29604125000 second/first=1.39
transfer_cost: send_not_sir: first=21374000000 second=29604125000 second/first=1.39
transfer_cost: execution: first=21374000000 second=29604125000 second/first=1.39
full_access_cost: send_sir: first=26357625000 second=33018625000 second/first=1.25
full_access_cost: send_not_sir: first=26357625000 second=33018625000 second/first=1.25
full_access_cost: execution: first=26357625000 second=33018625000 second/first=1.25
delete_key_cost: send_sir: first=9657437500 second=14645625000 second/first=1.52
delete_key_cost: send_not_sir: first=9657437500 second=14645625000 second/first=1.52
delete_key_cost: execution: first=9657437500 second=14645625000 second/first=1.52
ext_costs: storage_write_value_byte: first=9535941 second=12445976 second/first=1.31

Copy link
Contributor

@willemneal willemneal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just one nit.

runtime/runtime-params-estimator/src/testbed_runners.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants