harmony
harmony copied to clipboard
[Feature] Crosslink heartbeat signal
After we migrate to use epoch block chain as the beacon chain in nodes of shard 1 2 3, we also need to update the crosslink sending logic.
Previously, all validators in shard 1 2 3 download and sync the whole beacon chain, which contains all the processed crosslink data in the block headers. Leaders in shard 1 2 3 will send crosslinks based on what's the latest processed crosslink recorded in the beacon chain header. For example, shard 1 leader see from it's sync'ed beacon chain that the latest processed crosslink for shard 1 is at block 1000, then it will try to send a few more crosslinks starting from 1001...
Once we change the validators in shard 1 2 3 to only download the epoch block of beacon chain, the leaders won't be able to read the processed crosslink data in the full beacon chain anymore and will have no idea what's the latest crosslinks that's processed.
Thus we need to update the code so the real beacon chain committee (leader) can send a message containing what's the currently latest processed crosslink for each of the shards, so the shards can send corresponding crosslinks to the beacon chain so there is missing crosslinks (no gap) processed in beacon chain.