-
Notifications
You must be signed in to change notification settings - Fork 370
Add milestone stage #1822
Add milestone stage #1822
Conversation
…lC/iri into add-transaction-solidifier
* add heartbeat message * added javadocs * print exception message
* Update pruning test for before and after pruning status * m6 -> m1 Co-authored-by: Gal Rogozinski <gal.rogozinski@iota.org>
* Update broadcast fetch logic * Comment
* Move validation to validation service package * Add Transaction Solidifier * Update Transaction Validator * Update Unit Tests * Remove tip field from solidify stage * Move broadcast queue retreival to solidify stage * Undo auto-formatting * More autoformatting * Re-remove refillBroadcast * Move propagation logic to inner class * Remove unused imports * Add comment to propagator * Remove unused txSolidifier private field * Remove separate thread logic, check solidity from milestone solidifier * Add solidification queue to transaction solidifier * LinkedHashSet -> ArrayDeque in checkSolidity * Update maxProcessedTransactions value determination * Make Transaction Propagator private * Fix test conflicts * Update src/main/java/com/iota/iri/service/validation/impl/TransactionSolidifierImpl.java Co-Authored-By: Gal Rogozinski <galrogogit@gmail.com> * Update src/main/java/com/iota/iri/service/validation/impl/TransactionSolidifierImpl.java Co-Authored-By: Gal Rogozinski <galrogogit@gmail.com> * Rename Co-authored-by: Gal Rogozinski <gal.rogozinski@iota.org> Co-authored-by: Gal Rogozinski <galrogogit@gmail.com>
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 💯
Due to conflicts I am not approving yet
|
||
confirmValidTransactionValues(transactionViewModel); |
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 clear refactoring
@GalRogozinski ready to go. I added a couple missing unit tests as well if you want to take a quick look at those. |
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.
LGTM
|
||
TransactionViewModel milestone = TransactionViewModel.fromHash(tangle, payload.getMilestoneHash()); | ||
int newMilestoneIndex = payload.getMilestoneIndex(); | ||
boolean isFirstInBundle = (milestone.getCurrentIndex() == 0); |
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.
I would have liked this to be isTailBundle
for the sake of terminology.
Description
This is step one towards the migration of milestone handling logic as per #1674. In this phase we add a milestone stage to the processing pipeline to handle milestone transactions as they are received rather than relying on the
LatestMilestoneTracker
to pull them from the db. This should mitigate the issue demonstrated on devnet, when a node has a high number of milestone transactions present in the db, and it takes a long time to pull them out. New milestones were not being seen and processed fast enough, so to fix that, we handle them straight from the received stage.This is a follow up to #1821
Fixes #1688
Also relevant to #1448 and #1797
Type of change
How Has This Been Tested?
Checklist: