Page MenuHomePhabricator

[Cashtab] Only hydrate changed utxos
AbandonedPublic

Authored by bytesofman on Feb 10 2022, 23:20.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

T1683

Working alpha - supersedes D9570

This diff optimizes cashtab so that only changed utxos are "hydrated," that is, only changed utxos are processed with SLPDB to determine whether or not they are eTokens.

Cashtab currently checks all utxos every time something has changed. This is inefficient, but persisted for some time because

  1. Non-trivial array manipulation required to make this work
  2. Even with this optimization, Cashtab is slower than a mobile wallet. This can and will be fixed (tx processing should be instant). However the fix will involve a more significant refactor.

In testing, this reduces the wait time on receiving a new tx (or UI lock time on sending a new tx) by about 60%.

This diff is intended as info only. The actual implementation will be submitted in easier to review stacks, incrementally including each function and unit tests. Wanted to get this up to save the work.

Test Plan
  1. This diff will be abandoned, so there is no specific test plan
  2. Because this diff is incomplete and changes Cashtab utxo management, only test with newly created wallets that have small balances.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
the-long-awaited-utxo-optimization
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 18247
Build 36302: Build Diffcashtab-tests
Build 36301: arc lint + arc unit

Event Timeline

This MVP has been superseded by 11107