Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Feature: Stop solidifying when asked for pruned transaction #1418

Open
wants to merge 22 commits into
base: dev
Choose a base branch
from

Conversation

kwek20
Copy link
Contributor

@kwek20 kwek20 commented Apr 24, 2019

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.

  • My code follows the style guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@kwek20 kwek20 force-pushed the transaction-pruning-saving branch from 0a397ef to 0dcd59c Compare April 25, 2019 15:10
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@iotaledger iotaledger deleted a comment Apr 25, 2019
@GalRogozinski
Copy link
Contributor

Need to properly prioritize the merging of this PR

@jakubcech jakubcech added C-Spent Addresses Deffered Will be addressed and merged in later versions. labels May 7, 2019
@kwek20 kwek20 force-pushed the transaction-pruning-saving branch from 0dcd59c to 0402ca4 Compare May 14, 2019 15:43
@kwek20 kwek20 force-pushed the transaction-pruning-saving branch from 0402ca4 to 3ac580b Compare May 14, 2019 16:20
Brord van Wierst added 2 commits May 15, 2019 18:05
@iotaledger iotaledger deleted a comment May 15, 2019
@iotaledger iotaledger deleted a comment May 15, 2019
@iotaledger iotaledger deleted a comment May 15, 2019
@iotaledger iotaledger deleted a comment May 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-Spent Addresses Deffered Will be addressed and merged in later versions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stop solidifying when asking for previously pruned transactions
3 participants