feat: added block stream simulator mid-block sending failure#987
Merged
Nana-EC merged 1 commit intohiero-ledger:mainfrom Apr 15, 2025
Merged
Conversation
georgi-l95
requested changes
Apr 9, 2025
Member
georgi-l95
left a comment
There was a problem hiding this comment.
Overal looks good, I left a question and suggestion.
simulator/src/main/java/org/hiero/block/simulator/grpc/impl/PublishStreamGrpcClientImpl.java
Outdated
Show resolved
Hide resolved
simulator/src/main/java/org/hiero/block/simulator/config/data/BlockStreamConfig.java
Show resolved
Hide resolved
b9039ec to
6d38d14
Compare
…lock (hiero-ledger#523) Signed-off-by: Alex Kehayov <aleks.kehayov@limechain.tech>
6d38d14 to
230e8b7
Compare
ata-nas
reviewed
Apr 9, 2025
...lator/src/test/java/org/hiero/block/simulator/grpc/impl/PublishStreamGrpcClientImplTest.java
Show resolved
Hide resolved
Contributor
|
Thanks @AlexKehayov , nice work. |
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## main #987 +/- ##
============================================
+ Coverage 88.33% 88.45% +0.12%
- Complexity 736 741 +5
============================================
Files 134 135 +1
Lines 3154 3171 +17
Branches 237 241 +4
============================================
+ Hits 2786 2805 +19
+ Misses 298 297 -1
+ Partials 70 69 -1
🚀 New features to boost your workflow:
|
jsync-swirlds
pushed a commit
that referenced
this pull request
Apr 16, 2025
Signed-off-by: Alex Kehayov <aleks.kehayov@limechain.tech>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reviewer Notes
Mid-block sending failure can be triggered by setting blockStream.midBlockFailType and blockStream.midBlockFailOffset in app.properties. midBlockFailType takes NONE/ABRUPT/EOS as values. NONE is the default value which disables the feature. ABRUPT causes a runtime exception after sending the header and a random amount of items (without the proof). Currently, EOS (end of stream) causes calling of onError after sending the header and a random amount of items because PublishStreamRequest does not support end of stream messages, only a BlockItemSet.
midBlockFailOffset takes a numeric value and sets the amount on blocks to be sent before the failing block.
Test methods for the new functionality are added.
The streamBlockItem method is removed as it was redundant.
Related Issue(s)
Closes #523