> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monad.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Blocksync

> Mechanism for synchronizing missing blocks

## Summary

Blocksync is a mechanism that nodes can use to acquire missing blocks. A block is considered missing when a Quorum Certificate is observed that references an unknown block.

Blocks can be missing from a node in one of two scenarios:

1. After the node completes statesync and its local block height is close enough to the network tip.
2. During ordinary consensus operations, the node does not receive enough RaptorCast chunks to decode the block. This can be due to packet loss or a network partition.

## Blocksync procedure

1. A single header request is made for a range of `num_blocks` blocks, starting with `last_block_id`.
2. A chain of `num_blocks` headers are received, forming a cryptographically verifiable chain back to `last_block_`.
3. For each of the `num_blocks` headers received, concurrent (up to a max concurrency factor) body requests are made containing the `body_id` included in the header.
4. Each body response is cryptographically verifiable by comparing against the corresponding header `body_id`.

<img src="https://mintcdn.com/monadfoundation-40611fb6/asJraP9TfdYeo6NL/static/img/monad-arch/consensus/blocksync/blocksync_procedure.svg?fit=max&auto=format&n=asJraP9TfdYeo6NL&q=85&s=8465b71b6acee6b5248e42e1b691047b" alt="Blocksync procedure" width="656" height="1281" data-path="static/img/monad-arch/consensus/blocksync/blocksync_procedure.svg" />
