iri icon indicating copy to clipboard operation
iri copied to clipboard

Feature: Stop solidifying when asked for pruned transaction

Open kwek20 opened this issue 5 years ago • 1 comments

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

kwek20 avatar Apr 24 '19 14:04 kwek20

Need to properly prioritize the merging of this PR

GalRogozinski avatar May 05 '19 14:05 GalRogozinski