NebulousLabs / Sia-UI

A Graphical Frontend for Sia - https://sia.tech
MIT License
389 stars 109 forks source link

Takes a while to synchronize or see my wallet #614

Closed ccampbell closed 7 years ago

ccampbell commented 7 years ago

I have a 5 month old MacBook Pro and ~50 Mbps internet connection and it takes hours to synchronize, and when I am synchronized it takes about 15 minutes just to unlock my wallet.

If this is the expected behavior then feel free to close. I am just wondering if there is there any way to make this faster or to use a wallet without storing the full 4.5 GB consensus.db file?

lukechampine commented 7 years ago

This is a known drawback to blockchain-based consensus. Bitcoin has the same problem. Essentially, you need to have the full blockchain in order to do consensus. So there are ways you can sacrifice some security for convenience (e.g. a web wallet, where someone runs a node on your behalf and you trust them not to cheat you), but currently Sia does not have anything in place to address this.

There are ways we can speed up the initial syncing process, like downloading blocks in parallel, or providing a signed .torrent file for a "snapshot" of the blockchain, but these aren't on our high-priority list at the moment.

btw, the wallet should very unlock quickly after the first unlock. The first time you unlock it, it needs to process all the blocks in the blockchain. After that, it only needs to process new blocks.

Closing this since it is indeed the expected behavior, but definitely follow up with more questions if you have them.

sanasol commented 7 years ago

Bitcoin has the same problem. Essentially, you need to have the full blockchain in order to do consensus.

Bitcoin have some workaround, at least for reduce wallet size https://github.com/bitcoin/bitcoin/blob/master/contrib/debian/examples/bitcoin.conf#L134-L139