flow-go
flow-go copied to clipboard
[Consensus] Update disabled integration tests
https://github.com/dapperlabs/flow-go/issues/6201
Context
This PR enables previously disabled integration tests. Test suits were extended to support new functionality(support for timeout aggregator for instance). Also some changes were made to the actual logic to address some discovered issues.
Important changes:
-
EventHandler
now stores newly created proposal in forks and has extra logic to check if he has already proposed in this round. Due to async design it could happen that event handler tries to create proposal twice for same round. Maybe we will be able to update compliance engine in future to pass each proposal only once for but now it appears to me as a good solution. - Updated compliance engine to accept block ranges, this code is on master but I have made a mistake when merging so now it's fixed.
Codecov Report
Merging #2935 (4c603db) into feature/active-pacemaker (76440a7) will decrease coverage by
0.02%
. The diff coverage is50.80%
.
@@ Coverage Diff @@
## feature/active-pacemaker #2935 +/- ##
============================================================
- Coverage 56.70% 56.68% -0.03%
============================================================
Files 695 695
Lines 64890 64929 +39
============================================================
+ Hits 36797 36803 +6
- Misses 24998 25025 +27
- Partials 3095 3101 +6
Flag | Coverage Δ | |
---|---|---|
unittests | 56.68% <50.80%> (-0.03%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
storage/badger/blocks.go | 51.76% <0.00%> (ø) |
|
engine/collection/compliance/engine.go | 63.56% <34.61%> (-0.55%) |
:arrow_down: |
engine/consensus/compliance/engine.go | 63.58% <42.85%> (-2.89%) |
:arrow_down: |
consensus/hotstuff/eventhandler/event_handler.go | 74.09% <88.88%> (-0.56%) |
:arrow_down: |
utils/debug/profiler.go | 78.12% <0.00%> (-6.25%) |
:arrow_down: |
engine/access/ingestion/engine.go | 62.67% <0.00%> (-0.20%) |
:arrow_down: |
fvm/handler/contract.go | 89.93% <0.00%> (+1.34%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
FVM Benchstat comparison
This branch with compared with the base branch onflow:feature/active-pacemaker commit c5443e73fa94b81fa51a64d79bec3ac8e84529e1
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.txt | new.txt | |||
---|---|---|---|---|
time/op | delta | |||
RuntimeTransaction/reference_tx-2 | 26.6ms ± 1% | 28.4ms ±17% | +6.76% | (p=0.010 n=9+10) |
RuntimeTransaction/convert_int_to_string-2 | 27.9ms ± 2% | 28.5ms ± 1% | +1.95% | (p=0.001 n=8+9) |
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 29.6ms ± 1% | 30.1ms ± 4% | +1.73% | (p=0.003 n=10+8) |
RuntimeTransaction/copy_array_from_storage-2 | 107ms ± 2% | 109ms ± 2% | +1.59% | (p=0.022 n=9+10) |
RuntimeTransaction/get_signer_address-2 | 27.0ms ± 1% | 27.5ms ± 5% | +1.55% | (p=0.036 n=8+9) |
RuntimeTransaction/get_public_account-2 | 29.7ms ± 1% | 30.1ms ± 1% | +1.43% | (p=0.000 n=9+10) |
RuntimeTransaction/emit_event-2 | 43.4ms ± 1% | 44.0ms ± 1% | +1.42% | (p=0.000 n=9+8) |
RuntimeTransaction/create_new_account-2 | 1.05s ± 2% | 1.06s ± 1% | +1.35% | (p=0.004 n=10+10) |
RuntimeTransaction/get_account_and_get_available_balance-2 | 367ms ± 1% | 372ms ± 2% | +1.29% | (p=0.005 n=10+10) |
RuntimeNFTBatchTransfer-2 | 113ms ± 2% | 114ms ± 2% | +1.16% | (p=0.019 n=10+10) |
RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 74.9ms ± 1% | 75.7ms ± 3% | +1.08% | (p=0.028 n=9+10) |
RuntimeTransaction/get_account_and_get_balance-2 | 457ms ± 2% | 461ms ± 1% | +0.78% | (p=0.022 n=9+10) |
RuntimeTransaction/transfer_tokens-2 | 175ms ± 1% | 177ms ± 1% | +0.68% | (p=0.029 n=10+10) |
RuntimeTransaction/call_empty_contract_function-2 | 29.2ms ± 1% | 29.4ms ± 1% | +0.63% | (p=0.043 n=10+8) |
RuntimeTransaction/borrow_array_from_storage-2 | 109ms ± 1% | 109ms ± 1% | +0.60% | (p=0.043 n=10+10) |
RuntimeTransaction/get_account_and_get_storage_used-2 | 34.5ms ± 1% | 34.7ms ± 1% | ~ | (p=0.052 n=10+10) |
RuntimeTransaction/get_account_and_get_storage_capacity-2 | 342ms ± 1% | 345ms ± 2% | ~ | (p=0.053 n=9+10) |
RuntimeTransaction/get_signer_vault-2 | 34.2ms ± 2% | 34.5ms ± 1% | ~ | (p=0.089 n=10+10) |
RuntimeTransaction/get_signer_receiver-2 | 44.1ms ± 2% | 44.2ms ± 1% | ~ | (p=0.796 n=10+10) |
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 33.5ms ± 2% | 33.8ms ± 1% | ~ | (p=0.065 n=9+10) |
alloc/op | delta | |||
RuntimeTransaction/get_account_and_get_storage_capacity-2 | 142MB ± 0% | 142MB ± 0% | +0.03% | (p=0.010 n=10+9) |
RuntimeNFTBatchTransfer-2 | 27.9MB ± 0% | 27.9MB ± 0% | ~ | (p=0.515 n=10+8) |
RuntimeTransaction/reference_tx-2 | 9.21MB ± 1% | 9.22MB ± 0% | ~ | (p=0.497 n=10+9) |
RuntimeTransaction/convert_int_to_string-2 | 9.67MB ± 0% | 9.67MB ± 0% | ~ | (p=0.684 n=10+10) |
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 10.2MB ± 0% | 10.2MB ± 1% | ~ | (p=0.436 n=10+10) |
RuntimeTransaction/get_signer_address-2 | 9.44MB ± 1% | 9.42MB ± 0% | ~ | (p=0.497 n=10+9) |
RuntimeTransaction/get_public_account-2 | 10.9MB ± 0% | 10.9MB ± 0% | ~ | (p=0.146 n=8+10) |
RuntimeTransaction/get_account_and_get_balance-2 | 197MB ± 0% | 197MB ± 0% | ~ | (p=0.123 n=10+10) |
RuntimeTransaction/get_account_and_get_available_balance-2 | 147MB ± 0% | 147MB ± 0% | ~ | (p=0.853 n=10+10) |
RuntimeTransaction/get_account_and_get_storage_used-2 | 12.3MB ± 0% | 12.3MB ± 0% | ~ | (p=0.796 n=10+10) |
RuntimeTransaction/get_signer_vault-2 | 11.4MB ± 0% | 11.4MB ± 0% | ~ | (p=0.971 n=10+10) |
RuntimeTransaction/transfer_tokens-2 | 50.6MB ± 0% | 50.5MB ± 0% | ~ | (p=0.780 n=10+9) |
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 10.9MB ± 0% | 10.9MB ± 0% | ~ | (p=0.436 n=10+10) |
RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 25.6MB ± 0% | 25.6MB ± 0% | ~ | (p=0.971 n=10+10) |
RuntimeTransaction/create_new_account-2 | 284MB ± 0% | 284MB ± 0% | ~ | (p=0.604 n=9+10) |
RuntimeTransaction/emit_event-2 | 14.3MB ± 0% | 14.3MB ± 0% | ~ | (p=0.661 n=9+10) |
RuntimeTransaction/borrow_array_from_storage-2 | 35.6MB ± 0% | 35.5MB ± 0% | ~ | (p=0.063 n=10+10) |
RuntimeTransaction/copy_array_from_storage-2 | 46.7MB ± 0% | 46.7MB ± 0% | ~ | (p=0.684 n=10+10) |
RuntimeTransaction/call_empty_contract_function-2 | 10.0MB ± 0% | 10.0MB ± 0% | −0.14% | (p=0.035 n=10+10) |
RuntimeTransaction/get_signer_receiver-2 | 15.2MB ± 0% | 15.2MB ± 0% | −0.35% | (p=0.017 n=10+9) |
allocs/op | delta | |||
RuntimeNFTBatchTransfer-2 | 381k ± 0% | 381k ± 0% | ~ | (p=0.951 n=9+10) |
RuntimeTransaction/convert_int_to_string-2 | 162k ± 0% | 162k ± 0% | ~ | (p=0.160 n=10+9) |
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 176k ± 0% | 176k ± 0% | ~ | (p=0.344 n=10+9) |
RuntimeTransaction/get_signer_address-2 | 152k ± 0% | 152k ± 0% | ~ | (p=0.064 n=9+9) |
RuntimeTransaction/get_public_account-2 | 184k ± 0% | 184k ± 0% | ~ | (p=0.741 n=8+9) |
RuntimeTransaction/get_account_and_get_balance-2 | 3.27M ± 0% | 3.27M ± 0% | ~ | (p=0.156 n=9+10) |
RuntimeTransaction/get_account_and_get_available_balance-2 | 2.64M ± 0% | 2.64M ± 0% | ~ | (p=0.271 n=10+10) |
RuntimeTransaction/get_account_and_get_storage_used-2 | 205k ± 0% | 205k ± 0% | ~ | (p=0.361 n=10+10) |
RuntimeTransaction/get_account_and_get_storage_capacity-2 | 2.49M ± 0% | 2.49M ± 0% | ~ | (p=0.968 n=9+10) |
RuntimeTransaction/get_signer_vault-2 | 200k ± 0% | 200k ± 0% | ~ | (p=0.251 n=9+10) |
RuntimeTransaction/get_signer_receiver-2 | 289k ± 0% | 289k ± 0% | ~ | (p=0.403 n=10+10) |
RuntimeTransaction/transfer_tokens-2 | 1.06M ± 0% | 1.06M ± 0% | ~ | (p=0.108 n=10+9) |
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 198k ± 0% | 198k ± 0% | ~ | (p=0.148 n=10+10) |
RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 297k ± 0% | 297k ± 0% | ~ | (p=0.642 n=10+10) |
RuntimeTransaction/create_new_account-2 | 4.47M ± 0% | 4.47M ± 0% | ~ | (p=0.447 n=9+10) |
RuntimeTransaction/call_empty_contract_function-2 | 164k ± 0% | 164k ± 0% | ~ | (p=0.431 n=9+10) |
RuntimeTransaction/emit_event-2 | 211k ± 0% | 211k ± 0% | ~ | (p=0.779 n=10+8) |
RuntimeTransaction/copy_array_from_storage-2 | 394k ± 0% | 394k ± 0% | ~ | (p=0.753 n=10+10) |
RuntimeTransaction/borrow_array_from_storage-2 | 437k ± 0% | 437k ± 0% | −0.00% | (p=0.017 n=10+10) |
RuntimeTransaction/reference_tx-2 | 147k ± 0% | 147k ± 0% | −0.00% | (p=0.027 n=9+9) |
computation | delta | |||
RuntimeTransaction/reference_tx-2 | 202 ± 0% | 202 ± 0% | ~ | (all equal) |
RuntimeTransaction/convert_int_to_string-2 | 402 ± 0% | 402 ± 0% | ~ | (all equal) |
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 502 ± 0% | 502 ± 0% | ~ | (all equal) |
RuntimeTransaction/get_signer_address-2 | 302 ± 0% | 302 ± 0% | ~ | (all equal) |
RuntimeTransaction/get_public_account-2 | 402 ± 0% | 402 ± 0% | ~ | (all equal) |
RuntimeTransaction/get_account_and_get_balance-2 | 1.00k ± 0% | 1.00k ± 0% | ~ | (all equal) |
RuntimeTransaction/get_account_and_get_available_balance-2 | 2.50k ± 0% | 2.50k ± 0% | ~ | (all equal) |
RuntimeTransaction/get_account_and_get_storage_used-2 | 402 ± 0% | 402 ± 0% | ~ | (all equal) |
RuntimeTransaction/get_account_and_get_storage_capacity-2 | 1.30k ± 0% | 1.30k ± 0% | ~ | (all equal) |
RuntimeTransaction/get_signer_vault-2 | 402 ± 0% | 402 ± 0% | ~ | (all equal) |
RuntimeTransaction/get_signer_receiver-2 | 602 ± 0% | 602 ± 0% | ~ | (all equal) |
RuntimeTransaction/transfer_tokens-2 | 3.50k ± 0% | 3.50k ± 0% | ~ | (all equal) |
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 602 ± 0% | 602 ± 0% | ~ | (all equal) |
RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 602 ± 0% | 602 ± 0% | ~ | (all equal) |
RuntimeTransaction/create_new_account-2 | 202 ± 0% | 202 ± 0% | ~ | (all equal) |
RuntimeTransaction/call_empty_contract_function-2 | 402 ± 0% | 402 ± 0% | ~ | (all equal) |
RuntimeTransaction/emit_event-2 | 602 ± 0% | 602 ± 0% | ~ | (all equal) |
RuntimeTransaction/borrow_array_from_storage-2 | 2.60k ± 0% | 2.60k ± 0% | ~ | (all equal) |
RuntimeTransaction/copy_array_from_storage-2 | 2.60k ± 0% | 2.60k ± 0% | ~ | (all equal) |
interactions | delta | |||
RuntimeTransaction/reference_tx-2 | 47.4k ± 0% | 47.4k ± 0% | ~ | (all equal) |
RuntimeTransaction/convert_int_to_string-2 | 47.4k ± 0% | 47.4k ± 0% | ~ | (all equal) |
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 47.4k ± 0% | 47.4k ± 0% | ~ | (all equal) |
RuntimeTransaction/get_signer_address-2 | 47.4k ± 0% | 47.4k ± 0% | ~ | (all equal) |
RuntimeTransaction/get_public_account-2 | 47.4k ± 0% | 47.4k ± 0% | ~ | (all equal) |
RuntimeTransaction/get_account_and_get_balance-2 | 16.7M ± 0% | 16.7M ± 0% | ~ | (all equal) |
RuntimeTransaction/get_account_and_get_available_balance-2 | 5.30M ± 0% | 5.30M ± 0% | ~ | (all equal) |
RuntimeTransaction/get_account_and_get_storage_used-2 | 50.2k ± 0% | 50.2k ± 0% | ~ | (all equal) |
RuntimeTransaction/get_account_and_get_storage_capacity-2 | 5.30M ± 0% | 5.30M ± 0% | ~ | (all equal) |
RuntimeTransaction/get_signer_vault-2 | 48.6k ± 0% | 48.6k ± 0% | ~ | (all equal) |
RuntimeTransaction/get_signer_receiver-2 | 49.0k ± 0% | 49.0k ± 0% | ~ | (all equal) |
RuntimeTransaction/transfer_tokens-2 | 49.8k ± 0% | 49.8k ± 0% | ~ | (all equal) |
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 50.9k ± 0% | 50.9k ± 0% | ~ | (all equal) |
RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 55.9k ± 0% | 55.9k ± 0% | ~ | (all equal) |
RuntimeTransaction/create_new_account-2 | 8.43M ± 0% | 8.43M ± 0% | ~ | (all equal) |
RuntimeTransaction/call_empty_contract_function-2 | 47.6k ± 0% | 47.6k ± 0% | ~ | (all equal) |
RuntimeTransaction/emit_event-2 | 47.6k ± 0% | 47.6k ± 0% | ~ | (all equal) |
RuntimeTransaction/borrow_array_from_storage-2 | 53.8k ± 0% | 53.8k ± 0% | ~ | (all equal) |
RuntimeTransaction/copy_array_from_storage-2 | 53.8k ± 0% | 53.8k ± 0% | ~ | (all equal) |
file https://github.com/onflow/flow-go/blob/c1e478ed0e4366575be43a77d26cd34f5d7b1b80/integration/tests/epochs/suite.go seems to have multiple compiler errors (maybe it is just a local problem in my IDE?). Didn't look into very much, just wanted to add a note for later.
file https://github.com/onflow/flow-go/blob/c1e478ed0e4366575be43a77d26cd34f5d7b1b80/integration/tests/epochs/suite.go seems to have multiple compiler errors (maybe it is just a local problem in my IDE?). Didn't look into very much, just wanted to add a note for later.
Do they look like this?
This has been a problem for me as well for a while. The code compiles fine, but GoLand flags it as an error. I also haven't looked into it much. Not new with this PR though (or even this feature branch).
@jordanschalm
[Alex] compiler errors in
epochs/suite.go
[Jordan] Do they look like this?
yep exactly. You are saying it is only a local problem? 👌 Then we'll just leave it.