I start Parity software like so: parity -j
It takes a really long time to sync.
Is there any way to make it sync faster?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityI start Parity software like so: parity -j
It takes a really long time to sync.
Is there any way to make it sync faster?
First of all, you can increase the cache size to speed up block processing, for example to 1GB with --cache-size 1024
. Increase it even further if you have more memory available. I'm using 4096
.
If you either have a hard drive, or a solid state disk, optimize the database compaction for each type with --db-compaction hdd
or --db-compaction ssd
respectively.
Make sure transaction tracing is off with --tracing off
, however, this should be already the default behavior.
Use the fast pruning mode with --pruning fast
which reduces the state size kept in the client. Recently, this is also the default for parity.
Make sure you sync in active mode with --mode active
which does never stop actively syncing and importing blocks.
Finally, if you need to fresh sync your chain, do it in warp mode with --warp
. This fetches the latest state and latest 30k blocks from the chain and makes your node usable within only a couple of minutes.
In one line:
parity --mode active --tracing off --pruning fast --db-compaction ssd --cache-size 1024
--warp
is on by default. Explicitly defining the flag gives error Found argument '--warp' which wasn't expected, or isn't valid in this context
. So now there is no need to include --warp
in the command.
– Ayushya
Nov 2 '17 at 5:28
I believe the --warp
flag is what you're looking for, as detailed on their wiki and announced on their blog.
parity --warp
Use this unless you know for sure you need more than what the light client has to offer.
parity --light
Also, running parity --light db kill
will delete your existing chain data if you are already syncing.
I would like to share my configurations that I derived from answer by Afri(5chdn) and have been using for syncing to mainnet. If not anyone else, it shall help me later ;)
config.toml
[parity]
mode = "active"
base_path = "$HOME/parityDatadir"
[footprint]
tracing = "off"
pruning = "fast"
db_compaction = "ssd"
cache_size = 4096
[network]
port = 30303
min_peers = 50
max_peers = 100
startParityMainnet.sh
nohup parity --config config.toml --unsafe-expose &