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

Upgrade core contracts #3733

Merged
merged 1 commit into from
Jan 4, 2023
Merged

Upgrade core contracts #3733

merged 1 commit into from
Jan 4, 2023

Conversation

janezpodhostnik
Copy link
Contributor

@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2022

Codecov Report

Merging #3733 (ae704df) into master (69f0be7) will decrease coverage by 0.12%.
The diff coverage is 78.48%.

@@            Coverage Diff             @@
##           master    #3733      +/-   ##
==========================================
- Coverage   55.50%   55.37%   -0.13%     
==========================================
  Files         765      769       +4     
  Lines       69798    70257     +459     
==========================================
+ Hits        38739    38906     +167     
- Misses      27881    28163     +282     
- Partials     3178     3188      +10     
Flag Coverage Δ
unittests 55.37% <78.48%> (-0.13%) ⬇️

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

Impacted Files Coverage Δ
cmd/scaffold.go 15.75% <0.00%> (-0.02%) ⬇️
...gine/execution/computation/computer/spock_relic.go 0.00% <0.00%> (ø)
engine/execution/messages.go 100.00% <ø> (ø)
network/p2p/p2pbuilder/libp2pNodeBuilder.go 0.00% <0.00%> (ø)
network/p2p/unicast/ratelimit/noop_rate_limiter.go 0.00% <0.00%> (ø)
network/p2p/unicast/ratelimit/rate_limiters.go 0.00% <0.00%> (ø)
network/validator/any_validator.go 0.00% <0.00%> (ø)
network/validator/not_validator.go 0.00% <0.00%> (ø)
network/validator/origin_validator.go 0.00% <0.00%> (ø)
network/validator/sender_validator.go 0.00% <0.00%> (ø)
... and 26 more

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2022

FVM Benchstat comparison

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

The command (for i in {1..7}; 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
RuntimeTransaction/get_account_and_get_available_balance-2249ms ± 2%265ms ± 1%+6.47%(p=0.001 n=7+6)
RuntimeTransaction/get_signer_address-231.2ms ± 2%32.9ms ± 7%+5.51%(p=0.002 n=6+6)
RuntimeTransaction/get_public_account-233.3ms ± 3%34.6ms ± 3%+4.04%(p=0.022 n=6+7)
RuntimeTransaction/convert_int_to_string-231.7ms ± 4%32.9ms ± 2%+3.86%(p=0.015 n=6+6)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-24.26s ± 3%4.42s ± 3%+3.76%(p=0.001 n=7+7)
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/get_signer_vault-237.6ms ± 4%39.0ms ± 3%+3.68%(p=0.022 n=6+7)
RuntimeTransaction/get_account_and_get_balance-2277ms ± 2%286ms ± 3%+3.36%(p=0.014 n=6+7)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-236.6ms ± 1%37.8ms ± 3%+3.17%(p=0.007 n=7+7)
RuntimeTransaction/reference_tx-230.4ms ± 3%31.1ms ± 3%+2.14%(p=0.038 n=7+7)
RuntimeNFTBatchTransfer-2111ms ± 1%113ms ± 6%~(p=0.310 n=6+6)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-234.0ms ± 7%34.5ms ± 3%~(p=0.394 n=6+6)
RuntimeTransaction/get_account_and_get_storage_used-234.9ms ± 4%35.7ms ± 4%~(p=0.165 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-2233ms ± 9%237ms ± 1%~(p=0.181 n=7+6)
RuntimeTransaction/get_signer_receiver-247.7ms ± 6%48.6ms ± 3%~(p=0.383 n=7+7)
RuntimeTransaction/transfer_tokens-2192ms ± 2%194ms ± 1%~(p=0.295 n=7+6)
RuntimeTransaction/load_and_save_long_string_on_signers_address-275.6ms ± 1%76.5ms ± 4%~(p=0.366 n=6+7)
RuntimeTransaction/create_new_account-2777ms ± 1%782ms ± 2%~(p=0.259 n=7+7)
RuntimeTransaction/call_empty_contract_function-233.4ms ± 4%34.3ms ± 4%~(p=0.053 n=7+7)
RuntimeTransaction/emit_event-246.0ms ± 6%46.4ms ± 3%~(p=0.902 n=7+7)
RuntimeTransaction/borrow_array_from_storage-2131ms ± 2%132ms ± 2%~(p=0.209 n=7+7)
RuntimeTransaction/copy_array_from_storage-2133ms ± 1%134ms ± 3%~(p=0.628 n=6+7)
 
alloc/opdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/get_account_and_get_available_balance-2105MB ± 2%108MB ± 0%+2.85%(p=0.003 n=7+5)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-21.20GB ± 2%1.22GB ± 0%+1.56%(p=0.017 n=7+7)
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeNFTBatchTransfer-253.3MB ± 3%53.6MB ± 4%~(p=0.710 n=7+7)
RuntimeTransaction/reference_tx-234.8MB ± 4%34.7MB ± 2%~(p=0.620 n=7+7)
RuntimeTransaction/convert_int_to_string-235.0MB ± 3%35.2MB ± 3%~(p=0.535 n=7+7)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-235.4MB ± 4%35.6MB ± 3%~(p=0.620 n=7+7)
RuntimeTransaction/get_signer_address-234.6MB ± 3%34.9MB ± 1%~(p=0.138 n=7+6)
RuntimeTransaction/get_public_account-236.2MB ± 2%36.6MB ± 2%~(p=0.456 n=7+7)
RuntimeTransaction/get_account_and_get_balance-2123MB ± 1%123MB ± 2%~(p=0.805 n=7+7)
RuntimeTransaction/get_account_and_get_storage_used-236.0MB ± 2%36.3MB ± 5%~(p=0.535 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-2104MB ± 1%104MB ± 3%~(p=0.383 n=7+7)
RuntimeTransaction/get_signer_vault-237.0MB ± 5%37.1MB ± 5%~(p=0.902 n=7+7)
RuntimeTransaction/get_signer_receiver-240.6MB ± 6%40.8MB ± 4%~(p=1.000 n=7+7)
RuntimeTransaction/transfer_tokens-282.4MB ± 3%84.1MB ± 4%~(p=0.073 n=7+7)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-235.6MB ± 2%35.9MB ± 4%~(p=0.259 n=7+7)
RuntimeTransaction/load_and_save_long_string_on_signers_address-252.1MB ± 3%51.8MB ± 2%~(p=0.534 n=7+6)
RuntimeTransaction/create_new_account-2186MB ± 0%185MB ± 3%~(p=0.755 n=5+7)
RuntimeTransaction/call_empty_contract_function-235.7MB ± 3%35.8MB ± 2%~(p=1.000 n=7+7)
RuntimeTransaction/emit_event-239.5MB ± 6%39.3MB ± 3%~(p=0.383 n=7+7)
RuntimeTransaction/borrow_array_from_storage-270.5MB ± 4%71.1MB ± 3%~(p=0.620 n=7+7)
RuntimeTransaction/copy_array_from_storage-282.0MB ± 3%82.4MB ± 1%~(p=0.383 n=7+7)
 
allocs/opdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/get_account_and_get_available_balance-21.20M ± 0%1.25M ± 0%+4.77%(p=0.001 n=7+7)
RuntimeTransaction/reference_tx-280.1k ± 0%83.2k ± 0%+3.85%(p=0.001 n=7+7)
RuntimeTransaction/get_signer_address-284.3k ± 0%87.3k ± 0%+3.67%(p=0.001 n=7+7)
RuntimeTransaction/convert_int_to_string-292.3k ± 0%95.3k ± 0%+3.35%(p=0.001 n=7+7)
RuntimeTransaction/call_empty_contract_function-295.6k ± 0%98.7k ± 0%+3.22%(p=0.001 n=7+7)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-216.9M ± 0%17.5M ± 0%+3.17%(p=0.001 n=7+7)
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2103k ± 0%107k ± 0%+2.98%(p=0.001 n=7+7)
RuntimeTransaction/get_public_account-2106k ± 0%110k ± 0%+2.91%(p=0.001 n=7+7)
RuntimeTransaction/get_account_and_get_storage_used-2116k ± 0%120k ± 0%+2.65%(p=0.001 n=7+7)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2119k ± 0%122k ± 0%+2.59%(p=0.001 n=7+7)
RuntimeTransaction/get_signer_vault-2121k ± 0%124k ± 0%+2.56%(p=0.001 n=7+7)
RuntimeTransaction/emit_event-2135k ± 0%138k ± 0%+2.28%(p=0.001 n=7+7)
RuntimeNFTBatchTransfer-2268k ± 1%273k ± 0%+1.60%(p=0.001 n=7+7)
RuntimeTransaction/load_and_save_long_string_on_signers_address-2194k ± 0%197k ± 0%+1.60%(p=0.001 n=7+7)
RuntimeTransaction/get_signer_receiver-2195k ± 0%198k ± 0%+1.58%(p=0.001 n=7+7)
RuntimeTransaction/copy_array_from_storage-2290k ± 0%293k ± 0%+1.06%(p=0.001 n=7+7)
RuntimeTransaction/borrow_array_from_storage-2334k ± 0%337k ± 0%+0.93%(p=0.001 n=7+6)
RuntimeTransaction/get_account_and_get_storage_capacity-21.12M ± 0%1.13M ± 0%+0.54%(p=0.001 n=7+7)
RuntimeTransaction/get_account_and_get_balance-21.32M ± 0%1.32M ± 0%+0.46%(p=0.001 n=6+7)
RuntimeTransaction/transfer_tokens-2840k ± 0%843k ± 0%+0.36%(p=0.001 n=7+6)
RuntimeTransaction/create_new_account-22.31M ± 0%2.32M ± 0%+0.20%(p=0.001 n=7+7)
 
computationdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/get_account_and_get_available_balance-22.60k ± 0%3.10k ± 0%+19.22%(p=0.001 n=7+7)
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_storage_used-2402 ± 0%402 ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_capacity-21.70k ± 0%1.70k ± 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/get_account_and_get_available_balance-25.54M ± 0%5.64M ± 0%+1.68%(p=0.001 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-25.54M ± 0%5.64M ± 0%+1.68%(p=0.001 n=7+7)
RuntimeTransaction/get_account_and_get_balance-223.9M ± 0%24.3M ± 0%+1.46%(p=0.001 n=7+7)
RuntimeTransaction/create_new_account-212.2M ± 0%12.3M ± 0%+1.45%(p=0.001 n=7+7)
RuntimeTransaction/transfer_tokens-2327k ± 0%331k ± 0%+1.33%(p=0.001 n=7+7)
RuntimeTransaction/reference_tx-2327k ± 0%331k ± 0%+1.33%(p=0.001 n=7+7)
RuntimeTransaction/convert_int_to_string-2327k ± 0%331k ± 0%+1.33%(p=0.001 n=7+7)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2327k ± 0%331k ± 0%+1.33%(p=0.001 n=7+7)
RuntimeTransaction/get_signer_address-2327k ± 0%331k ± 0%+1.33%(p=0.001 n=7+7)
RuntimeTransaction/get_public_account-2327k ± 0%331k ± 0%+1.33%(p=0.001 n=7+7)
RuntimeTransaction/get_account_and_get_storage_used-2327k ± 0%331k ± 0%+1.33%(p=0.001 n=7+7)
RuntimeTransaction/get_signer_vault-2327k ± 0%331k ± 0%+1.33%(p=0.001 n=7+7)
RuntimeTransaction/get_signer_receiver-2327k ± 0%331k ± 0%+1.33%(p=0.001 n=7+7)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2327k ± 0%331k ± 0%+1.33%(p=0.001 n=7+7)
RuntimeTransaction/call_empty_contract_function-2327k ± 0%331k ± 0%+1.33%(p=0.001 n=7+7)
RuntimeTransaction/emit_event-2327k ± 0%331k ± 0%+1.33%(p=0.001 n=7+7)
RuntimeTransaction/load_and_save_long_string_on_signers_address-2329k ± 0%334k ± 0%+1.32%(p=0.001 n=7+7)
RuntimeTransaction/borrow_array_from_storage-2332k ± 0%336k ± 0%+1.31%(p=0.001 n=7+7)
RuntimeTransaction/copy_array_from_storage-2332k ± 0%336k ± 0%+1.31%(p=0.001 n=7+7)
 
us/txdelta
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-22.08k ± 3%2.16k ± 3%+3.76%(p=0.001 n=7+7)
 

@janezpodhostnik
Copy link
Contributor Author

I had to rollback some test changes made in #3473 due to the payer balance check change in onflow/flow-core-contracts#331

@janezpodhostnik
Copy link
Contributor Author

bors merge

@bors bors bot merged commit 8ff3253 into master Jan 4, 2023
@bors bors bot deleted the janez/upgrade-core-contracts-again branch January 4, 2023 14:16
bors bot added a commit that referenced this pull request Feb 3, 2023
3770: Upgrade core contracts - port to v0.29 r=janezpodhostnik a=janezpodhostnik

Port of #3733 to v0.29

This doesn't actually change anything for canary testnet or mainnet since the core contracts are already (or will be for mainnet) at the correct version. 

This does affect transient networks (most notably the emulator), due to a slightly different version of the contracts being deployed.

Co-authored-by: Janez Podhostnik <[email protected]>
bors bot added a commit that referenced this pull request Feb 3, 2023
3770: Upgrade core contracts - port to v0.29 r=janezpodhostnik a=janezpodhostnik

Port of #3733 to v0.29

This doesn't actually change anything for canary testnet or mainnet since the core contracts are already (or will be for mainnet) at the correct version. 

This does affect transient networks (most notably the emulator), due to a slightly different version of the contracts being deployed.

Co-authored-by: Janez Podhostnik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Execution Cadence Execution Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants