-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: closed range streaming #633
base: main
Are you sure you want to change the base?
Conversation
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.
Good job, looks good on first glance. I leave some initial comments, also I would personally never use var
, I understand that may be more of a "code style" remark, but it is really hard to determine what the type is supposed to be.
server/src/main/java/com/hedera/block/server/consumer/HistoricBlockStreamSupplier.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/hedera/block/server/consumer/HistoricBlockStreamSupplier.java
Outdated
Show resolved
Hide resolved
this.endBlockNumber = endBlockNumber; | ||
this.blockReader = Objects.requireNonNull(blockReader); | ||
|
||
final var consumerConfig = blockNodeContext.configuration().getConfigData(ConsumerConfig.class); |
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.
Let's not use the block node context. We should remove this. This object is only used to do some DI for the metrics service and/or some specific config type. The metrics service should be simply injected as any other component, same as with any specific config type. There already exists a tech debt issue made to address this context object #629. Let's not introduce additional debt on this and simply inject what we need properly.
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.
Ok, I've switched to injecting the direct dependencies vs the BlockNodeContext.
server/src/test/java/com/hedera/block/server/pbj/PbjBlockStreamServiceProxyTest.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/com/hedera/block/simulator/grpc/impl/ConsumerStreamGrpcClientImpl.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/hedera/block/server/consumer/HistoricBlockStreamSupplierTest.java
Outdated
Show resolved
Hide resolved
5923d9d
to
8328c95
Compare
server/src/main/java/com/hedera/block/server/consumer/ConsumerStreamResponseObserver.java
Outdated
Show resolved
Hide resolved
b6b183c
to
0e6bff6
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.
Great work! Looks good! 💯
just 1 nit.
@@ -16,6 +16,7 @@ public final class ServerMappedConfigSourceInitializer { | |||
|
|||
// Consumer Config | |||
new ConfigMapping("consumer.timeoutThresholdMillis", "CONSUMER_TIMEOUT_THRESHOLD_MILLIS"), | |||
new ConfigMapping("consumer.maxBlockItemBatchSize", "CONSUMER_MAX_BLOCK_ITEM_BATCH_SIZE"), |
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.
are we still maintaining docs for configs?
I think new property is missing there.
https://github.com/hashgraph/hedera-block-node/blob/main/server/docs/configuration.md
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.
Good catch...I didn't even realize we had this document. I added a field for it.
Signed-off-by: Matt Peterson <[email protected]>
Signed-off-by: Matt Peterson <[email protected]>
…test Signed-off-by: Matt Peterson <[email protected]>
… items Signed-off-by: Matt Peterson <[email protected]>
Signed-off-by: Matt Peterson <[email protected]>
Signed-off-by: Matt Peterson <[email protected]>
Signed-off-by: Matt Peterson <[email protected]>
Signed-off-by: Matt Peterson <[email protected]>
c1a0428
to
0e96550
Compare
Reviewer Notes
PbjBlockStreamServiceProxy
consumer.sh
to pass the smoke tests after the changes.Related Issue(s)