HomePhabricator

Add simulation-based CCoinsViewCache fuzzer

Description

Add simulation-based CCoinsViewCache fuzzer

Summary:
The fuzzer goes through a sequence of operations that get applied to both a
real stack of CCoinsViewCache objects, and to simulation data, comparing
the two at the end.

Add CCoinsViewCache::SanityCheck() and use it in fuzz test

Add deterministic mode to CCoinsViewCache

with a new LIMITED_WHILE macro from core#22649

This is a backport of core#27011

Test Plan:

mkdir build_fuzz
cd build_fuzz/
cmake -GNinja ..   -DCMAKE_C_COMPILER=clang   -DCMAKE_CXX_COMPILER=clang++   -DENABLE_SANITIZERS="fuzzer;address;undefined"
ninja bitcoin-fuzzers
export DIR_FUZZ_IN=~/dev/qa-assets/fuzz_seed_corpus
./test/fuzz/test_runner.py -g ${DIR_FUZZ_IN}  coinscache_sim

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D16174

Details

Provenance
Pieter Wuille <pieter@wuille.net>Authored on Jan 31 2023, 23:04
PiRKCommitted on May 20 2024, 15:46
PiRKPushed on May 20 2024, 15:46
Reviewer
Restricted Project
Differential Revision
D16174: Add simulation-based CCoinsViewCache fuzzer
Parents
rABC717d92c40f80: [Automated] Update seeds
Branches
Unknown
Tags
Unknown