Crates.io | waterfalls |
lib.rs | waterfalls |
version | 0.4.1 |
source | src |
created_at | 2024-06-14 06:23:11.470518 |
updated_at | 2024-10-09 08:36:13.577268 |
description | Waterfalls provide blockchain data to liquid light-wallet client |
homepage | |
repository | https://github.com/RCasatta/waterfalls |
max_upload_size | |
id | 1271718 |
size | 173,804 |
Waterfall is a proposed new scanning mechanism for web light-clients wallets that leverages a new server endpoint.
Due to browser limitations the web wallet must use HTTP esplora API.
With this API we cannot batch requests like it's done in the electrum client, and we cannot make requests concurrently because rate limitation is enforced in the server, this result in very poor scan performance.
Since we are persisting wallet data in the browser (encrypted), the scan following the first are faster.
Txs | First | Following |
---|---|---|
80 | 66s (344 reqs) | 33s (187 reqs) |
3 | 11s (63 reqs) | 11s (65 reqs) |
Currently used at https://liquidwebwallet.org
The new waterfalls client avoids multiple requests by sending the bitcoin descriptor to the server. This has privacy implications, but we argue it's not that different than sending all of our addresses separately to the server. Specifically in the latter case we are not sending the knowledge of future addresses that are derivable from the descriptor in the former case. The real privacy gain is moving to a self-hosted server or to a personal node. Moreover, liquid specifically has the advantage of having confidential transactions and the blinding key is not sent to the server, thus a malicious server would know about the transactions of the wallet, but nothing about the assets exchanged and the value transacted.
Note the scan results in the first iteration includes the transaction unblinding which is roughly 100ms per tx.
Txs | First | Following |
---|---|---|
80 | 22s (85 reqs) | 1s (5 reqs) |
3 | 2s (11 reqs) | 1s (5 reqs) |
criterion
is used and nightly is not needed for benching, just do:
cargo bench
script_get_history
calls, to minimize client changes needed. The only exception is giving some extra information (block timestamp) to avoid even more requests.WaterfallRequest
and WaterfallResponse
should be handy in a separate crate so that client can use that