cryptoadvance / cryptoadvance/specter-desktop

"Run the numbers" shall use muhash

Open
#2,176 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
847
Forks
259
Avg merge
6d 18h
Merged PRs (30d)
2

Description

**Describe the bug**
Or it should be at least possible to set `muhash` when calling `gettxoutsetinfo`. Using the `coinstatsindex` make it take a second instead of minutes.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to `http://127.0.0.1:25441/wallets/wallet//receive/`
2. Click on 'Run the numbers!'
3. It takes too long since running `gettxoutsetinfo` without `muhash` parameter is very slow. With `muhash` parameter, one has to have the small (currently 131MB) `coinstatsindex`.

**Expected behavior**
"Run the numbers" should take less than a second. It should be immediate.

```
$ time bitcoin-cli gettxoutsetinfo muhash
{
"height": 775192,
"bestblock": "000000000000000000071fafcd59fb89454864d51afc206559111381b22cb630",
"txouts": 83747992,
"bogosize": 6243049379,
"muhash": "fae547fb57efe29fcb36c9caf39114543c5d827d8b0831147ad0f0136dc90a22",
"total_amount": 19282240.19258451,
"total_unspendable_amount": 216.05741549,
"block_info": {
"prevout_spent": 6465.64625252,
"coinbase": 6.41212171,
"new_outputs_ex_coinbase": 6465.48413081,
"unspendable": 0.00000000,
"unspendables": {
"genesis_block": 0.00000000,
"bip30": 0.00000000,
"scripts": 0.00000000,
"unclaimed_rewards": 0.00000000
}
}
}
0m00.02s real 0m00.00s user 0m00.00s system
```

**Desktop (please complete the following information):**
- Where is your node running: local full node (plain Bitcoin Core on Linux, no bundles)
- Where is your specter running: pip3 local Linux x86_64
- Browser Chrome
- Specter Version 1.14.5

Contributor guide

Open the contributing guide

Research direction

Start at the wallet receive page at /wallets/wallet//receive/ and trace the "Run the numbers!" action to the gettxoutsetinfo call. Check how the muhash parameter and coinstatsindex are handled, then verify that the action completes promptly and returns the expected result.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.