Closed Frozen closed 2 months ago
PR Explanation: In current dev shard 0 node are signing the crosslink heartbeat with the current leader private key, however upon processing the heartbeat shard 1 is verifying the public key by using the epoch number in the heartbeat hb.epoch(). In normal situation it usually works fine since hb.epoch() and cur.epoch() will be the same or more or less 1 epoch difference. However, in cases where the crosslink wasn't processed for a long time, the leader in hb.epoch() may not have been elected. It will be especially true in the future with external leader rotation when external validator can be kick out from committee due to low signature rate.
This PR is takes the assumption that the heartbeat has to be processed as soon as they are sent, and making sure it is sent by a valid/elected validator should be enough for now
@Frozen can you review the conflict and @GheisMohammadi comment
Crosslink heartbeat verify through current committee