flow-go
flow-go copied to clipboard
[Consensus] Add `ParentView` to `flow.Header`
https://github.com/dapperlabs/flow-go/issues/6411
Context
This PR adds ParentView
to flow.Header
. As part of this PR I have updated our test helpers, util functions, tests and wherever we have converted flow.Header
to model.Block
and vica versa. Also updated hotstuff.BlockProducer
to return flow.Header
instead of model.Proposal
.
FVM Benchstat comparison
This branch with compared with the base branch onflow:feature/active-pacemaker commit 8bc1222debd0746d9c908ee4c4460f90967fc446
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.txt | new.txt | |||
---|---|---|---|---|
time/op | delta | |||
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64 | ||||
RuntimeNFTBatchTransfer-2 | 133ms ± 6% | 145ms ±14% | +9.68% | (p=0.011 n=10+10) |
RuntimeTransaction/emit_event-2 | 52.4ms ± 3% | 55.0ms ± 8% | +4.86% | (p=0.006 n=8+9) |
RuntimeTransaction/reference_tx-2 | 32.3ms ± 7% | 32.7ms ±12% | ~ | (p=0.842 n=9+10) |
RuntimeTransaction/convert_int_to_string-2 | 34.7ms ±12% | 34.5ms ± 8% | ~ | (p=0.971 n=10+10) |
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 36.8ms ±10% | 37.9ms ± 9% | ~ | (p=0.315 n=10+10) |
RuntimeTransaction/get_signer_address-2 | 31.9ms ± 7% | 32.1ms ± 8% | ~ | (p=0.968 n=9+10) |
RuntimeTransaction/get_public_account-2 | 37.1ms ±12% | 37.2ms ± 9% | ~ | (p=0.684 n=10+10) |
RuntimeTransaction/get_account_and_get_balance-2 | 356ms ±10% | 346ms ± 3% | ~ | (p=0.190 n=9+9) |
RuntimeTransaction/get_account_and_get_available_balance-2 | 331ms ± 8% | 321ms ± 6% | ~ | (p=0.247 n=10+10) |
RuntimeTransaction/get_account_and_get_storage_used-2 | 39.4ms ± 8% | 39.7ms ± 5% | ~ | (p=0.447 n=10+9) |
RuntimeTransaction/get_account_and_get_storage_capacity-2 | 278ms ± 5% | 287ms ± 7% | ~ | (p=0.165 n=10+10) |
RuntimeTransaction/get_signer_vault-2 | 42.9ms ± 5% | 42.3ms ± 8% | ~ | (p=0.182 n=9+10) |
RuntimeTransaction/get_signer_receiver-2 | 54.5ms ± 3% | 55.6ms ± 6% | ~ | (p=0.095 n=9+10) |
RuntimeTransaction/transfer_tokens-2 | 254ms ± 5% | 256ms ± 4% | ~ | (p=0.897 n=10+8) |
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 43.1ms ± 9% | 42.8ms ± 7% | ~ | (p=0.971 n=10+10) |
RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 93.7ms ± 6% | 91.5ms ± 4% | ~ | (p=0.143 n=10+10) |
RuntimeTransaction/create_new_account-2 | 1.02s ± 1% | 1.02s ± 5% | ~ | (p=0.573 n=8+10) |
RuntimeTransaction/call_empty_contract_function-2 | 37.1ms ±16% | 36.5ms ±10% | ~ | (p=0.796 n=10+10) |
RuntimeTransaction/borrow_array_from_storage-2 | 160ms ± 6% | 156ms ± 4% | ~ | (p=0.353 n=10+10) |
RuntimeTransaction/copy_array_from_storage-2 | 164ms ± 4% | 167ms ± 2% | ~ | (p=0.063 n=9+9) |
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64 | ||||
ComputeBlock/16/cols/128/txes-2 | 5.87s ± 3% | 5.82s ± 5% | ~ | (p=0.684 n=10+10) |
alloc/op | delta | |||
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64 | ||||
RuntimeNFTBatchTransfer-2 | 57.5MB ± 5% | 58.5MB ± 6% | ~ | (p=0.280 n=10+10) |
RuntimeTransaction/reference_tx-2 | 37.3MB ± 5% | 36.6MB ± 8% | ~ | (p=0.280 n=10+10) |
RuntimeTransaction/convert_int_to_string-2 | 37.5MB ± 6% | 37.9MB ± 6% | ~ | (p=0.529 n=10+10) |
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 38.8MB ±10% | 38.3MB ± 6% | ~ | (p=0.353 n=10+10) |
RuntimeTransaction/get_signer_address-2 | 36.8MB ± 8% | 36.2MB ± 7% | ~ | (p=0.631 n=10+10) |
RuntimeTransaction/get_public_account-2 | 38.4MB ± 9% | 39.4MB ± 3% | ~ | (p=0.243 n=10+9) |
RuntimeTransaction/get_account_and_get_balance-2 | 128MB ± 4% | 128MB ± 0% | ~ | (p=0.220 n=10+6) |
RuntimeTransaction/get_account_and_get_available_balance-2 | 113MB ± 4% | 111MB ± 3% | ~ | (p=0.529 n=10+10) |
RuntimeTransaction/get_account_and_get_storage_used-2 | 38.8MB ± 8% | 39.4MB ± 7% | ~ | (p=0.436 n=10+10) |
RuntimeTransaction/get_account_and_get_storage_capacity-2 | 106MB ± 3% | 106MB ± 3% | ~ | (p=0.796 n=10+10) |
RuntimeTransaction/get_signer_vault-2 | 39.4MB ± 7% | 39.0MB ± 4% | ~ | (p=0.447 n=10+9) |
RuntimeTransaction/get_signer_receiver-2 | 42.7MB ± 3% | 42.1MB ± 5% | ~ | (p=0.356 n=9+10) |
RuntimeTransaction/transfer_tokens-2 | 89.8MB ± 3% | 89.3MB ± 3% | ~ | (p=0.393 n=10+10) |
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 39.6MB ± 8% | 39.5MB ± 7% | ~ | (p=0.971 n=10+10) |
RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 56.7MB ± 2% | 56.5MB ± 2% | ~ | (p=0.579 n=10+10) |
RuntimeTransaction/create_new_account-2 | 202MB ± 2% | 201MB ± 3% | ~ | (p=0.436 n=10+10) |
RuntimeTransaction/call_empty_contract_function-2 | 37.8MB ± 5% | 37.5MB ±10% | ~ | (p=0.579 n=10+10) |
RuntimeTransaction/emit_event-2 | 42.2MB ± 7% | 43.0MB ± 5% | ~ | (p=0.393 n=10+10) |
RuntimeTransaction/borrow_array_from_storage-2 | 70.3MB ± 3% | 70.5MB ± 3% | ~ | (p=0.842 n=10+9) |
RuntimeTransaction/copy_array_from_storage-2 | 82.6MB ± 3% | 83.2MB ± 2% | ~ | (p=0.400 n=9+10) |
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64 | ||||
ComputeBlock/16/cols/128/txes-2 | 1.34GB ± 1% | 1.33GB ± 1% | ~ | (p=1.000 n=10+9) |
allocs/op | delta | |||
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64 | ||||
RuntimeNFTBatchTransfer-2 | 290k ± 0% | 291k ± 0% | ~ | (p=0.161 n=10+7) |
RuntimeTransaction/reference_tx-2 | 79.0k ± 0% | 79.0k ± 0% | ~ | (p=0.425 n=10+10) |
RuntimeTransaction/convert_int_to_string-2 | 93.2k ± 0% | 93.2k ± 0% | ~ | (p=0.644 n=10+10) |
RuntimeTransaction/get_signer_address-2 | 84.2k ± 0% | 84.2k ± 0% | ~ | (p=0.059 n=10+10) |
RuntimeTransaction/get_public_account-2 | 107k ± 0% | 107k ± 0% | ~ | (p=0.189 n=9+10) |
RuntimeTransaction/get_account_and_get_balance-2 | 1.51M ± 0% | 1.51M ± 0% | ~ | (p=0.382 n=10+10) |
RuntimeTransaction/get_account_and_get_storage_used-2 | 128k ± 0% | 128k ± 0% | ~ | (p=0.956 n=10+10) |
RuntimeTransaction/get_account_and_get_storage_capacity-2 | 1.24M ± 0% | 1.24M ± 0% | ~ | (p=0.955 n=10+10) |
RuntimeTransaction/get_signer_vault-2 | 127k ± 0% | 127k ± 0% | ~ | (p=0.484 n=10+9) |
RuntimeTransaction/get_signer_receiver-2 | 204k ± 0% | 204k ± 0% | ~ | (p=0.753 n=10+10) |
RuntimeTransaction/transfer_tokens-2 | 935k ± 0% | 935k ± 0% | ~ | (p=0.395 n=8+10) |
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 129k ± 0% | 129k ± 0% | ~ | (p=0.493 n=10+10) |
RuntimeTransaction/create_new_account-2 | 2.67M ± 0% | 2.67M ± 0% | ~ | (p=0.218 n=10+9) |
RuntimeTransaction/call_empty_contract_function-2 | 95.9k ± 0% | 95.9k ± 0% | ~ | (p=0.779 n=9+9) |
RuntimeTransaction/emit_event-2 | 136k ± 0% | 136k ± 0% | ~ | (p=0.284 n=8+10) |
RuntimeTransaction/borrow_array_from_storage-2 | 368k ± 0% | 368k ± 0% | ~ | (p=0.436 n=10+10) |
RuntimeTransaction/copy_array_from_storage-2 | 324k ± 0% | 324k ± 0% | ~ | (p=0.541 n=10+10) |
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64 | ||||
ComputeBlock/16/cols/128/txes-2 | 20.5M ± 0% | 20.5M ± 0% | ~ | (p=0.315 n=10+10) |
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64 | ||||
RuntimeTransaction/get_account_and_get_available_balance-2 | 1.40M ± 0% | 1.40M ± 0% | −0.00% | (p=0.018 n=10+9) |
RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 232k ± 0% | 232k ± 0% | −0.01% | (p=0.017 n=10+10) |
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 107k ± 0% | 107k ± 0% | −0.02% | (p=0.020 n=10+10) |
computation | delta | |||
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64 | ||||
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.60k ± 0% | 2.60k ± 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 | |||
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64 | ||||
RuntimeTransaction/reference_tx-2 | 44.3k ± 0% | 44.3k ± 0% | ~ | (all equal) |
RuntimeTransaction/convert_int_to_string-2 | 44.3k ± 0% | 44.3k ± 0% | ~ | (all equal) |
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2 | 44.3k ± 0% | 44.3k ± 0% | ~ | (all equal) |
RuntimeTransaction/get_signer_address-2 | 44.3k ± 0% | 44.3k ± 0% | ~ | (all equal) |
RuntimeTransaction/get_public_account-2 | 44.3k ± 0% | 44.3k ± 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.13M ± 0% | 5.13M ± 0% | ~ | (all equal) |
RuntimeTransaction/get_account_and_get_storage_used-2 | 44.3k ± 0% | 44.3k ± 0% | ~ | (all equal) |
RuntimeTransaction/get_account_and_get_storage_capacity-2 | 5.13M ± 0% | 5.13M ± 0% | ~ | (all equal) |
RuntimeTransaction/get_signer_vault-2 | 44.5k ± 0% | 44.5k ± 0% | ~ | (all equal) |
RuntimeTransaction/get_signer_receiver-2 | 44.9k ± 0% | 44.9k ± 0% | ~ | (all equal) |
RuntimeTransaction/transfer_tokens-2 | 45.2k ± 0% | 45.2k ± 0% | ~ | (all equal) |
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2 | 44.4k ± 0% | 44.4k ± 0% | ~ | (all equal) |
RuntimeTransaction/load_and_save_long_string_on_signers_address-2 | 47.2k ± 0% | 47.2k ± 0% | ~ | (all equal) |
RuntimeTransaction/create_new_account-2 | 8.39M ± 0% | 8.39M ± 0% | ~ | (all equal) |
RuntimeTransaction/call_empty_contract_function-2 | 44.5k ± 0% | 44.5k ± 0% | ~ | (all equal) |
RuntimeTransaction/emit_event-2 | 44.5k ± 0% | 44.5k ± 0% | ~ | (all equal) |
RuntimeTransaction/borrow_array_from_storage-2 | 49.7k ± 0% | 49.7k ± 0% | ~ | (all equal) |
RuntimeTransaction/copy_array_from_storage-2 | 49.7k ± 0% | 49.7k ± 0% | ~ | (all equal) |
us/tx | delta | |||
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64 | ||||
ComputeBlock/16/cols/128/txes-2 | 2.87k ± 3% | 2.84k ± 5% | ~ | (p=0.670 n=10+10) |
Codecov Report
Merging #3372 (60ec1d8) into feature/active-pacemaker (8bc1222) will decrease coverage by
0.01%
. The diff coverage is74.28%
.
@@ Coverage Diff @@
## feature/active-pacemaker #3372 +/- ##
============================================================
- Coverage 55.54% 55.53% -0.02%
============================================================
Files 749 749
Lines 69513 69492 -21
============================================================
- Hits 38614 38591 -23
- Misses 27765 27767 +2
Partials 3134 3134
Flag | Coverage Δ | |
---|---|---|
unittests | 55.53% <74.28%> (-0.02%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
consensus/participant.go | 19.40% <0.00%> (+0.56%) |
:arrow_up: |
consensus/recovery/follower.go | 0.00% <0.00%> (ø) |
|
engine/common/rpc/convert/convert.go | 14.26% <0.00%> (-0.05%) |
:arrow_down: |
utils/unittest/fixtures.go | 0.00% <0.00%> (ø) |
|
consensus/hotstuff/eventhandler/event_handler.go | 77.35% <100.00%> (+0.26%) |
:arrow_up: |
consensus/hotstuff/eventloop/event_loop.go | 75.84% <100.00%> (+0.24%) |
:arrow_up: |
consensus/recovery/recover.go | 40.54% <100.00%> (-6.27%) |
:arrow_down: |
engine/collection/compliance/core.go | 86.72% <100.00%> (ø) |
|
engine/collection/message_hub/message_hub.go | 78.98% <100.00%> (-0.67%) |
:arrow_down: |
engine/common/follower/engine.go | 49.68% <100.00%> (+0.14%) |
:arrow_up: |
... and 14 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
quick request, would you mind clearing up a tiny bit of tech debt as part of this PR 🙏 🙇 👍
- in this code, the variable is still named
finalizer
(legacy naming). I think a correct name would beforks
bors merge
Build succeeded:
- Integration Tests (make -C integration access-tests)
- Integration Tests (make -C integration bft-tests)
- Integration Tests (make -C integration collection-tests)
- Integration Tests (make -C integration consensus-tests)
- Integration Tests (make -C integration epochs-tests)
- Integration Tests (make -C integration execution-tests)
- Integration Tests (make -C integration ghost-tests)
- Integration Tests (make -C integration mvp-tests)
- Integration Tests (make -C integration network-tests)
- Integration Tests (make -C integration verification-tests)
- Lint (./)
- Lint (./crypto/)
- Lint (./integration/)
- Unit Tests (access)
- Unit Tests (admin)
- Unit Tests (cmd)
- Unit Tests (consensus)
- Unit Tests (engine)
- Unit Tests (fvm)
- Unit Tests (ledger)
- Unit Tests (module)
- Unit Tests (network)
- Unit Tests (others)
- Unit Tests (utils)