pull down to refresh

by bruno

Fuzzing a Bitcoin wallet is very different from fuzzing a parser or a single pure function. There are many details to pay attention, otherwise you can have performance and determininsm issues. In general, wallets are stateful, persistent, have cryptographic operations, dependent on chain state, and more. Based on my experience writing wallet fuzz targets for Bitcoin Core, this post walks through the main performance and determinism pitfalls — and how to avoid them, especially to help other devs to write fuzz targets for other libraries and applications. The inspiration for writing this comes from a recent talk with a BDK maintainer, Leo, about adding fuzzing there, where they’re having similar issues that we had in past. Please, contibute to this thread if you have any other point that has not been covered here.
  • The Keypool Size
  • Descriptor and miniscript parsing
  • Mock the fee estimator
  • Avoid Encryption/Decryption
  • Mock the Database
  • Write a “Wrapped Wallet”
  • Closing Thoughts


...read more at delvingbitcoin.org