Issue Details
- Number
- 27002
- Title
- listunspent, fundrawtransaction, getwalletinfo locks wallet for any other operation
- Description
- **Actual behavior**
If you run a `listunspent`, `fundrawtransaction`, `getwalletinfo` (maybe other commands) on a big wallet (e.g. with wallet with at least 8000 transactions or more) all other operations conducted in parallel (e.g. `getnewaddress`) will be stuck until that command finishes.
Because of this issue when our wallet is sending transactions using `listunspent` and `fundrawtransactions` there is no way to get a new address via `getnewaddress` RPC call (as bitcoin waits for those calls to finish).
I've got bitcoin's datadir and wallet both on NVME drives, but running `listunspent` and sometimes `getwalletinfo` is painfully slow.
The wallet itself is not that big and was created recently to migrate from bdb to the new descriptors wallet:
```
$ du -sh .bitcoin/desc/
78M .bitcoin/desc/
```
```
~$ ./bitcoin-cli -rpcwallet=desc getwalletinfo
{
"walletname": "desc",
"walletversion": 169900,
"format": "sqlite",
"balance": xxx,
"unconfirmed_balance": xxx,
"immature_balance": 0.00000000,
"txcount": 8482,
"keypoolsize": 4000,
"keypoolsize_hd_internal": 4000,
"paytxfee": 0.00000000,
"private_keys_enabled": true,
"avoid_reuse": false,
"scanning": false,
"descriptors": true,
"external_signer": false
}
```
```
$ time ./bitcoin-cli -rpcwallet=desc listunspent|grep txid|wc -l
224
real 1m15.596s
user 0m0.008s
sys 0m0.000s
```
**Expected behavior**
`listunspent` or `fundrawtransaction` shouldn't lock the wallet at least for getting new address, maybe other operations as well?
**To reproduce**
* create a new descriptors wallet and generate 17K addresses there
* create at least 8K transactions in and out
* try to run `listunspent` or `fundrawtransaction` and in parallel `getnewaddress`
* `getnewaddress` will take 60 seconds or more to return an address until either of `listunspent` or `fundrawtransaction` finishes
**System information**
I've tried latest bitcoin release `v24.0.1`, master branch (built 77a36033b5ecbf8dedb917d680f4116786fd7375 commit) issue reproduces.
Self-built for Ubuntu 18.04 LTS.
I've got bitcoin's datadir and wallet both on NVME drives, but running `listunspent` is painfully slow.
- URL
-
https://github.com/bitcoin/bitcoin/issue/27002
- Closed by
-
Back to List