There's a lot of detail on this PR on github. Here's a quote:
Instead of processing the entire block-chain one link at a time, and replay all transactions that ever happened in history, fast syncing downloads the transaction receipts along the blocks, and pulls an entire recent state database.
It's difficult to give an answer without just re-hashing the explanation on the Parity wiki...
The pertinent part is as follows:
These snapshots can be used to quickly get a full copy of the state at a given block. Every 30,000 blocks, nodes will take a consensus-critical snapshot of
that block's state. Any node can fetch these snapshots over the
network, enabling a fast sync.
The snapshot itself is comprised of 3 parts:
- A manifest, which is basically metadata about the snapshot;
- Block chunks, which contain raw block data about blocks and their transaction receipts;
- State chunks, which contain data about the state at a given block.
Chunks are currently set to 4MB in size.
So how does this actually speed up the sync? What that wiki page doesn't say is that we only sync the snapshots initially. So for each block at intervals of 30,000, we obtain a set of 4MB chunks. Then in the background we continue to sync the remaining block data.
This is equivalent to Geth's --fast
sync, which first syncs the block headers, and then in the background syncs the rest of the data. It's just that --warp
is syncing even less data on the first pass, and filling in the bigger gaps later on.
Edit:
See also the relevant official Ethcore blog post, specifically the section entitled Core Strength.
Best Answer
I'll take my shot. Experts, please correct me.
"Full" Sync: Gets the block headers, the block bodies, and validates every element from genesis block.
Fast Sync: Gets the block headers, the block bodies, it processes no transactions until
current block - 64
(*). Then it gets a snapshot state and goes like a full synchronization.Light Sync: Gets only the current state. To verify elements, it needs to ask to full (archive) nodes for the corresponding tree leaves.
EDIT (*) in newer version of geth it's -64