flow-go icon indicating copy to clipboard operation
flow-go copied to clipboard

Execution data requester v2

Open synzhu opened this issue 2 years ago • 1 comments

synzhu avatar Jul 21 '22 20:07 synzhu

FVM Benchstat comparison

This branch with compared with the base branch onflow:master commit 126dc31f81e6a30cd7d79b4af677c777a85d08eb

The command (for i in {1..N}; do go test ./fvm --bench . --tags relic -shuffle=on --benchmem --run ^$; done) was used.

Bench tests were run a total of 10 times on each branch.

Collapsed results for better readability

old.txtnew.txt
time/opdelta
RuntimeTransaction/get_signer_address-234.0ms ± 3%46.6ms ±12%+36.90%(p=0.000 n=8+10)
RuntimeTransaction/reference_tx-233.6ms ± 5%45.2ms ±12%+34.65%(p=0.000 n=9+9)
RuntimeTransaction/get_public_account-237.1ms ± 3%49.1ms ± 4%+32.16%(p=0.000 n=9+9)
RuntimeTransaction/call_empty_contract_function-236.8ms ± 4%47.5ms ± 5%+29.24%(p=0.000 n=10+10)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-236.8ms ± 4%47.5ms ± 5%+29.04%(p=0.000 n=9+9)
RuntimeTransaction/get_account_and_get_storage_used-241.8ms ± 2%53.5ms ± 2%+28.00%(p=0.000 n=9+10)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-241.6ms ± 3%53.2ms ± 4%+27.90%(p=0.000 n=10+10)
RuntimeTransaction/get_signer_vault-241.9ms ± 4%52.9ms ± 4%+26.30%(p=0.000 n=10+10)
RuntimeTransaction/emit_event-252.2ms ± 3%64.5ms ± 5%+23.54%(p=0.000 n=10+10)
RuntimeTransaction/convert_int_to_string-237.1ms ±20%45.8ms ± 6%+23.35%(p=0.000 n=10+9)
RuntimeTransaction/get_signer_receiver-252.7ms ± 7%63.1ms ± 2%+19.87%(p=0.000 n=9+10)
RuntimeTransaction/copy_array_from_storage-2126ms ± 3%139ms ± 4%+10.02%(p=0.000 n=10+10)
RuntimeTransaction/transfer_tokens-2193ms ± 5%212ms ± 3%+9.99%(p=0.000 n=10+10)
RuntimeTransaction/load_and_save_long_string_on_signers_address-282.6ms ± 3%90.3ms ± 4%+9.26%(p=0.000 n=10+9)
RuntimeTransaction/get_account_and_get_storage_capacity-2379ms ± 4%401ms ± 4%+5.72%(p=0.000 n=10+10)
RuntimeTransaction/borrow_array_from_storage-2127ms ± 4%134ms ± 6%+5.66%(p=0.001 n=10+10)
RuntimeTransaction/get_account_and_get_available_balance-2403ms ± 5%423ms ± 2%+5.18%(p=0.000 n=10+10)
RuntimeNFTBatchTransfer-2126ms ± 2%132ms ± 3%+4.91%(p=0.000 n=9+9)
RuntimeTransaction/create_new_account-21.03s ± 2%1.07s ± 3%+3.74%(p=0.000 n=10+10)
RuntimeTransaction/get_account_and_get_balance-2505ms ± 1%522ms ± 1%+3.34%(p=0.000 n=9+8)
 
computationdelta
RuntimeTransaction/reference_tx-2202 ± 0%202 ± 0%~(all equal)
RuntimeTransaction/convert_int_to_string-2402 ± 0%402 ± 0%~(all equal)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2502 ± 0%502 ± 0%~(all equal)
RuntimeTransaction/get_signer_address-2302 ± 0%302 ± 0%~(all equal)
RuntimeTransaction/get_public_account-2402 ± 0%402 ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_balance-21.00k ± 0%1.00k ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_available_balance-22.50k ± 0%2.50k ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_used-2402 ± 0%402 ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_capacity-21.30k ± 0%1.30k ± 0%~(all equal)
RuntimeTransaction/get_signer_vault-2402 ± 0%402 ± 0%~(all equal)
RuntimeTransaction/get_signer_receiver-2602 ± 0%602 ± 0%~(all equal)
RuntimeTransaction/transfer_tokens-23.50k ± 0%3.50k ± 0%~(all equal)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2602 ± 0%602 ± 0%~(all equal)
RuntimeTransaction/load_and_save_long_string_on_signers_address-2602 ± 0%602 ± 0%~(all equal)
RuntimeTransaction/create_new_account-2202 ± 0%202 ± 0%~(all equal)
RuntimeTransaction/call_empty_contract_function-2402 ± 0%402 ± 0%~(all equal)
RuntimeTransaction/emit_event-2602 ± 0%602 ± 0%~(all equal)
RuntimeTransaction/borrow_array_from_storage-22.60k ± 0%2.60k ± 0%~(all equal)
RuntimeTransaction/copy_array_from_storage-22.60k ± 0%2.60k ± 0%~(all equal)
 
interactionsdelta
RuntimeTransaction/reference_tx-247.8k ± 0%47.8k ± 0%~(all equal)
RuntimeTransaction/convert_int_to_string-247.8k ± 0%47.8k ± 0%~(all equal)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-247.8k ± 0%47.8k ± 0%~(all equal)
RuntimeTransaction/get_signer_address-247.8k ± 0%47.8k ± 0%~(all equal)
RuntimeTransaction/get_public_account-247.8k ± 0%47.8k ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_balance-216.8M ± 0%16.8M ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_available_balance-25.34M ± 0%5.34M ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_used-251.4k ± 0%51.4k ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_capacity-25.34M ± 0%5.34M ± 0%~(all equal)
RuntimeTransaction/get_signer_vault-249.0k ± 0%49.0k ± 0%~(all equal)
RuntimeTransaction/get_signer_receiver-249.4k ± 0%49.4k ± 0%~(all equal)
RuntimeTransaction/transfer_tokens-250.2k ± 0%50.2k ± 0%~(all equal)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-251.2k ± 0%51.2k ± 0%~(all equal)
RuntimeTransaction/load_and_save_long_string_on_signers_address-256.2k ± 0%56.2k ± 0%~(all equal)
RuntimeTransaction/create_new_account-28.49M ± 0%8.49M ± 0%~(all equal)
RuntimeTransaction/call_empty_contract_function-248.0k ± 0%48.0k ± 0%~(all equal)
RuntimeTransaction/emit_event-248.0k ± 0%48.0k ± 0%~(all equal)
RuntimeTransaction/borrow_array_from_storage-254.1k ± 0%54.1k ± 0%~(all equal)
RuntimeTransaction/copy_array_from_storage-254.1k ± 0%54.1k ± 0%~(all equal)
 
alloc/opdelta
RuntimeTransaction/get_signer_address-210.8MB ± 0%41.7MB ± 3%+284.95%(p=0.000 n=10+9)
RuntimeTransaction/reference_tx-210.6MB ± 1%40.2MB ± 4%+279.17%(p=0.000 n=10+10)
RuntimeTransaction/convert_int_to_string-211.1MB ± 1%41.8MB ± 2%+277.61%(p=0.000 n=10+8)
RuntimeTransaction/call_empty_contract_function-211.4MB ± 0%42.2MB ± 3%+269.12%(p=0.000 n=10+9)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-211.6MB ± 1%42.0MB ± 4%+261.63%(p=0.000 n=10+9)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-212.3MB ± 1%43.5MB ± 4%+254.63%(p=0.000 n=10+10)
RuntimeTransaction/get_public_account-212.3MB ± 0%43.5MB ± 4%+253.70%(p=0.000 n=9+10)
RuntimeTransaction/get_signer_vault-212.8MB ± 0%44.8MB ± 3%+250.62%(p=0.000 n=10+10)
RuntimeTransaction/get_account_and_get_storage_used-213.5MB ± 1%45.0MB ± 2%+234.10%(p=0.000 n=10+10)
RuntimeTransaction/emit_event-215.8MB ± 0%48.8MB ± 2%+209.87%(p=0.000 n=9+10)
RuntimeTransaction/get_signer_receiver-216.6MB ± 1%48.6MB ± 2%+192.50%(p=0.000 n=10+10)
RuntimeTransaction/load_and_save_long_string_on_signers_address-226.6MB ± 1%57.0MB ± 3%+114.57%(p=0.000 n=10+10)
RuntimeNFTBatchTransfer-230.4MB ± 0%59.4MB ± 2%+95.45%(p=0.000 n=9+10)
RuntimeTransaction/borrow_array_from_storage-236.9MB ± 0%66.1MB ± 8%+79.26%(p=0.000 n=10+10)
RuntimeTransaction/transfer_tokens-251.9MB ± 0%90.8MB ± 6%+75.17%(p=0.000 n=9+10)
RuntimeTransaction/copy_array_from_storage-248.0MB ± 0%81.5MB ± 8%+69.97%(p=0.000 n=10+10)
RuntimeTransaction/get_account_and_get_storage_capacity-2143MB ± 0%184MB ± 2%+28.31%(p=0.000 n=10+10)
RuntimeTransaction/get_account_and_get_available_balance-2149MB ± 0%187MB ± 2%+25.81%(p=0.000 n=10+10)
RuntimeTransaction/get_account_and_get_balance-2198MB ± 0%241MB ± 0%+21.48%(p=0.000 n=10+9)
RuntimeTransaction/create_new_account-2264MB ± 0%308MB ± 4%+16.84%(p=0.000 n=9+10)
 
allocs/opdelta
RuntimeTransaction/get_signer_address-2177k ± 0%178k ± 0%+0.13%(p=0.000 n=10+9)
RuntimeTransaction/call_empty_contract_function-2189k ± 0%189k ± 0%+0.13%(p=0.000 n=10+10)
RuntimeTransaction/reference_tx-2172k ± 0%172k ± 0%+0.13%(p=0.000 n=10+10)
RuntimeTransaction/convert_int_to_string-2187k ± 0%187k ± 0%+0.12%(p=0.000 n=10+10)
RuntimeTransaction/get_account_and_get_storage_used-2231k ± 0%231k ± 0%+0.11%(p=0.000 n=8+10)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2201k ± 0%201k ± 0%+0.11%(p=0.000 n=10+10)
RuntimeTransaction/get_public_account-2209k ± 0%209k ± 0%+0.11%(p=0.000 n=10+10)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2223k ± 0%224k ± 0%+0.10%(p=0.000 n=10+10)
RuntimeTransaction/emit_event-2236k ± 0%236k ± 0%+0.10%(p=0.000 n=10+9)
RuntimeTransaction/get_signer_vault-2225k ± 0%225k ± 0%+0.10%(p=0.000 n=10+10)
RuntimeTransaction/load_and_save_long_string_on_signers_address-2315k ± 0%316k ± 0%+0.06%(p=0.000 n=10+10)
RuntimeTransaction/get_signer_receiver-2314k ± 0%314k ± 0%+0.06%(p=0.000 n=10+10)
RuntimeTransaction/borrow_array_from_storage-2462k ± 0%462k ± 0%+0.00%(p=0.006 n=10+10)
RuntimeTransaction/transfer_tokens-21.08M ± 0%1.08M ± 0%~(p=0.190 n=10+10)
RuntimeNFTBatchTransfer-2420k ± 0%419k ± 0%~(p=0.496 n=9+10)
RuntimeTransaction/copy_array_from_storage-2418k ± 0%418k ± 0%−0.00%(p=0.009 n=10+10)
RuntimeTransaction/create_new_account-24.38M ± 0%4.38M ± 0%−0.01%(p=0.000 n=10+10)
RuntimeTransaction/get_account_and_get_balance-23.29M ± 0%3.29M ± 0%−0.02%(p=0.000 n=8+10)
RuntimeTransaction/get_account_and_get_available_balance-22.65M ± 0%2.65M ± 0%−0.02%(p=0.000 n=10+8)
RuntimeTransaction/get_account_and_get_storage_capacity-22.51M ± 0%2.51M ± 0%−0.02%(p=0.000 n=10+10)
 

github-actions[bot] avatar Jul 21 '22 20:07 github-actions[bot]

Is this still relevant?

janezpodhostnik avatar Nov 03 '22 15:11 janezpodhostnik

@janezpodhostnik This is a version of execution data sync which allows for proactively syncing unsealed execution data. It reduces the time for Access nodes to be able to answer queries about just-sealed blocks, compared to v1 which is currently on master. We omitted it from last spork, because execution data sync as a whole was a new addition, and we wanted to start with the simpler requester logic. Eventually we'll want to review, test, and deploy this, but I don't think there is a need to prioritize it right now.

jordanschalm avatar Nov 09 '22 14:11 jordanschalm

think this needs a new owner, @zhangchiqing @j1010001 @franklywatson

Kay-Zee avatar Jan 12 '23 02:01 Kay-Zee