Sneak peak to the next Wasabi release:

Turbo Sync drastically speeds up wallet loading.

Wasabi uses BIP158 block filters to find out how much bitcoin you have without ever sending your addresses to a third party. The coordinator gives you a block filter, a tiny compression of all the addresses in that block. The client checks if his address is referenced in the filter, and if yes, downloads the block from a random Bitcoin node over Tor, and scans it for the transactions with his addresses. In some cases there are false positives, so your address is referenced in a filter, but it's not actually in that block.

Wasabi generates a lot of new addresses during coinjoining, and in the past that meant that every filter has to be checked against all of the addresses the wallet ever generate. The more addresses are checked against a filter, the higher the false positive rate, thus a lot more blocks need to be downloaded that didn't actually include transactions of you. This makes wallet loading super slow.

The idea of Turbo Sync is to make two subsequent filter synchronization. The first sync is with only the fresh unused addresses where we expect new coins might be received, this one is super fast. Now you see the user interface of the wallet, and you can receive and send your money securely and privately. The second sync includes the addresses that already received money, because maybe someone sent you money to the same address twice. In most cases, no additional money is discovered this way, so the wallet balance does not change. But if there are new coins discovered, then the wallet balance gets increased on the fly - yay to extra sats.

That's why with the upcoming Wasabi release wallet loading will be *A LOT* faster!

Reply to this note

Please Login to reply.

Discussion

πŸ™ŒπŸ§‘

Thanks

This applies to continuous discovery, right? Or does it help anyhow when you do a completely new wallet discovery?

Yes, this is for continuous wallet loading. It makes wallet load almost instant if you were offline for a couple hours.

There is another trick to speed up wallet recovery (specifically when recovering from a wallet.json file, to not check early filters for all already derived keys, but only the first 21 of them. That's in a follow up PR which might not make it to this release though.

Beautiful. Could electrum ever implement a system like this?

It seems way to easy to completely dox your coins against your IP just by accidentally letting electrum connect to a random node.

Electrum is way faster and consumes way less bandwidth. Tradeoffs...