This repository was archived by the owner on Aug 23, 2020. It is now read-only.
Feature: Transaction Solidifier#1484
Open
luca-moser wants to merge 2 commits into
Open
Conversation
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
In order to have a relevant view of the graph from a given depth towards the tips, we want to be able to mark transactions as solid from bottom->top. In a scenario where the
TipSolidifieris disabled, only theTransactionValidatorwill mark transactions as solid (besides the MilestoneSolidifer), by performing once a quick solid check on approvers of transactions which were set to be solid up on arrival. TheTransactionsValidator's quick solidification thread runs every 750 milliseconds.This means that if we are receiving transactions out of order and a given transaction was missed by the
TransactionValidatorquick solidification thread, the transaction will only be marked as solid once a new milestone is issued (because it triggers a solidification of all approved transactions).This PR adds a separate component called
TransactionSolidifierwith its implementationQuickTransactionSolidifierwhich starts at a configurable depth (default: 3) and walks from the given milestone up the graph towards the tips traversing all transaction and performing a quick solid check on each of them. TheQuickTransactionSolidifierruns every 10 seconds (configurable).Testing this component on the ICC network, I wanted to see how long such mechanism would take. Luckily, the operation seems to be very quick as shown by the given log outputs:
Note that
updated Nmeans that the N transactions were updated to be solid andtraversed Nmeans how many transactions were traversed while walking up the graph towards the tips. Note also thatupdated Nshows that theTransactionValidatorquick solidification thread misses some transactions when it runs which are however always going to be catched by theQuickTransactionSolidifier.This component doesn't appear even in YourKit's profiling because it's very cheap.
Fixes # (issue)
#1009
#1013
#1011 (maybe?)
The solidifier in
TransactionValidatorcan be removed through #1485.Type of change
How Has This Been Tested?
On the ICC network
Checklist:
Please delete items that are not relevant.