2

Using parity --light is experimental, and this issue is currently blocking an initial sync.

How can I avoid using --light but store minimal blockchain on disk?

Something like:

[footprint]
pruning_history = 1

in my configuration file?

Is there anything more I should add to only store as much as --light would?

1

The best optimizations I can offer is:

[parity]
light = false

[network]
warp = true

[footprint]
tracing = "off"
fat_db = "off"
pruning = "fast"
pruning_history = 8
pruning_memory = 32
db_compaction = "ssd"

[snapshots]
disable_periodic = true

This disables light mode and enables warp-sync. Warp-sync does only verify PoW of ancient blocks and does not fully compute all historic states while fetching them. However, it stores all blocks on disk.

Transaction tracing and fat DB should be turned off, as this bloats the database. DB compaction should be set to ssd, you are running on SSD, aren't you? Try hdd otherwise.

Pruning should be set to fast to discard historic states, this reduces the database size significantly by around -90%. The minimum possible pruning history is 8. Setting lower would make no sense as this increases the danger of getting caught in chain reorganizations. With 15 seconds block times, reorgs of 8 and less blocks are not uncommon. Pruning memory can be further reduced if you like, but it will always keep at least 8 states afaik.

There is one more option which significantly reduces storage footprint as it does not keep all block history. I'll hide this option behind a spoiler quote to make sure everyone hovering over this below is aware that this is dangerous and should be in no way used in production.

--no-ancient-blocks

Running clients in this mode significantly reduces your footprint by several GB but will allow malicious actors in the network to trick your client into syncing a tampered chain. Do not use unless you understand the implications. Running --light mode is more secure than this. :)

  • Hmm, my chains/ethereum/db is 7.2GB and growing, and I'm only at block #2433713. Does this seem right to you? – Tom Hale Sep 29 '17 at 14:40
  • Sounds like a fast-pruned non-warped database. What are you trying to do? – Waqar Lim Oct 4 '17 at 8:26
  • I was trying to run the config you mentioned above, to get minimal disk usage. I definitely have warp=true. What size db would you expect from the above? – Tom Hale Oct 4 '17 at 11:03
  • ~10GB if warped – Waqar Lim Oct 5 '17 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.