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

Improve consistency on fork 1 and 5 recovery #358

Closed
4miners opened this issue Dec 16, 2016 · 0 comments
Closed

Improve consistency on fork 1 and 5 recovery #358

4miners opened this issue Dec 16, 2016 · 0 comments
Assignees
Milestone

Comments

@4miners
Copy link
Contributor

4miners commented Dec 16, 2016

When we need to deal with forks - two competiting blocks with same timestamp can happen, like here:

NODE-A:
[inf] 2016-12-16 05:46:01 | Fork - {"delegate":"7ac9d4b708fb19eaa200eb883be56601ddceed96290a3a033114750b7fda9d0b","block":{"id":"7178860889734481430","timestamp":17757960,"height":1573042,"previousBlock":"12148071383986657341"},"cause":5}
[WRN] 2016-12-16 05:46:01 | Delegate forging on multiple nodes - 7ac9d4b708fb19eaa200eb883be56601ddceed96290a3a033114750b7fda9d0b
[inf] 2016-12-16 05:46:01 | Last block stands

NODE-B:
[inf] 2016-12-16 05:46:01 | Fork - {"delegate":"7ac9d4b708fb19eaa200eb883be56601ddceed96290a3a033114750b7fda9d0b","block":{"id":"13396432513620010395","timestamp":17757960,"height":1573042,"previousBlock":"12148071383986657341"},"cause":5}
[WRN] 2016-12-16 05:46:01 | Delegate forging on multiple nodes - 7ac9d4b708fb19eaa200eb883be56601ddceed96290a3a033114750b7fda9d0b
[inf] 2016-12-16 05:46:01 | Last block stands

That can lead to network split - because block that was received first is winning one in such case, and not the older one as expected (both have same age). We need to ensure consistency here between all nodes on network, so I suggest implement following:

  • when both blocks have same age - keep one with higher or lower (not matter) id (unique value)
@karmacoma karmacoma added this to the Version 0.6.0 milestone Dec 16, 2016
4miners added a commit to 4miners/lisk that referenced this issue Dec 16, 2016
dakk pushed a commit to dakk/lisk that referenced this issue Dec 22, 2016
MaciejBaj pushed a commit to MaciejBaj/lisk that referenced this issue Jan 25, 2017
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