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

[Draft] Execution Data State Sync Audit - Comments & Suggestions

Open jordanschalm opened this issue 2 years ago • 2 comments

jordanschalm avatar Sep 13 '22 19:09 jordanschalm

Codecov Report

Merging #3226 (95985c7) into master (fc4eda0) will decrease coverage by 7.27%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3226      +/-   ##
==========================================
- Coverage   53.93%   46.66%   -7.28%     
==========================================
  Files         742      182     -560     
  Lines       68375    19375   -49000     
==========================================
- Hits        36879     9041   -27838     
+ Misses      28445     9510   -18935     
+ Partials     3051      824    -2227     
Flag Coverage Δ
unittests 46.66% <ø> (-7.28%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
fvm/handler/contract.go 66.18% <0.00%> (-6.50%) :arrow_down:
fvm/environment/system_contracts.go 25.86% <0.00%> (-6.32%) :arrow_down:
fvm/fvm.go 76.54% <0.00%> (-1.59%) :arrow_down:
fvm/env.go 86.44% <0.00%> (-1.39%) :arrow_down:
fvm/errors/errors.go 42.42% <0.00%> (-1.33%) :arrow_down:
fvm/transactionInvoker.go 69.00% <0.00%> (-0.89%) :arrow_down:
fvm/handler/accountKey.go 20.42% <0.00%> (-0.70%) :arrow_down:
fvm/environment/account_creator.go 22.50% <0.00%> (-0.58%) :arrow_down:
cmd/scaffold.go 17.30% <0.00%> (-0.04%) :arrow_down:
fvm/bootstrap.go 86.26% <0.00%> (-0.03%) :arrow_down:
... and 580 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Sep 13 '22 20:09 codecov-commenter

FVM Benchstat comparison

This branch with compared with the base branch onflow:master commit c58f31fe2d330b91c1008d7bdede151a3596374d

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

Collapsed results for better readability

old.txtnew.txt
time/opdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeNFTBatchTransfer-2113ms ± 4%112ms ± 2%~(p=0.436 n=10+10)
RuntimeTransaction/reference_tx-228.4ms ±14%27.0ms ± 6%~(p=0.079 n=10+9)
RuntimeTransaction/convert_int_to_string-230.0ms ± 9%29.1ms ± 6%~(p=0.211 n=10+9)
RuntimeTransaction/get_signer_address-230.3ms ±10%29.4ms ±16%~(p=0.165 n=10+10)
RuntimeTransaction/get_public_account-231.8ms ± 7%31.6ms ± 7%~(p=0.780 n=10+9)
RuntimeTransaction/get_account_and_get_balance-2316ms ±10%309ms ± 2%~(p=0.182 n=9+10)
RuntimeTransaction/get_account_and_get_storage_used-234.1ms ± 4%33.5ms ± 5%~(p=0.211 n=9+10)
RuntimeTransaction/get_account_and_get_storage_capacity-2260ms ± 9%254ms ± 1%~(p=0.094 n=9+9)
RuntimeTransaction/get_signer_vault-236.9ms ± 5%36.1ms ± 9%~(p=0.247 n=10+10)
RuntimeTransaction/transfer_tokens-2213ms ± 2%211ms ± 3%~(p=0.353 n=10+10)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-236.2ms ± 7%36.3ms ±10%~(p=0.971 n=10+10)
RuntimeTransaction/load_and_save_long_string_on_signers_address-279.0ms ± 3%78.1ms ± 4%~(p=0.315 n=10+9)
RuntimeTransaction/create_new_account-2850ms ± 2%843ms ± 4%~(p=0.218 n=10+10)
RuntimeTransaction/call_empty_contract_function-231.8ms ± 7%31.4ms ± 7%~(p=0.481 n=10+10)
RuntimeTransaction/emit_event-246.8ms ± 7%45.9ms ± 8%~(p=0.393 n=10+10)
RuntimeTransaction/copy_array_from_storage-2139ms ± 6%137ms ± 4%~(p=0.315 n=10+10)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-24.83s ± 3%4.85s ± 3%~(p=0.481 n=10+10)
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/get_account_and_get_available_balance-2290ms ± 3%286ms ± 2%−1.31%(p=0.035 n=10+10)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-232.2ms ± 2%31.5ms ± 3%−2.27%(p=0.004 n=9+8)
RuntimeTransaction/borrow_array_from_storage-2133ms ± 3%129ms ± 4%−2.59%(p=0.015 n=10+10)
RuntimeTransaction/get_signer_receiver-247.3ms ± 4%45.9ms ± 5%−2.96%(p=0.022 n=9+10)
 
alloc/opdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeNFTBatchTransfer-257.8MB ± 5%58.1MB ± 3%~(p=0.631 n=10+10)
RuntimeTransaction/convert_int_to_string-237.2MB ± 9%37.5MB ± 6%~(p=0.853 n=10+10)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-238.4MB ± 3%38.0MB ± 9%~(p=0.762 n=8+10)
RuntimeTransaction/get_signer_address-238.4MB ± 5%37.3MB ± 9%~(p=0.143 n=10+10)
RuntimeTransaction/get_public_account-238.2MB ± 6%38.3MB ± 3%~(p=0.905 n=10+9)
RuntimeTransaction/get_account_and_get_balance-2142MB ± 2%141MB ± 0%~(p=0.161 n=10+7)
RuntimeTransaction/get_account_and_get_available_balance-2123MB ± 3%124MB ± 2%~(p=0.315 n=10+10)
RuntimeTransaction/get_account_and_get_storage_used-238.0MB ± 5%38.1MB ± 4%~(p=0.796 n=10+10)
RuntimeTransaction/get_account_and_get_storage_capacity-2118MB ± 4%116MB ± 4%~(p=0.247 n=10+10)
RuntimeTransaction/get_signer_vault-239.0MB ± 8%38.7MB ± 7%~(p=0.796 n=10+10)
RuntimeTransaction/get_signer_receiver-241.9MB ± 7%41.5MB ± 6%~(p=0.481 n=10+10)
RuntimeTransaction/transfer_tokens-289.9MB ± 4%90.1MB ± 4%~(p=0.971 n=10+10)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-238.1MB ± 6%38.6MB ± 6%~(p=0.529 n=10+10)
RuntimeTransaction/load_and_save_long_string_on_signers_address-258.1MB ± 6%58.3MB ± 2%~(p=0.684 n=10+10)
RuntimeTransaction/create_new_account-2210MB ± 2%209MB ± 0%~(p=1.000 n=10+8)
RuntimeTransaction/call_empty_contract_function-238.1MB ± 6%38.1MB ± 7%~(p=1.000 n=10+10)
RuntimeTransaction/emit_event-243.2MB ± 6%42.4MB ± 5%~(p=0.436 n=10+10)
RuntimeTransaction/borrow_array_from_storage-269.3MB ± 6%68.5MB ± 6%~(p=0.684 n=10+10)
RuntimeTransaction/copy_array_from_storage-283.5MB ± 4%84.3MB ± 2%~(p=0.529 n=10+10)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-21.32GB ± 1%1.32GB ± 0%~(p=0.079 n=10+9)
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/reference_tx-237.8MB ± 5%36.5MB ± 6%−3.54%(p=0.031 n=9+9)
 
allocs/opdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeNFTBatchTransfer-2304k ± 0%304k ± 0%~(p=0.255 n=10+10)
RuntimeTransaction/get_account_and_get_available_balance-21.58M ± 0%1.58M ± 0%~(p=0.218 n=10+10)
RuntimeTransaction/get_account_and_get_storage_capacity-21.42M ± 0%1.42M ± 0%~(p=0.078 n=10+10)
RuntimeTransaction/create_new_account-22.80M ± 0%2.80M ± 0%~(p=0.190 n=10+10)
RuntimeTransaction/copy_array_from_storage-2335k ± 0%335k ± 0%~(p=0.280 n=10+10)
RuntimeTransaction/get_account_and_get_balance-21.71M ± 0%1.71M ± 0%−0.00%(p=0.042 n=9+9)
RuntimeTransaction/transfer_tokens-2971k ± 0%971k ± 0%−0.01%(p=0.022 n=10+10)
RuntimeTransaction/borrow_array_from_storage-2379k ± 0%379k ± 0%−0.02%(p=0.000 n=10+10)
RuntimeTransaction/load_and_save_long_string_on_signers_address-2242k ± 0%242k ± 0%−0.02%(p=0.000 n=7+10)
RuntimeTransaction/get_signer_receiver-2222k ± 0%222k ± 0%−0.02%(p=0.000 n=10+10)
RuntimeTransaction/get_account_and_get_storage_used-2139k ± 0%139k ± 0%−0.03%(p=0.000 n=9+9)
RuntimeTransaction/get_signer_vault-2141k ± 0%141k ± 0%−0.03%(p=0.000 n=10+7)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2140k ± 0%140k ± 0%−0.03%(p=0.000 n=10+9)
RuntimeTransaction/emit_event-2151k ± 0%151k ± 0%−0.03%(p=0.000 n=10+10)
RuntimeTransaction/get_public_account-2118k ± 0%118k ± 0%−0.03%(p=0.000 n=10+9)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2118k ± 0%118k ± 0%−0.04%(p=0.000 n=9+10)
RuntimeTransaction/call_empty_contract_function-2106k ± 0%106k ± 0%−0.04%(p=0.000 n=8+10)
RuntimeTransaction/convert_int_to_string-2104k ± 0%104k ± 0%−0.04%(p=0.000 n=10+10)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-221.0M ± 0%21.0M ± 0%−0.05%(p=0.000 n=10+10)
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/reference_tx-289.5k ± 0%89.5k ± 0%−0.05%(p=0.000 n=10+10)
RuntimeTransaction/get_signer_address-294.7k ± 0%94.7k ± 0%−0.05%(p=0.000 n=10+10)
 
computationdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
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.60k ± 0%2.60k ± 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
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/reference_tx-244.4k ± 0%44.4k ± 0%~(all equal)
RuntimeTransaction/convert_int_to_string-244.4k ± 0%44.4k ± 0%~(all equal)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-244.4k ± 0%44.4k ± 0%~(all equal)
RuntimeTransaction/get_signer_address-244.4k ± 0%44.4k ± 0%~(all equal)
RuntimeTransaction/get_public_account-244.4k ± 0%44.4k ± 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.28M ± 0%5.28M ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_used-248.0k ± 0%48.0k ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_capacity-25.27M ± 0%5.27M ± 0%~(all equal)
RuntimeTransaction/get_signer_vault-244.7k ± 0%44.7k ± 0%~(all equal)
RuntimeTransaction/get_signer_receiver-245.0k ± 0%45.0k ± 0%~(all equal)
RuntimeTransaction/transfer_tokens-245.8k ± 0%45.8k ± 0%~(all equal)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-244.8k ± 0%44.8k ± 0%~(all equal)
RuntimeTransaction/load_and_save_long_string_on_signers_address-249.7k ± 0%49.7k ± 0%~(all equal)
RuntimeTransaction/create_new_account-28.53M ± 0%8.53M ± 0%~(all equal)
RuntimeTransaction/call_empty_contract_function-244.6k ± 0%44.6k ± 0%~(all equal)
RuntimeTransaction/emit_event-244.6k ± 0%44.6k ± 0%~(all equal)
RuntimeTransaction/borrow_array_from_storage-249.8k ± 0%49.8k ± 0%~(all equal)
RuntimeTransaction/copy_array_from_storage-249.8k ± 0%49.8k ± 0%~(all equal)
 
us/txdelta
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-22.36k ± 3%2.37k ± 3%~(p=0.528 n=10+10)
 

github-actions[bot] avatar Sep 14 '22 12:09 github-actions[bot]