The wallet has poor fuzz coverage. Hopefully, some work is being done to improve it. The goal of this issue is to actively track current work and work that needs to be done to improve fuzz coverage for the wallet.
Open PRs / Ready to review
Current wallet targets
We currently have 6 specific targets for wallet, which cover:
- Fees (
wallet/fees.cpp
) - Coin selection
- ScriptPubKeyManager (descriptor)
- Coin control (
CCoinControl
) - Notifications
- ISO8601 parser
Nice to have
- Feebumper target
- More coverage for
CWallet
stuff - Wallet transaction target
- Wallet receive target
- CoinsResult target
- Wallet RPC (https://github.com/bitcoin/bitcoin/issues/30458 - good first issue)
Won’t/Can’t cover
Legacy wallet removal
The goal is to remove legacy wallets and migrate them to descriptor ones. There is an open issue with a proposed timeline for Legacy Wallet and BDB removal (https://github.com/bitcoin/bitcoin/issues/20160). For this reason, we do not aim to increase fuzz coverage for legacy stuff. See that the scriptpubkeyman
target only uses descriptor ones.
External signer
I do believe we can’t have fuzz coverage for external signer code.
Performance and determinism
Unfortunately, some aspects of the wallet may affect the fuzzing performance. E.g.:
SetupDescriptorScriptPubKeyMans
(it might also be non-deterministic due to key generation)- Wallet encryption
- Wallet migration (there is a PR improving it - #28574)
Any ideas about it or PRs to add let me know.