state-sync/README.md
State sync is a component that runs within each Aptos node and is responsible for synchronizing the node to the latest blockchain state. It is required by both validators and fullnodes to ensure that they do not fall behind the rest of the network. To achieve this, state sync identifies and fetches new blockchain data from peers, validates the data and persists it to local storage.
To read more about state sync and node configurations, see the state sync developer documentation.
State sync is broken down into 4 sub-components, each with a specific purpose:
5 and the data streaming service will provide
this.1→5, 6→10, 11→15, and so on). The data client takes the request,
identifies which peer can handle the request and sends the request to them.X can send the data request to the storage service on peer Y to fetch
a batch of transactions.The state sync code structure matches the architecture outlined above:
In addition, there is also a directory containing the code for inter-component communication: https://github.com/aptos-labs/aptos-core/tree/main/state-sync/inter-component. This is required so that: