hashgraph / hedera-services

Crypto, token, consensus, file, and smart contract services for the Hedera public ledger
Apache License 2.0
313 stars 136 forks source link

feat: add `BlockStreamBuilder` and all related changes #15088

Closed petreze closed 2 months ago

petreze commented 2 months ago

Description: This PR aims to separate BlockStreamBuilder, PairedStreamBuilder and all related changes from stream-manager-spike branch into a smaller PR for develop. This should be easier to be reviewed and signed off.

Main changes are the creation of both builders (BlockStreamBuilder, PairedStreamBuilder) as well as adding serializedTransaction as bytes to the TransactionInfo object. This enforced most of the diff between the branches as TransactionInfo is used in a lot of unit tests where minor changes were required

Related issue(s):

Fixes #15080

Notes for reviewer:

Checklist

github-actions[bot] commented 2 months ago

Node: HAPI Test (Misc) Results

 62 files    1 errors  61 suites   10m 0s :stopwatch: 311 tests 166 :white_check_mark: 0 :zzz: 145 :x: 397 runs  205 :white_check_mark: 0 :zzz: 192 :x:

For more details on these parsing errors and failures, see this check.

Results for commit 42d739c4.

:recycle: This comment has been updated with latest results.

codacy-production[bot] commented 2 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for f5f7b680e57ee7ebc39d6be1dd4b2512e3fe9c92[^1] :white_check_mark: 36.38%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (f5f7b680e57ee7ebc39d6be1dd4b2512e3fe9c92) | Report Missing | Report Missing | Report Missing | | | Head commit (196ceb781b1aeb5f35a113b83e4adaa90de98a37) | 112154 | 70101 | 62.50% | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#15088) | 503 | 183 | **36.38%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more [^1]: Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 33.00199% with 337 lines in your changes missing coverage. Please review.

Project coverage is 59.21%. Comparing base (964661d) to head (196ceb7). Report is 56 commits behind head on develop.

Files Patch % Lines
...dera/node/app/blocks/impl/PairedStreamBuilder.java 0.00% 162 Missing :warning:
...edera/node/app/blocks/impl/BlockStreamBuilder.java 49.26% 126 Missing and 12 partials :warning:
...dera/node/app/workflows/handle/HandleWorkflow.java 6.25% 15 Missing :warning:
...app/workflows/handle/stack/SavepointStackImpl.java 33.33% 11 Missing and 3 partials :warning:
...hedera/node/app/workflows/handle/HandleOutput.java 66.66% 1 Missing and 1 partial :warning:
...orkflows/handle/dispatch/ChildDispatchFactory.java 66.66% 1 Missing and 1 partial :warning:
...p/workflows/handle/record/RecordStreamBuilder.java 33.33% 2 Missing :warning:
...a/node/app/spi/workflows/record/StreamBuilder.java 0.00% 1 Missing :warning:
...ows/handle/stack/savepoints/AbstractSavepoint.java 66.66% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088/graphs/tree.svg?width=650&height=150&src=pr&token=ZPMV8C93DV&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph)](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) ```diff @@ Coverage Diff @@ ## develop #15088 +/- ## ============================================= + Coverage 59.10% 59.21% +0.11% - Complexity 22549 22772 +223 ============================================= Files 2902 2903 +1 Lines 111299 112338 +1039 Branches 11424 11465 +41 ============================================= + Hits 65783 66521 +738 - Misses 41827 42125 +298 - Partials 3689 3692 +3 ``` | [Files](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | Coverage Δ | | |---|---|---| | [...e/addressbook/impl/handlers/NodeUpdateHandler.java](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree&filepath=hedera-node%2Fhedera-addressbook-service-impl%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fnode%2Fapp%2Fservice%2Faddressbook%2Fimpl%2Fhandlers%2FNodeUpdateHandler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-aGVkZXJhLW5vZGUvaGVkZXJhLWFkZHJlc3Nib29rLXNlcnZpY2UtaW1wbC9zcmMvbWFpbi9qYXZhL2NvbS9oZWRlcmEvbm9kZS9hcHAvc2VydmljZS9hZGRyZXNzYm9vay9pbXBsL2hhbmRsZXJzL05vZGVVcGRhdGVIYW5kbGVyLmphdmE=) | `92.95% <100.00%> (ø)` | | | [...va/com/hedera/node/app/fees/FeeCalculatorImpl.java](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree&filepath=hedera-node%2Fhedera-app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fnode%2Fapp%2Ffees%2FFeeCalculatorImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-aGVkZXJhLW5vZGUvaGVkZXJhLWFwcC9zcmMvbWFpbi9qYXZhL2NvbS9oZWRlcmEvbm9kZS9hcHAvZmVlcy9GZWVDYWxjdWxhdG9ySW1wbC5qYXZh) | `51.25% <100.00%> (ø)` | | | [...de/app/throttle/NetworkUtilizationManagerImpl.java](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree&filepath=hedera-node%2Fhedera-app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fnode%2Fapp%2Fthrottle%2FNetworkUtilizationManagerImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-aGVkZXJhLW5vZGUvaGVkZXJhLWFwcC9zcmMvbWFpbi9qYXZhL2NvbS9oZWRlcmEvbm9kZS9hcHAvdGhyb3R0bGUvTmV0d29ya1V0aWxpemF0aW9uTWFuYWdlckltcGwuamF2YQ==) | `86.66% <ø> (+21.66%)` | :arrow_up: | | [.../hedera/node/app/throttle/ThrottleAccumulator.java](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree&filepath=hedera-node%2Fhedera-app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fnode%2Fapp%2Fthrottle%2FThrottleAccumulator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-aGVkZXJhLW5vZGUvaGVkZXJhLWFwcC9zcmMvbWFpbi9qYXZhL2NvbS9oZWRlcmEvbm9kZS9hcHAvdGhyb3R0bGUvVGhyb3R0bGVBY2N1bXVsYXRvci5qYXZh) | `84.18% <ø> (+0.85%)` | :arrow_up: | | [.../hedera/node/app/workflows/TransactionChecker.java](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree&filepath=hedera-node%2Fhedera-app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fnode%2Fapp%2Fworkflows%2FTransactionChecker.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-aGVkZXJhLW5vZGUvaGVkZXJhLWFwcC9zcmMvbWFpbi9qYXZhL2NvbS9oZWRlcmEvbm9kZS9hcHAvd29ya2Zsb3dzL1RyYW5zYWN0aW9uQ2hlY2tlci5qYXZh) | `92.41% <100.00%> (ø)` | | | [...com/hedera/node/app/workflows/TransactionInfo.java](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree&filepath=hedera-node%2Fhedera-app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fnode%2Fapp%2Fworkflows%2FTransactionInfo.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-aGVkZXJhLW5vZGUvaGVkZXJhLWFwcC9zcmMvbWFpbi9qYXZhL2NvbS9oZWRlcmEvbm9kZS9hcHAvd29ya2Zsb3dzL1RyYW5zYWN0aW9uSW5mby5qYXZh) | `41.66% <ø> (ø)` | | | [...edera/node/app/workflows/ingest/IngestChecker.java](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree&filepath=hedera-node%2Fhedera-app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fnode%2Fapp%2Fworkflows%2Fingest%2FIngestChecker.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-aGVkZXJhLW5vZGUvaGVkZXJhLWFwcC9zcmMvbWFpbi9qYXZhL2NvbS9oZWRlcmEvbm9kZS9hcHAvd29ya2Zsb3dzL2luZ2VzdC9Jbmdlc3RDaGVja2VyLmphdmE=) | `73.80% <100.00%> (ø)` | | | [...app/workflows/standalone/TransactionExecutors.java](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree&filepath=hedera-node%2Fhedera-app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fnode%2Fapp%2Fworkflows%2Fstandalone%2FTransactionExecutors.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-aGVkZXJhLW5vZGUvaGVkZXJhLWFwcC9zcmMvbWFpbi9qYXZhL2NvbS9oZWRlcmEvbm9kZS9hcHAvd29ya2Zsb3dzL3N0YW5kYWxvbmUvVHJhbnNhY3Rpb25FeGVjdXRvcnMuamF2YQ==) | `100.00% <100.00%> (ø)` | | | [...dera/node/config/data/BlockRecordStreamConfig.java](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree&filepath=hedera-node%2Fhedera-config%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fnode%2Fconfig%2Fdata%2FBlockRecordStreamConfig.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-aGVkZXJhLW5vZGUvaGVkZXJhLWNvbmZpZy9zcmMvbWFpbi9qYXZhL2NvbS9oZWRlcmEvbm9kZS9jb25maWcvZGF0YS9CbG9ja1JlY29yZFN0cmVhbUNvbmZpZy5qYXZh) | `100.00% <ø> (ø)` | | | [...com/hedera/node/config/data/BlockStreamConfig.java](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree&filepath=hedera-node%2Fhedera-config%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fnode%2Fconfig%2Fdata%2FBlockStreamConfig.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-aGVkZXJhLW5vZGUvaGVkZXJhLWNvbmZpZy9zcmMvbWFpbi9qYXZhL2NvbS9oZWRlcmEvbm9kZS9jb25maWcvZGF0YS9CbG9ja1N0cmVhbUNvbmZpZy5qYXZh) | `33.33% <ø> (ø)` | | | ... and [10 more](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | | ... and [119 files with indirect coverage changes](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) [![Impacted file tree graph](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088/graphs/tree.svg?width=650&height=150&src=pr&token=ZPMV8C93DV&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph)](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15088?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph)