Expand description
Validator blockchain sync protocol
Structsยง
- Structure represening a request to ask a node a fork header for the requested height. The fork is identified by the provided header hash.
- Structure representing the response to
ForkHeaderHashRequest
, containing the requested fork header hash, if it was found. - Structure represening a request to ask a node for up to
BATCH
fork headers for provided header hashes. The fork is identified by the provided header hash. - Structure representing the response to
ForkHeadersRequest
, containing up toBATCH
fork headers. - Structure represening a request to ask a node for up to
BATCH
fork proposals for provided header hashes. The fork is identified by the provided header hash. - Structure representing the response to
ForkProposalsRequest
, containing up toBATCH
fork headers. - Structure represening a request to ask a node a fork sequence. If we include a specific fork tip, they have to return its sequence, otherwise they respond with their best fork sequence. We also include our own canonical(confirmed) tip, so they can verify we follow the same sequence.
- Structure representing the response to
ForkSyncRequest
, containing the requested fork sequence. - Structure represening a request to ask a node for up to
BATCH
headers before the provided header height. - Structure representing the response to
HeaderSyncRequest
, containing up toBATCH
headers before the requested block height. - Handler managing all
ProtocolSync
messages, over generic P2P protocols. - Structure represening a request to ask a node for up to
BATCH
blocks of provided headers. - Structure representing the response to
SyncRequest
, containing up toBATCH
blocks after the requested block height. - Structure represening a request to ask a node for their current canonical(confirmed) tip block hash, if they are synced. We also include our own tip, so they can verify we follow the same sequence.
- Structure representing the response to
TipRequest
, containing a boolean flag to indicate if we are synced, and our canonical(confirmed) tip block height and hash.
Constantsยง
Functionsยง
- Background handler function for ProtocolSyncForkHeaderHash.
- Background handler function for ProtocolSyncForkHeaders.
- Background handler function for ProtocolSyncForkProposals.
- Background handler function for ProtocolSyncFork.
- Background handler function for ProtocolSyncHeader.
- Background handler function for ProtocolSync.
- Background handler function for ProtocolSyncTip.
Type Aliasesยง
- Atomic pointer to the
ProtocolSync
handler.