FAST_SYNC protocol enables the 90% lighter blockchain

semux
semux
Published in
2 min readAug 30, 2019

One of the last, but not least improvements added to Semux 2.0 release is a new FAST_SYNC protocol. This is an experimental feature which is disabled by default in config/semux.properties, but we can recommend to all regular users to enable it manually.

At the time of this blog post you can enable it only in config file by setting sync.fastSync = true under 'Syncing' section, but also there is an open issue to add this switch also to GUI wallets in future releases: https://github.com/semuxproject/semux-core/issues/254

This feature basically stripped all the votes for non-pivot blocks. So when it's enabled, your wallet won't save votes of 100 validators on each block to disk. It will still keep saving the votes on pivot blocks (every 200th, block where validator set is being updated).
We'd like to encourage validators to keep FAST_SYNC protocol disabled because it's good to maintain the full history of blockchain. It's completely safe to turn it on for regular wallets.

- How much disk space can be saved when FAST_SYNC is on?
It will save you ~90% of a disk space. Yep, that's an impressive improvement.
At the time of this blog post, 30 August 2019, Semux blockchain reached 1,650,000 blocks. The size of full blockchain is ~17 Gbytes, the size of blockchain with FAST_SYNC enabled is ~1.5 Gbytes.

- What will happen if all validators will switch to FAST_SYNC protocol? Will Semux become more vulnerable?
No, because it doesn't affect the consensus. This protocol cannot open new vectors for attack. However, if everyone will start using fast_sync only, we can lose historical votes and that is no fun. Please maintain complete version of blockchain in your full nodes and validators. Feel free to use it in personal wallets on laptops etc.

- Shall I resync from scratch if I want to enable FAST_SYNC?
Yes, if you want to save disk space, then modify config, delete database folder and relaunch the wallet, so it can resync in light mode.

— — — — — — — — — — — — — — — — — — — — — —
Questions? Chat with developers in our discord server:
https://discord.gg/qQVckKZ

Github: https://github.com/semuxproject/semux-core
Website: https://www.semux.org/

--

--

semux
semux
Editor for

Semux is an open-source, performant Smart Contract platform, powered by the Semux BFT consensus algorithm.