Statistical fault localization tool for analyzing distributed consensus failures in Ripple protocol. Processes validator logs from a 7-node network to identify patterns that correlate with consensus failures.
pip install tqdm richThis repository contains two equal, first-class approaches for consensus bug isolation:
python3 scripts/main.pyPerforms two-phase analysis:
- Cache Generation: Evaluates predicates on message pairs from validator logs and caches results
- Statistical Fault Localization: Aggregates observations across successful/failed runs, identifies suspicious predicates
Set REGENERATE_CACHE = False in scripts/main.py to skip cache regeneration and load from pickle (faster).
python3 scripts/baseline.pyReads predicate observations directly from PRED annotations in validator logs and applies the same statistical fault localization algorithm.
python3 scripts/analyze.py # Print confusion matrix for all configurationsUsed by both approaches to evaluate prediction accuracy on failure modes (Incompatible, Insufficient, Agreement).
src/- Core library code shared by both approachesmodels/- Message types and predicate definitionsanalysis/- Statistical fault localization algorithmsutils/- Network topology and configuration
scripts/- Analysis pipeline entry pointsmain.py- Message-based (consensus-aware) approachbaseline.py- Baseline (PRED-based) approachanalyze.py- Shared evaluation and statistics
cache/- Generated pickle caches (gitignored)data/- Validator logs and results