This version introduces fast sync and light sync for faster block sync and smaller ledger size.
Experimental release of fast sync and light sync
In this version we are introducing two new sync mode: fast sync and light sync.
-
Fast sync: node will sync the same full block history as before, but much faster by syncing the state trie directly. Think of it as a decentralized replacement of the ChainDB snapshot that many people are using.
-
Light sync: node will only sync headers of old blocks without transactions. The local ledger size will be much smaller than before (ChainDB size is about 4GB at the time of the release), but node will not be able to respond to
getblock
andgettransaction
RPC requests for old blocks/transactions. We recommend using light sync only when node disk space is not enough.
Currently fast sync and light sync mode are still in experimental stage, and not enabled by default.
How to enable fast sync and light sync
Please note that fast sync and light sync can only be enabled when node has NO local ChainDB directory (i.e. a fresh sync). You need to remove the ChainDB
directory and let node do a fresh sync if you want to enable them.
There are two ways to enable fast sync and light sync:
-
Add
--sync fast
argument when starting nknd to enable fast sync, or add--sync light
argument when starting nknd to enable light sync. -
Add
"SyncMode": "fast"
toconfig.json
to enable fast sync, or add"SyncMode": "light"
toconfig.json
to enable light sync.
You should only choose one sync mode, not both.
Other changes
- Add
getheader
RPC method - Add result cache to
getsubscriberscount
RPC method - Add
MaxRollbackBlocks
into config