What to expect (and what not to expect) from the upcoming “view tag” optimization to reduce wallet scanning time

In order to find transactions that belong to you, you need to scan every transaction in the blockchain since your wallet was created. This is thanks to Monero's stealth addresses, which ensure that no one can look up your address in the blockchain and see transactions that belong to you.

In this coming hard fork, there is an optimization included called "view tags" that can speed up the time it takes to scan for your transactions. UkoeHB proposed the core idea as currently implemented; the technical details are here and the implementation is here.

After the hard fork, every wallet will add "view tags" to every newly created transaction. When you scan all transactions in the chain looking for yours, your scanner will check the view tags to find the ones that belong to you quicker. The optimization will kick in at the hard fork, and only applies to newly created transactions after the fork.

What to expect

If you run a node, you have a wallet that points to that node, and your wallet is running on the same network as that node (for example, you use the GUI wallet and run a node in the GUI), you can likely expect a noticeable speed bump when your wallet needs to scan many transactions starting after the fork height.

Running the CLI wallet on my machine (core i7 4-core/8-thread 1.80 GHz, 32gb RAM, NVMe SSD) pointing my wallet to a node running on the same machine, I saw a reduction in scanning time of around 30% in most cases, and for some block ranges, a reduction upwards of 40%. Your mileage may vary.

What not to expect

If your wallet points to a remote node, there is a chance view tags do not reduce scanning time, since simply downloading all transactions may be the bottleneck on scanning time in that case, which view tags have no impact on. View tags speed up the "scanning" the wallet does on your device; if your download speed from the node you're pointing to is slow, and your device is solid, view tags won't have any impact.

Going forward

Speculation here: there may be more room to optimize wallet scanning further, perhaps to a significant degree, even when pointing to a remote node over tor. The good news is that with view tags, scanning should be sped up for all time, and any optimizations along these lines will be made even stronger by view tags (and won't require a fork to realize).

submitted by /u/j-berman
[link] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *