-
Notifications
You must be signed in to change notification settings - Fork 3
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
refactor: Stream of repeated block items instead of block items #269
Conversation
e4b3ddd
to
d18788f
Compare
ea93713
to
5b096ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG, some questions
server/src/main/java/com/hedera/block/server/grpc/BlockAccessService.java
Show resolved
Hide resolved
server/src/main/java/com/hedera/block/server/mediator/LiveStreamMediatorImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/hedera/block/server/producer/ProducerBlockItemObserver.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/grpc/BlockAccessServiceTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/grpc/BlockStreamServiceTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/persistence/storage/read/BlockAsDirReaderTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/persistence/storage/read/BlockAsDirReaderTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/persistence/storage/read/BlockAsDirReaderTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/producer/ProducerBlockItemObserverTest.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/grpc/PublishStreamGrpcClientImpl.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/grpc/PublishStreamObserver.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. I added some comments
server/src/main/java/com/hedera/block/server/grpc/BlockAccessService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/hedera/block/server/grpc/BlockAccessService.java
Show resolved
Hide resolved
server/src/main/java/com/hedera/block/server/producer/ProducerBlockItemObserver.java
Show resolved
Hide resolved
server/src/main/java/com/hedera/block/server/grpc/BlockStreamService.java
Show resolved
Hide resolved
server/src/main/java/com/hedera/block/server/consumer/ConsumerStreamResponseObserver.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/grpc/BlockAccessServiceTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/persistence/storage/read/BlockAsDirReaderTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/persistence/storage/read/BlockAsDirReaderTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/persistence/storage/read/BlockAsDirReaderTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/persistence/storage/read/BlockAsDirReaderTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking better! A couple comments on latest changes only reviewed.
common/src/main/java/com/hedera/block/common/utils/ChunkUtils.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/grpc/BlockAccessServiceTest.java
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/grpc/BlockStreamServiceTest.java
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/persistence/storage/read/BlockAsDirReaderTest.java
Show resolved
Hide resolved
server/src/main/java/com/hedera/block/server/persistence/storage/write/BlockAsDirWriter.java
Show resolved
Hide resolved
…fix-tss-message, hopefully by the time this ready to merge to main, we can use a specific commit hash Signed-off-by: Alfredo Gutierrez <[email protected]>
…ead of individual block items. Pending to add a config with the desired batch size. Pending to add more tests with different batch sizes. Signed-off-by: Alfredo Gutierrez <[email protected]>
Signed-off-by: Alfredo Gutierrez <[email protected]>
Signed-off-by: Alfredo Gutierrez <[email protected]>
Signed-off-by: Alfredo Gutierrez <[email protected]>
…App, fixed scripts for smoke-test and created an DI Injection Module for GRPC Services. Signed-off-by: Alfredo Gutierrez <[email protected]>
Signed-off-by: Alfredo Gutierrez <[email protected]>
…perties to its own record class. - Added generator.blockItemsBatchSize that defines the size of the batch to send. Signed-off-by: Alfredo Gutierrez <[email protected]>
- Updated the README.md and app.properties example file. - Simplify some logic Signed-off-by: Alfredo Gutierrez <[email protected]>
Signed-off-by: Alfredo Gutierrez <[email protected]>
Signed-off-by: Alfredo Gutierrez <[email protected]>
Signed-off-by: Alfredo Gutierrez <[email protected]>
Signed-off-by: Alfredo Gutierrez <[email protected]>
Signed-off-by: Alfredo Gutierrez <[email protected]>
0794160
to
5369431
Compare
Signed-off-by: Alfredo Gutierrez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, all comments I had on everything I managed to find is now resolved. Please see others as well! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few items, most can be addressed in future PRs.
server/src/main/java/com/hedera/block/server/consumer/ConsumerStreamResponseObserver.java
Show resolved
Hide resolved
server/src/main/java/com/hedera/block/server/consumer/ConsumerStreamResponseObserver.java
Show resolved
Hide resolved
server/src/main/java/com/hedera/block/server/persistence/storage/write/BlockAsDirWriter.java
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/consumer/ConsumerStreamResponseObserverTest.java
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #269 +/- ##
============================================
+ Coverage 99.59% 99.62% +0.03%
- Complexity 272 290 +18
============================================
Files 54 57 +3
Lines 981 1060 +79
Branches 70 77 +7
============================================
+ Hits 977 1056 +79
Misses 3 3
Partials 1 1
|
Description:
This PR changes the version of
hedera-protobuf
and refactors all the project due to 2 fundamental changes to the API spec.BlockStreamService
to 4 different services:BlockStreamService
,BlockAccessService
,BlockNodeService
,StateService
.BlockStreamService
-->publishBlockStream
andsubscribeBlockStream
to use a repeated set ofblock_items
per request instead of a singleblock_item
.Changes done to support the change:
stream
branch/commit to use atemporaltemporary branch until is merged to main.BlockStreamService
to extractBlockStreamAccess
methods.BlockStreamAccesss
Grpc Service to start-up routes.Related issue(s):
Fixes #261
Fixes #262
Fixes #268
Fixes #276
Fixes #277
Fixes #278
Fixes #270
Fixes #279
Notes for reviewer:
Main refactor is completed, at least is compiling :)
Checklist