brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
bitcoin-testing-fuzzFuzz testing for Bitcoin code: Bitcoin Core's libFuzzer harnesses, rust-bitcoin / bdk / secp256k1 cargo-fuzz, AFL++. Seed corpus bootstrapping, regression tests. USE WHEN: hardening Bitcoin libraries, writing fuzz harnesses, reproducing fuzz-found crashes.
Independent GitHub snapshot · Automated classification · Original documentation governs
Fuzzing finds bugs by feeding randomly-generated inputs and watching for crashes / assertion failures. Critical for Bitcoin libraries parsing untrusted data (txs, scripts, P2P messages).
Located in src/test/fuzz/. Each .cpp file is one harness.
Bitcoin Core 29.0 (April 2025) replaced Autotools with CMake
(minimum 3.22): ./autogen.sh and ./configure are gone, and the
driver binary moved from src/test/fuzz/fuzz to build_fuzz/bin/fuzz.
Current as of Bitcoin Core 31.1 (July 2026):
# Build with fuzzing (preset sets BUILD_FOR_FUZZING=ON and
# SANITIZERS=undefined,address,fuzzer)
cmake --preset=libfuzzer
cmake --build build_fuzz
# Run a specific harness
FUZZ=tx_in build_fuzz/bin/fuzz <corpus_dir>
FUZZ=script build_fuzz/bin/fuzz <corpus_dir>
--preset=libfuzzer-nosan builds the same harnesses without the
address/undefined sanitizers into build_fuzz_nosan — far higher
throughput for long coverage-hunting runs.
afl++ and Honggfuzz bypass the presets: configure with
-DBUILD_FOR_FUZZING=ON and their compiler wrappers
(afl-clang-lto++, hfuzz-clang++), then drive build_fuzz/bin/fuzz
under afl-fuzz / honggfuzz.
Available targets: tx_in, tx_out, script, descriptor_parse,
miniscript_string, psbt, addrman, block_header, process_message, etc.
build_fuzz/test/fuzz/test_runner.py executes them all.
Use cargo-fuzz:
cd rust-bitcoin/fuzz
cargo +nightly fuzz run script_decode
Each fuzz_targets/*.rs is a separate target.
Native libFuzzer harnesses; verify against test vectors first, then random.
bitcoin-core/qa-assets — one directory per harness under
fuzz_corpora/, token dictionaries under fuzz_dicts/ (as of
September 2026).libFuzzer / AFL++ instrument code with branch coverage. New inputs that exercise new branches are kept, expanding coverage.
Effective for:
OSS-Fuzz and Bitcoin Core's own farms run continuous fuzzing 24/7. Findings reported privately; fixed before public disclosure.