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
See src/wallet/test/fuzz to see the existing wallet targets and https://maflcko.github.io/b-c-cov/fuzz.coverage/src/wallet/index.html for coverage.
Won't/Can't cover/Known issues
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.
edit: legacy wallet has been removed.
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
- Keypool (we usually set it to 1 to avoid any issue)
- DB interactions
Wallet RPC
There were some PRs attempting to create a fuzz target for wallet RPCs. However, it's not straightforward to do it since many RPCs depend on other contexts (e.g. fuzzing the listsinceblock RPC without producing any blocks does not seem too efficient). Also, the performance is another issue to take in consideration.
Any ideas about it or PRs to add let me know.