Open dimartiro opened 3 weeks ago
How can we update the babe randomenss and validate babe to import new blocks after executing the state sync?
Some findings regarding how to update the babe randomness using the state (so we can validate babe and import blocks on top of that)
When the warp sync finished getting the fragments and its completed, we need to request and import the latest state. This is a task that could take time and needs its own logic to be handle correctly. For this reason we are not going to implement the state sync as part of the warp sync, instead, we are going to implement it as an independent strategy that might be run right after the warp sync strategy finished.
OnBlockAnnounceHandshake
: Will update the best block hash / number for that peerOnBlockAnnounce
: same than OnBlockAnnounceHandshakeNextActions
: Will return a state requestProcess
: Will process the response and import the stateWe can read more about how the state sync is started after warp sync finishes here
An idea of how to implement the state sync strategy based on parity's implementation is here
Open questions: