Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Mitigate against fork cause 2: Already confirmed transaction #259

Closed
Isabello opened this issue Aug 23, 2016 · 0 comments
Closed

Mitigate against fork cause 2: Already confirmed transaction #259

Isabello opened this issue Aug 23, 2016 · 0 comments
Assignees

Comments

@Isabello
Copy link
Contributor

Isabello commented Aug 23, 2016

When fork cause 2 occurs, we do not delete the offending transaction. Instead the node continues to try and forge its block until it misses its slot entirely. The TX stays on the table and the node continues this behavior until it is cycled.

In order to mitigate this, the software needs to delete the offending TX from the table to allow proper forging to occur.

See attached log:

http://pastebin.com/npnEThjV

@karmacoma karmacoma added this to the Mainchain Stabilisation milestone Aug 31, 2016
@karmacoma karmacoma added the ready label Sep 6, 2016
@karmacoma karmacoma self-assigned this Sep 29, 2016
@karmacoma karmacoma changed the title Fork Cause 2 - Mitigation Undo any offending transactions upon fork cause 2 Sep 30, 2016
@karmacoma karmacoma added easy and removed medium labels Oct 22, 2016
@karmacoma karmacoma changed the title Undo any offending transactions upon fork cause 2 Mitigate against fork cause 2: Already confirmed transaction Oct 22, 2016
karmacoma pushed a commit that referenced this issue Nov 6, 2016
Checking for already confirmed transaction at end of Transaction.prototype.verify, instead of Transaction.prototype.process. Mitigates against fork cause 2, where transaction enters unconfirmed transaction list from another peer, before block has been processed and applied. Affects Blocks.prototype.generateBlock where each transaction is verified before inclusion.

- Undoing offending transaction on fork cause 2.
- Removing transaction from unconfirmed transaction list.
- Refactoring code into separate prototype functions.
- Reusing said functions in Blocks.prototype.processBlock.
karmacoma pushed a commit that referenced this issue Nov 9, 2016
- Returning error on already processed transaction.
- Returning error on already confirmed transaction.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants