iri
iri copied to clipboard
Feature: Stop solidifying when asked for pruned transaction
Description
When we receive a transaction hash which is in the PrunedTransactionProvider we add the hash to the PrunedTransactionVerifier, and stop the rest of the receiving transaction process.
These transactions are used to prove that a transaction hash is pruned before. We deem 10 parents of the original transaction, which are pruned, enough safety to say it was pruned.
Once it is proven, the transaction hash stays in memory marked as pruned until a restart.
When one of the parents of a requested transaction is NOT pruned, the entire chain is proven to be false positives. Chain is discarded and initial transaction is marked as "false positive" to prevent the tx requesting to start over again. Just like the pruned state, this false positive state does not persist upon restarts.
Fixes #1371
To be merged after #1417
Type of change
- Enhancement (a non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
How Has This Been Tested?
Need a review over the implementation before testing further
Checklist:
Please delete items that are not relevant.
- [X] My code follows the style guidelines for this project
- [X] I have performed a self-review of my own code
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [X] New and existing unit tests pass locally with my changes
Need to properly prioritize the merging of this PR