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

Hotfix: Gyros - take transaction reattachments into account #1699

Merged
merged 6 commits into from
Dec 30, 2019

Conversation

GalRogozinski
Copy link
Contributor

@GalRogozinski GalRogozinski commented Dec 30, 2019

Description

There is an edge case where IRI didn't account for a transaction that was shared between two distinct bundles. Once it marked it as "counted" in one bundle, it was ignored for the next bundle. This lead to a corrupt ledger state.

Type of change

  • Bug fix (a non-breaking change which fixes an issue)

How Has This Been Tested?

I ran it on a node that synced from hornet (1) and an isolated node that had a corrupt db (2).

  1. It managed to sync from hornet ✔️
  2. It managed to restore the DB via the "reset corrupted milestone" mechanism

Checklist:

  • 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

@GalRogozinski GalRogozinski changed the title Fix: Gyros - take transaction reattachments into account Hotfix: Gyros - take transaction reattachments into account Dec 30, 2019
@GalRogozinski GalRogozinski merged commit 1b4cb1f into iotaledger:dev Dec 30, 2019
@GalRogozinski GalRogozinski deleted the fix-ledger-calculation branch December 30, 2019 01:28
@GalRogozinski
Copy link
Contributor Author

For clarity, when we have 2 bundle tails R-0 and 0, they both define distinct transfers. Transaction 3 is common to both of them and thus must be accounted twice.

image

@GalRogozinski
Copy link
Contributor Author

The corruption happened when milestone #1293082 was issued

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants