cryptoadvance / cryptoadvance/specter-desktop

Performance: Many calls of check_utxo in wallet

Open
#1,571 1 comment 0 reactions 0 assignees View on GitHub
performance
Dominant language
Python
Stars
847
Forks
259
Avg merge
6d 18h
Merged PRs (30d)
2

Description

Why is [check_utxo() in wallet.py](https://github.com/cryptoadvance/specter-desktop/blob/ef3483cc3374fbc8fd49f408b085db10f6411641/src/cryptoadvance/specter/wallet.py#L789) called so many times? Since it always makes RPC calls (it locks and unlocks UTXOs) this could be a problem with larger UTXO lists.

![image](https://user-images.githubusercontent.com/70536101/153484525-95ee0994-84ff-4309-9217-19901f69799d.png)

Contributor guide

Open the contributing guide

Research direction

Start at check_utxo() in src/cryptoadvance/specter/wallet.py around line 789 and trace the callers shown by the reported repeated calls. Check which calls trigger RPC locking and unlocking of UTXOs, then measure the behavior with larger UTXO lists. Done means identifying and reducing unnecessary calls without changing UTXO handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.