Skip to content

Missing blocks due to high latency of maintenance block #504

@abitmore

Description

@abitmore

According to the design, there are much more work to be done at maintenance interval, so it's expected that latency of those maintenance blocks will be higher. It's exactly what happening in the production network, logs attached below. At every maintenance interval, 3 slots will be skipped, that means we have 12 seconds for a witness to generate a maintenance block and broadcast it to the next witness and the next witness should be able to validate it before generating the next block.

However, if the next witness didn't receive the maintenance block in 3 seconds, according to current implementation of witness plugin, she will consider that block as lost, so she will generate another maintenance block. This behavior is debatable.

  • if the block is really lost, it's good for the whole network if she generate another block, so the next witness will have 9 seconds (or 12?) to validate it and generate the next block. The total block interval will be shortest.
  • if the block really need 3 seconds to generate, her new block will likely reach the next witness later than the original one, so her block will be ignored, she will miss her block.
  • a worse scenario is that active witness list and/or witness schedule can change after the maintenance block, so the next witness after different maintenance block can be different, so it could cause forking (see this link for example).

Thoughts?

Related logs:

2017-11-23T18:00:03 th_a:Witness Block Production block_production_loo ] Generated block #22049281 with timestamp 2017-11-23T18:00:03 at time 2017-11-23T18:00:03                       witness.cpp:184
2017-11-23T18:00:03 th_a:invoke handle_block         handle_block ] Got block: #22049281 time: 2017-11-23T18:00:00 latency: 3267 ms from: verbaltech2  irreversible: 22049263 (-18)                     application.cpp:499
...
2017-11-23T19:00:00 th_a:invoke handle_block         handle_block ] Got block: #22050477 time: 2017-11-23T19:00:00 latency: 833 ms from: bhuz  irreversible: 22050458 (-19)                     application.cpp:499
...
2017-11-23T20:00:01 th_a:invoke handle_block         handle_block ] Got block: #22051674 time: 2017-11-23T20:00:00 latency: 1554 ms from: delegate.baozi  irreversible: 22051655 (-19)                  application.cpp:499
...
2017-11-23T21:00:01 th_a:invoke handle_block         handle_block ] Got block: #22052871 time: 2017-11-23T21:00:00 latency: 1235 ms from: wackou  irreversible: 22052855 (-16)                  application.cpp:499
...
2017-11-23T22:00:02 th_a:invoke handle_block         handle_block ] Got block: #22054068 time: 2017-11-23T22:00:00 latency: 2001 ms from: witness.still  irreversible: 22054049 (-19)                   application.cpp:499
...
2017-11-23T23:00:01 th_a:invoke handle_block         handle_block ] Got block: #22055265 time: 2017-11-23T23:00:00 latency: 1452 ms from: delegate.freedom  irreversible: 22055246 (-19)                        application.cpp:499
...
2017-11-24T00:00:03 th_a:invoke handle_block         handle_block ] Got block: #22056462 time: 2017-11-24T00:00:00 latency: 3104 ms from: verbaltech2  irreversible: 22056442 (-20)                     application.cpp:499
2017-11-24T00:00:03 th_a:invoke handle_block         handle_block ] Got block: #22056462 time: 2017-11-24T00:00:00 latency: 3372 ms from: verbaltech2  irreversible: 22056442 (-20)                     application.cpp:499
...
2017-11-24T01:00:01 th_a:invoke handle_block         handle_block ] Got block: #22057659 time: 2017-11-24T01:00:00 latency: 1214 ms from: xeldal  irreversible: 22057643 (-16)                  application.cpp:499
...
2017-11-24T02:00:02 th_a:invoke handle_block         handle_block ] Got block: #22058856 time: 2017-11-24T02:00:00 latency: 2005 ms from: witness.still  irreversible: 22058837 (-19)                   application.cpp:499
...
2017-11-24T03:00:01 th_a:invoke handle_block         handle_block ] Got block: #22060053 time: 2017-11-24T03:00:00 latency: 1040 ms from: blckchnd  irreversible: 22060036 (-17)                        application.cpp:499
...
2017-11-24T04:00:01 th_a:invoke handle_block         handle_block ] Got block: #22061250 time: 2017-11-24T04:00:00 latency: 1161 ms from: xn-delegate  irreversible: 22061232 (-18)                     application.cpp:499
...
2017-11-24T05:00:01 th_a:invoke handle_block         handle_block ] Got block: #22062447 time: 2017-11-24T05:00:00 latency: 1624 ms from: xman  irreversible: 22062431 (-16)                    application.cpp:499
...
2017-11-24T06:00:02 th_a:invoke handle_block         handle_block ] Got block: #22063644 time: 2017-11-24T06:00:00 latency: 2891 ms from: verbaltech2  irreversible: 22063629 (-15)                     application.cpp:499
2017-11-24T06:00:03 th_a:invoke handle_block         handle_block ] Got block: #22063644 time: 2017-11-24T06:00:00 latency: 3144 ms from: verbaltech2  irreversible: 22063630 (-14)                     application.cpp:499
...
2017-11-24T07:00:01 th_a:invoke handle_block         handle_block ] Got block: #22064840 time: 2017-11-24T07:00:00 latency: 1210 ms from: in.abit  irreversible: 22064823 (-17)                 application.cpp:499
...
2017-11-24T08:00:00 th_a:invoke handle_block         handle_block ] Got block: #22066037 time: 2017-11-24T08:00:00 latency: 867 ms from: roelandp  irreversible: 22066020 (-17)                 application.cpp:499
...
2017-11-24T09:00:01 th_a:invoke handle_block         handle_block ] Got block: #22067234 time: 2017-11-24T09:00:00 latency: 1563 ms from: abc123  irreversible: 22067216 (-18)                  application.cpp:499
2017-11-24T09:00:01 th_a:invoke handle_block         handle_block ] Got block: #22067234 time: 2017-11-24T09:00:00 latency: 1835 ms from: abc123  irreversible: 22067217 (-17)                  application.cpp:499
...
2017-11-24T10:00:01 th_a:invoke handle_block         handle_block ] Got block: #22068431 time: 2017-11-24T10:00:00 latency: 1061 ms from: roelandp  irreversible: 22068417 (-14)                        application.cpp:499
...
2017-11-24T11:00:01 th_a:invoke handle_block         handle_block ] Got block: #22069628 time: 2017-11-24T11:00:00 latency: 1617 ms from: delegate.baozi  irreversible: 22069611 (-17)                  application.cpp:499
...
2017-11-24T12:00:00 th_a:invoke handle_block         handle_block ] Got block: #22070825 time: 2017-11-24T12:00:00 latency: 960 ms from: roelandp  irreversible: 22070809 (-16)                 application.cpp:499
2017-11-24T12:00:01 th_a:invoke handle_block         handle_block ] Got block: #22070825 time: 2017-11-24T12:00:00 latency: 1230 ms from: roelandp  irreversible: 22070810 (-15)                        application.cpp:499
...
2017-11-24T13:00:03 th_a:Witness Block Production block_production_loo ] Generated block #22072022 with timestamp 2017-11-24T13:00:03 at time 2017-11-24T13:00:03                       witness.cpp:184
2017-11-24T13:00:03 th_a:invoke handle_block         handle_block ] Got block: #22072022 time: 2017-11-24T13:00:00 latency: 3269 ms from: verbaltech2  irreversible: 22072007 (-15)                     application.cpp:499
2017-11-24T13:00:03 th_a:invoke handle_block         handle_block ] Got block: #22072022 time: 2017-11-24T13:00:00 latency: 3269 ms from: verbaltech2  irreversible: 22072007 (-15)                     application.cpp:499
...
2017-11-24T14:00:00 th_a:invoke handle_block         handle_block ] Got block: #22073218 time: 2017-11-24T14:00:00 latency: 955 ms from: delegate-1.lafona  irreversible: 22073201 (-17)                        application.cpp:499
...
2017-11-24T15:00:00 th_a:invoke handle_block         handle_block ] Got block: #22074415 time: 2017-11-24T15:00:00 latency: 940 ms from: delegate-1.lafona  irreversible: 22074400 (-15)                        application.cpp:499
...
2017-11-24T16:00:00 th_a:invoke handle_block         handle_block ] Got block: #22075610 time: 2017-11-24T16:00:00 latency: 933 ms from: delegate-1.lafona  irreversible: 22075593 (-17)                        application.cpp:499
...
2017-11-24T17:00:01 th_a:invoke handle_block         handle_block ] Got block: #22076807 time: 2017-11-24T17:00:00 latency: 1162 ms from: in.abit  irreversible: 22076791 (-16)                 application.cpp:499
...
2017-11-24T18:00:01 th_a:invoke handle_block         handle_block ] Got block: #22078003 time: 2017-11-24T18:00:00 latency: 1081 ms from: delegate-1.lafona  irreversible: 22077987 (-16)                       application.cpp:499

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions