# sim/horizon/consensus-security Models behind `docs/analysis/horizon/consensus-security.md` and `docs/analysis/51-percent.md` (Horizon lane 1, 6 October 2026). Python 3.10 with numpy; run on the Mac under the main checkout's run lock: `/Users/joshm/Projects/igneum/tools/lock/with-lock.sh run nice -n 19 `. Nothing here edits `sim/finality_v2.py`; `finality_horizon.py` imports it. | file | what | run | output | |---|---|---|---| | `ghostdag_sim.py` | GHOSTDAG (as `protocol.rs`) under a withholding attacker: reorg depth, fork age, win rate, blue share, honest blocks turned red, by hash share H, delay d, hold T; 1 or 10 blocks/s | `python3 ghostdag_sim.py --seeds 20 --out ghostdag_results_1bps.md --json ghostdag_results_1bps.json`; `--bps 10 --k 124 --delays 0.35,0.67,2 --holds 10,30,60,90 --warm 60 --post 15` | `ghostdag_results_1bps.md/.json`, `ghostdag_results_10bps.md/.json` | | `finality_horizon.py` | the finality rule over the adversary's share 20, 34, 51, 67, 90 percent: renter, silent set, bought keys, poisoned eclipse, partition with an equivocator (v2 and v3), abrupt departure (v2 and v3) | `python3 finality_horizon.py --out finality_horizon_results.md` (about 10 min; `--quick` for a smoke run) | `finality_horizon_results.md` | | `signalling.py` | the P2 miner-signalling game: binomial noise, holdout, forced flip, signal then defect, window alternatives | `python3 signalling.py --out signalling_results.md` | `signalling_results.md` | | `cost_model.py` | every attack's rented hash, duration, cost at 1 to 1,000 GH/s, subsidy earned, and the rental equilibrium | `python3 cost_model.py --out cost_results.md` | `cost_results.md` | Price basis USD 11.7 per GH/s-hour, measured 6 October 2026 (`docs/bench-log.md`, "Rental cost of hash"). Seeds and machine for each result are in the result file's first line.