Checks optional values in header.
Check the clock drift.
Validate messages in a full block, relative to the parent tipset.
Ask peers for the
Message
s that these
Tipset
s should contain.
Requests covering too many tipsets may be rejected. As of 2023-07-13,
requesting for 8 tipsets works fine but requesting for 64 is flaky.
Download headers between the proposed head and the current one available
locally. If they turn out to be on different forks, download more headers up
to a certain limit to try to find a common ancestor.
Going forward along the tipsets, try to load the messages in them from the
BlockStore
, or download them from the network, then validate the full
tipset on each epoch.
Sync headers backwards from the proposed head to the current one, requesting
missing tipsets from the network. Once headers are available, download
messages going forward on the chain and validate each extension. Finally set
the proposed head as the heaviest tipset.
Validate the block according to the rules specific to the consensus being
used, and the common rules that pertain to the assumptions of the
ChainSync
protocol.
Validates full blocks in the tipset in parallel (since the messages are not
executed), adding the successful ones to the tipset tracker, and the failed
ones to the bad block cache, depending on strategy. Any bad block fails
validation.
Check if any CID in tipset
is a known bad block.
If so, add all their descendants to the bad block cache and return an error.