-
Notifications
You must be signed in to change notification settings - Fork 17
feat(verification): Changes to Support 0.69.0 CN Protobuf and Produced blocks
#1993
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
Conversation
jsync-swirlds
left a comment
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.
Still working through this, but there are a few comments below to start with.
...ode/verification/src/main/java/org/hiero/block/node/verification/AllBlocksHasherHandler.java
Show resolved
Hide resolved
...ode/verification/src/main/java/org/hiero/block/node/verification/AllBlocksHasherHandler.java
Outdated
Show resolved
Hide resolved
...ode/verification/src/main/java/org/hiero/block/node/verification/AllBlocksHasherHandler.java
Outdated
Show resolved
Hide resolved
...ode/verification/src/main/java/org/hiero/block/node/verification/AllBlocksHasherHandler.java
Outdated
Show resolved
Hide resolved
jsync-swirlds
left a comment
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 small items and an API design concern.
block-node/app/src/testFixtures/java/org/hiero/block/node/app/fixtures/blocks/BlockUtils.java
Outdated
Show resolved
Hide resolved
.../verification/src/main/java/org/hiero/block/node/verification/VerificationServicePlugin.java
Outdated
Show resolved
Hide resolved
block-node/verification/src/main/proto/root_hash_of_all_previous_blocks_hasher.proto
Show resolved
Hide resolved
...ation/src/main/java/org/hiero/block/node/verification/session/HapiVersionSessionFactory.java
Show resolved
Hide resolved
.../src/main/java/org/hiero/block/node/verification/session/impl/ExtendedMerkleTreeSession.java
Show resolved
Hide resolved
common/src/main/java/org/hiero/block/common/hasher/HashingUtilities.java
Outdated
Show resolved
Hide resolved
...sts/simulator/src/main/java/org/hiero/block/simulator/generator/CraftBlockStreamManager.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
… since is on the construction, it should fail under the right exception at the class that is instantiating it, and either force recovery or fail, leaving this decision to the instantiating class. Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
…by checking hasSignedBlockProof and verifying there is a single one. Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
…ashes when starting from genesis. - Changed the Simulator to always produce deterministic blocks, so the rootHashOfAllBlockHashesTree always matches between runs, this is needed for E2E Testing scenarios. - Improved Flaky test by giving a tiny bit more time. - VerificationSession interface now has 2 methods, a void processBlockItems and a finalizeVerification that returns the VerificationNotification result, making use of the end_of_block message that is now received and not relaying on block_proofs alone. Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
…kStreamingHasher into class: AllBlocksHasherHandler that handles initialization and lifecycle managing. Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
… edge case. Made needed changes in classes to fix bugs found during testing phase. Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
…d it to used the intermeadiate hashes instead of all the previous hasher to buildd the StreamingHasher, also fixed the StreamingHasherm to accept leafCount to be able to resume correct state from saved snapshot. Made the saving of the hasher snapshot independent and saving automatically every X amount of time. Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
...sts/simulator/src/main/java/org/hiero/block/simulator/generator/CraftBlockStreamManager.java
Outdated
Show resolved
Hide resolved
...sts/simulator/src/main/java/org/hiero/block/simulator/generator/CraftBlockStreamManager.java
Outdated
Show resolved
Hide resolved
…Hash and the rootOfAllPreviousBlockHash when is created as opposed to when the block is finalized, also, removed the finalizeBlock method, and rely on the blockItems, so far the BlockItemsMessgae comes with endOfBlock, so it's been used internally and returned to the previous design of the VerificationSession with fewer changes Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
…UnparsedBlockItem, to avoid accidental use Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
- Moved .proto to PBJ Default location /src/main/proto, outside of the java classes Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
block-node/verification/src/main/java/org/hiero/block/node/verification/VerificationConfig.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/hiero/block/node/verification/session/impl/ExtendedMerkleTreeSession.java
Show resolved
Hide resolved
.../src/main/java/org/hiero/block/node/verification/session/impl/ExtendedMerkleTreeSession.java
Show resolved
Hide resolved
...ode/verification/src/main/java/org/hiero/block/node/verification/AllBlocksHasherHandler.java
Outdated
Show resolved
Hide resolved
...ode/verification/src/main/java/org/hiero/block/node/verification/AllBlocksHasherHandler.java
Show resolved
Hide resolved
jsync-swirlds
left a comment
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.
Just a couple items to clean up.
Could be done in a follow-up if desired.
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
47f01dc
@jsync-swirlds addressed most of them and deferred one for the next task, where is more appropiate, I would have choose to deffer all if I had enough approvals, but for now, I don't so I addressed 👍 |
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #1993 +/- ##
============================================
+ Coverage 78.99% 79.89% +0.90%
- Complexity 1241 1302 +61
============================================
Files 130 131 +1
Lines 5952 6179 +227
Branches 646 667 +21
============================================
+ Hits 4702 4937 +235
+ Misses 955 939 -16
- Partials 295 303 +8 ... and 4 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Reviewer Notes
0.69.0version of protobufRelated Issue(s)
#1906