Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet fuzzing tracking issue #29901

Open
10 tasks
brunoerg opened this issue Apr 17, 2024 · 4 comments
Open
10 tasks

Wallet fuzzing tracking issue #29901

brunoerg opened this issue Apr 17, 2024 · 4 comments

Comments

@brunoerg
Copy link
Contributor

brunoerg commented Apr 17, 2024

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

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 (#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.:


Any ideas about it or PRs to add let me know.

@maflcko
Copy link
Member

maflcko commented Apr 17, 2024

Coverage is nice, but if the fuzz test never finds any real user-facing issues, it will be useless. I don't think any wallet fuzz target found a real issue yet? Obviously coverage is the first step toward adding regression fuzz tests, so here are some ideas:

SetupDescriptorScriptPubKeyMans (it might also be non-deterministic due to key generation)

I wrote the ImportDescriptors helper, which should be deterministic.

Edit: Also links to the current coverage:

@brunoerg
Copy link
Contributor Author

Coverage is nice, but if the fuzz test never finds any real user-facing issues, it will be useless. I don't think any wallet fuzz target found a real issue yet?

I think we found a real issue with the coin selection target after the rework. But yes, it would be the only one.

Coverage is nice, but if the fuzz test never finds any real user-facing issues, it will be useless. I don't think any wallet fuzz target found a real issue yet? Obviously coverage is the first step toward adding regression fuzz tests, so here are some ideas:

I'm working on a target to cover and reproduce #27271.

@brunoerg
Copy link
Contributor Author

Just added #29936 to the list. It's a regression to #27271.

@brunoerg
Copy link
Contributor Author

Added #30134 to the list for review. It adds more coverage for ScriptPubKeyMan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants