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

Update Go version to 1.20 #4563

Merged
merged 8 commits into from
Jul 19, 2023
Merged

Update Go version to 1.20 #4563

merged 8 commits into from
Jul 19, 2023

Conversation

tarakby
Copy link
Contributor

@tarakby tarakby commented Jul 15, 2023

Update Go version to 1.20

@codecov-commenter
Copy link

codecov-commenter commented Jul 15, 2023

Codecov Report

Merging #4563 (e67bcc9) into master (2528190) will decrease coverage by 1.79%.
The diff coverage is 47.34%.

@@            Coverage Diff             @@
##           master    #4563      +/-   ##
==========================================
- Coverage   56.25%   54.46%   -1.79%     
==========================================
  Files         653      914     +261     
  Lines       64699    85278   +20579     
==========================================
+ Hits        36396    46447   +10051     
- Misses      25362    35247    +9885     
- Partials     2941     3584     +643     
Flag Coverage Δ
unittests 54.46% <47.34%> (-1.79%) ⬇️

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

Impacted Files Coverage Δ
cmd/scaffold.go 14.83% <0.00%> (+0.06%) ⬆️
engine/access/rpc/backend/backend_transactions.go 46.07% <0.00%> (-0.08%) ⬇️
model/flow/identifierList.go 22.36% <0.00%> (+0.84%) ⬆️
model/verification/chunkDataPackRequest.go 43.75% <0.00%> (-6.25%) ⬇️
module/metrics/herocache.go 0.00% <0.00%> (ø)
module/metrics/network.go 0.00% <0.00%> (ø)
module/metrics/noop.go 0.00% <0.00%> (ø)
network/p2p/inspector/internal/cache/cache.go 64.70% <ø> (ø)
network/p2p/middleware/middleware.go 1.71% <0.00%> (ø)
network/p2p/p2pbuilder/libp2pNodeBuilder.go 0.00% <0.00%> (ø)
... and 34 more

... and 242 files with indirect coverage changes

@github-actions
Copy link
Contributor

github-actions bot commented Jul 15, 2023

FVM Benchstat comparison

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

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/reference_tx-261.8ms ± 2%62.9ms ±16%~(p=0.639 n=5+7)
RuntimeTransaction/convert_int_to_string-263.1ms ± 6%71.5ms ±20%~(p=0.073 n=7+7)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-266.8ms ±14%66.5ms ± 4%~(p=0.620 n=7+7)
RuntimeTransaction/get_signer_address-264.4ms ±13%62.4ms ± 5%~(p=0.535 n=7+7)
RuntimeTransaction/get_account_and_get_balance-2548ms ±10%552ms ± 5%~(p=0.805 n=7+7)
RuntimeTransaction/get_account_and_get_available_balance-2545ms ± 4%545ms ± 9%~(p=0.805 n=7+7)
RuntimeTransaction/get_account_and_get_storage_used-268.9ms ± 4%69.1ms ±10%~(p=0.805 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-2516ms ±10%508ms ± 7%~(p=0.902 n=7+7)
RuntimeTransaction/get_signer_vault-272.5ms ± 8%70.3ms ± 4%~(p=0.318 n=7+7)
RuntimeTransaction/get_signer_receiver-288.6ms ± 9%88.1ms ± 4%~(p=0.805 n=7+7)
RuntimeTransaction/transfer_tokens-2313ms ± 3%308ms ± 5%~(p=0.699 n=6+6)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-270.9ms ± 3%70.4ms ± 4%~(p=0.710 n=7+7)
RuntimeTransaction/load_and_save_long_string_on_signers_address-2126ms ± 3%127ms ± 8%~(p=1.000 n=7+7)
RuntimeTransaction/create_new_account-21.10s ± 2%1.08s ± 6%~(p=0.234 n=6+7)
RuntimeTransaction/call_empty_contract_function-265.0ms ± 4%64.4ms ± 3%~(p=0.535 n=7+7)
RuntimeTransaction/emit_event-284.4ms ± 5%84.6ms ± 6%~(p=1.000 n=7+7)
RuntimeTransaction/borrow_array_from_storage-2189ms ± 4%188ms ± 4%~(p=0.589 n=6+6)
RuntimeTransaction/copy_array_from_storage-2195ms ± 7%195ms ± 4%~(p=1.000 n=7+7)
RuntimeNFTBatchTransfer-2167ms ± 6%163ms ± 6%~(p=0.259 n=7+7)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes/1/max-concurrency-27.85s ± 5%7.84s ± 1%~(p=0.731 n=7+6)
ComputeBlock/16/cols/128/txes/2/max-concurrency-28.24s ± 3%8.19s ± 3%~(p=0.456 n=7+7)
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/get_public_account-270.3ms ±17%65.2ms ± 6%−7.20%(p=0.035 n=7+6)
 
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-23.10k ± 0%3.10k ± 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/reference_tx-283.5k ± 0%83.5k ± 0%~(p=0.408 n=7+7)
RuntimeTransaction/convert_int_to_string-283.5k ± 0%83.5k ± 0%~(p=0.878 n=7+7)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-283.5k ± 0%83.5k ± 0%~(p=1.000 n=7+7)
RuntimeTransaction/get_signer_address-283.5k ± 0%83.5k ± 0%~(p=0.705 n=7+7)
RuntimeTransaction/get_public_account-283.5k ± 0%83.5k ± 0%~(p=0.433 n=7+7)
RuntimeTransaction/get_account_and_get_balance-291.7k ± 0%91.7k ± 0%~(p=0.592 n=7+6)
RuntimeTransaction/get_account_and_get_available_balance-283.5k ± 0%83.5k ± 0%~(p=1.000 n=7+7)
RuntimeTransaction/get_account_and_get_storage_used-283.5k ± 0%83.5k ± 0%~(p=0.972 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-283.5k ± 0%83.5k ± 0%~(p=0.237 n=6+7)
RuntimeTransaction/get_signer_vault-283.5k ± 0%83.5k ± 0%~(p=0.347 n=6+7)
RuntimeTransaction/get_signer_receiver-283.5k ± 0%83.5k ± 0%~(p=0.631 n=7+6)
RuntimeTransaction/transfer_tokens-283.5k ± 0%83.5k ± 0%~(p=0.636 n=7+5)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-283.7k ± 0%83.7k ± 0%~(p=0.481 n=7+7)
RuntimeTransaction/load_and_save_long_string_on_signers_address-287.5k ± 0%87.5k ± 0%~(p=0.172 n=7+6)
RuntimeTransaction/call_empty_contract_function-283.7k ± 0%83.7k ± 0%~(p=0.528 n=7+7)
RuntimeTransaction/emit_event-283.7k ± 0%83.7k ± 0%~(p=0.499 n=6+7)
RuntimeTransaction/borrow_array_from_storage-288.8k ± 0%88.8k ± 0%~(p=0.167 n=7+6)
RuntimeTransaction/copy_array_from_storage-288.8k ± 0%88.8k ± 0%~(p=0.558 n=7+7)
RuntimeTransaction/create_new_account-2130k ± 0%130k ± 0%−0.00%(p=0.020 n=7+5)
 
alloc/opdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/reference_tx-240.0MB ± 5%40.2MB ± 4%~(p=0.805 n=7+7)
RuntimeTransaction/convert_int_to_string-239.9MB ± 3%39.9MB ± 4%~(p=0.902 n=7+7)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-240.1MB ± 3%40.9MB ± 3%~(p=0.165 n=7+7)
RuntimeTransaction/get_signer_address-239.7MB ± 4%39.8MB ± 4%~(p=0.805 n=7+7)
RuntimeTransaction/get_public_account-241.2MB ± 5%41.0MB ± 2%~(p=0.456 n=7+7)
RuntimeTransaction/get_account_and_get_balance-2176MB ± 2%176MB ± 2%~(p=0.259 n=7+7)
RuntimeTransaction/get_account_and_get_available_balance-2159MB ± 2%160MB ± 0%~(p=0.445 n=7+6)
RuntimeTransaction/get_account_and_get_storage_used-241.9MB ± 4%41.9MB ± 4%~(p=0.805 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-2154MB ± 4%154MB ± 2%~(p=0.902 n=7+7)
RuntimeTransaction/get_signer_vault-240.8MB ± 4%41.3MB ± 5%~(p=0.456 n=7+7)
RuntimeTransaction/get_signer_receiver-244.4MB ± 4%44.4MB ± 3%~(p=0.902 n=7+7)
RuntimeTransaction/transfer_tokens-291.0MB ± 3%89.3MB ± 8%~(p=0.535 n=7+7)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-240.3MB ± 2%40.9MB ± 3%~(p=0.165 n=7+7)
RuntimeTransaction/load_and_save_long_string_on_signers_address-257.9MB ± 4%58.0MB ± 3%~(p=1.000 n=7+7)
RuntimeTransaction/create_new_account-2216MB ± 3%212MB ± 3%~(p=0.053 n=7+7)
RuntimeTransaction/call_empty_contract_function-240.5MB ± 6%40.3MB ± 3%~(p=1.000 n=7+7)
RuntimeTransaction/emit_event-245.0MB ± 4%45.3MB ± 7%~(p=0.902 n=7+7)
RuntimeTransaction/borrow_array_from_storage-271.3MB ± 3%71.8MB ± 3%~(p=0.628 n=6+7)
RuntimeTransaction/copy_array_from_storage-285.2MB ± 5%85.1MB ± 3%~(p=0.805 n=7+7)
RuntimeNFTBatchTransfer-258.2MB ± 4%57.4MB ± 5%~(p=0.620 n=7+7)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes/1/max-concurrency-21.65GB ± 1%1.66GB ± 0%~(p=0.106 n=7+5)
ComputeBlock/16/cols/128/txes/2/max-concurrency-21.71GB ± 0%1.70GB ± 1%~(p=0.535 n=7+7)
 
allocs/opdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/get_account_and_get_storage_used-2170k ± 0%170k ± 0%+0.01%(p=0.035 n=7+7)
RuntimeTransaction/reference_tx-2130k ± 0%130k ± 0%~(p=0.927 n=7+7)
RuntimeTransaction/convert_int_to_string-2141k ± 0%141k ± 0%~(p=0.402 n=7+7)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2152k ± 0%152k ± 0%~(p=0.128 n=7+6)
RuntimeTransaction/get_signer_address-2134k ± 0%134k ± 0%~(p=0.817 n=7+6)
RuntimeTransaction/get_public_account-2158k ± 0%158k ± 0%~(p=0.456 n=7+7)
RuntimeTransaction/get_account_and_get_balance-21.86M ± 0%1.86M ± 0%~(p=0.913 n=7+6)
RuntimeTransaction/get_account_and_get_available_balance-21.81M ± 0%1.81M ± 0%~(p=0.535 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-21.68M ± 0%1.68M ± 0%~(p=0.902 n=7+7)
RuntimeTransaction/get_signer_vault-2175k ± 0%175k ± 0%~(p=0.597 n=7+7)
RuntimeTransaction/get_signer_receiver-2261k ± 0%261k ± 0%~(p=0.973 n=6+7)
RuntimeTransaction/transfer_tokens-2921k ± 0%921k ± 0%~(p=0.535 n=7+7)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2181k ± 0%181k ± 0%~(p=0.300 n=7+7)
RuntimeTransaction/load_and_save_long_string_on_signers_address-2264k ± 0%264k ± 0%~(p=0.534 n=6+7)
RuntimeTransaction/create_new_account-22.67M ± 0%2.67M ± 0%~(p=0.945 n=7+6)
RuntimeTransaction/emit_event-2189k ± 0%189k ± 0%~(p=0.734 n=7+7)
RuntimeTransaction/borrow_array_from_storage-2410k ± 0%410k ± 0%~(p=0.220 n=6+7)
RuntimeTransaction/copy_array_from_storage-2346k ± 0%346k ± 0%~(p=0.073 n=7+7)
RuntimeNFTBatchTransfer-2315k ± 0%315k ± 0%~(p=0.639 n=7+5)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes/1/max-concurrency-221.9M ± 0%22.0M ± 0%~(p=0.318 n=7+7)
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/call_empty_contract_function-2148k ± 0%148k ± 0%−0.01%(p=0.012 n=7+7)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes/2/max-concurrency-222.6M ± 0%22.6M ± 0%−0.02%(p=0.030 n=5+7)
 
us/txdelta
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes/1/max-concurrency-23.83k ± 5%3.83k ± 1%~(p=0.731 n=7+6)
ComputeBlock/16/cols/128/txes/2/max-concurrency-24.02k ± 3%4.00k ± 3%~(p=0.456 n=7+7)
 

@tarakby tarakby changed the title [go1.20] wip Update Go version to 1.20 Jul 17, 2023
@@ -417,7 +417,7 @@ func BlockHeaderFixture(opts ...func(header *flow.Header)) *flow.Header {

func CidFixture() cid.Cid {
data := make([]byte, 1024)
_, _ = rand.Read(data)
_, _ = crand.Read(data)
Copy link
Contributor

Choose a reason for hiding this comment

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

it'd be best not to swallow this error. Maybe update the method either to accept a testing object and require no error, or just return the error. It doesn't look like this fixture is even used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would rather delete non-used functions. Thanks for the flag!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At the same time, for fixtures I think failing randomness would just lead to the byte array remaining all zeros, which is still a valid "fixture".

Copy link
Contributor

@peterargue peterargue left a comment

Choose a reason for hiding this comment

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

Added one comment, but otherwise looks good

@tarakby
Copy link
Contributor Author

tarakby commented Jul 19, 2023

bors merge

@bors bors bot merged commit 1aff7f9 into master Jul 19, 2023
33 of 34 checks passed
@bors bors bot deleted the tarak/go1.20 branch July 19, 2023 01:39
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.

6 participants