bsc
bsc copied to clipboard
Feature: to optimise the current mining logic
Rationale
To follow the FF design more strictly, blocks of "no-turn-with-attestation" should be preferred over "in-turn-without-attestation". It could avoid validator delay broadcast too much.
Implementation
For a validator, during mining, it imported a block:
- if the imported block is an
in-turn-with-attestation: stop minning - if the imported block is an
in-turn-without-attestation: keep mining and collect votes, once enough vote to get the attestation, just broadcast the block to flip the imported one.
Notice: should be more cautious to check if it will bring more reorg or not first.
yes, it may cause more reorg. let's pending this issue, it may can be applied after FF improved.