semuxproject / semux-core

Semux Core
https://www.semux.org
MIT License
76 stars 31 forks source link

GUI: enable fast sync #254

Open honeycrypto opened 5 years ago

honeycrypto commented 5 years ago

🚀 Feature Request

Add checkbox Enable Fast Sync [ ] on GUI wallet launch (both new wallet initialisation and login to the existing wallet). Preferably also add short description on hover what this feature does. I think it should be by default enabled in all GUI wallets (we can override config) and disabled in CLI wallets.

witoldsz commented 5 years ago

Why should it be disabled by default on CLI clients? If I'm correct, only delegates need this flag, so should it be enabled by default only for them? Or it's not that simple?

In any case I would argue against having this flag being disabled or enabled by default based on GUI/CLI. One can run delegate on GUI and regular wallet on CLI.

honeycrypto commented 5 years ago

@witoldsz we have also #255 issue regarding delegates and fast_sync

witoldsz commented 5 years ago

OK, but still: having some protocol setting being different depending on GUI/CLI does not seem right to me. Why would GUI default to fastSync=true and CLI default to fastSync=false?

What if I start using GUI, stop and start again CLI (or vice versa)?

honeycrypto commented 5 years ago

@witoldsz in CLI wallets users must provide all the desired flags or config options on launch. That's the common practice just everywhere. ie: ./semux-cli.sh --fastsync=true --network=testnet There must be some default values in any case. Do you suggest to have defaults to true?

witoldsz commented 5 years ago

All I am saying is that whatever you do, just try to be as little surprising as possible. Defaulting fastSync to different values based on whether one starts GUI or CLI is damn surprising, I guess ;-)

More questions comes up when I think about it: what happens if I have a fastSync DB and then I disable the option and the other way around: when my DB is not fastSync and I enable it?

Maybe the client should default to whatever database is and if there is no database, should it ask on creation… or just default to something and then once it's set the client always defaults to that, so no accidental database reindexing/purging/rebuilding would take place? What do you think?