iotaledger / iri

IOTA Reference Implementation
Other
1.15k stars 370 forks source link

Milestones can be skipped in the ledgerstate leading to "Skipping negative value for address: ...." #891

Open hmoog opened 5 years ago

hmoog commented 5 years ago

The following line:

https://github.com/iotaledger/iri/blob/4f13ce3a3d212a0fbfbb23afc9bc5a4d8e2e9bf5/src/main/java/com/iota/iri/Milestone.java#L237

only checks if the currently processed milestone index is bigger than the old one. If it happens that a milestone becomes solid that is not immediately following the previous one, all other milestones in between get subsequently ignored and the ledger state becomes invalid.

rajivshah3 commented 5 years ago

If it happens that a milestone becomes solid that is not immediately following the previous one

Shouldn't the milestones become solid in ascending order? e.g. 636816, then 636817, then 636818, etc