mirror of
https://github.com/logos-blockchain/research.git
synced 2026-08-07 11:43:20 +00:00
The study started as a peering-degree question and grew well past it: propagation, adversary exposure, deanonymization and time-to-link, reliability under uniform and correlated churn, messaging redundancy, and cover traffic. The pd name no longer describes it. tools/simulators/blend/pd/ -> tools/simulators/blend/, package src/pd -> src/blend, and reports/blend/pd/ -> reports/blend/. Moved with git mv so history follows. The text substitutions are deliberately narrow. pd is also the conventional pandas alias, and pandas genuinely has a pd.plotting submodule, so a blanket pd. -> blend. rewrite would have corrupted four files. Only package-unambiguous forms were changed: from pd.X, -m pd.X, pd.<our module>, PD_BYTES_BUDGET, src/pd, and the pyproject name. All four import pandas as pd lines are untouched and verified. Both READMEs reframed: peering degree is now presented as the primary axis that ties the others together rather than as the subject, and the relative links, which lost a directory level in the move, are corrected. Verified after the move: ruff clean, 101 tests, 45 verify anchors, make targets, the script shims, an end-to-end smoke run, and data/report_numbers.py still reproducing the report tables from the checked-in evidence. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
55 lines
1.7 KiB
Makefile
55 lines
1.7 KiB
Makefile
VENV ?= .venv
|
|
PY := $(VENV)/bin/python
|
|
STAMP := $(VENV)/.installed
|
|
|
|
# Keep numpy/scipy BLAS single-threaded so joblib process parallelism doesn't oversubscribe.
|
|
export OMP_NUM_THREADS := 1
|
|
export OPENBLAS_NUM_THREADS := 1
|
|
export MKL_NUM_THREADS := 1
|
|
export NUMEXPR_NUM_THREADS := 1
|
|
|
|
.PHONY: install smoke sweep sweep-fullscale redundancy percolation correlated-churn figures verify test lint clean
|
|
|
|
# The stamp is the real install; targets below depend on it so `make sweep` (etc.) auto-installs
|
|
# on a fresh checkout and re-installs whenever pyproject.toml changes.
|
|
$(STAMP): pyproject.toml
|
|
python3 -m venv $(VENV)
|
|
$(PY) -m pip install -U pip
|
|
$(PY) -m pip install -e ".[dev]"
|
|
@touch $(STAMP)
|
|
|
|
install: $(STAMP)
|
|
|
|
smoke: $(STAMP) ## fast end-to-end (seconds): tiny N, few rounds/seeds
|
|
$(PY) -m blend.sweep --config configs/smoke.yaml
|
|
|
|
sweep: $(STAMP)
|
|
$(PY) -m blend.sweep --config configs/default.yaml
|
|
|
|
sweep-fullscale: $(STAMP)
|
|
$(PY) -m blend.sweep --config configs/fullscale.yaml
|
|
|
|
redundancy: $(STAMP) ## messaging redundancy R=1..4 (delivery vs deanonymization, time-to-link)
|
|
$(PY) -m blend.sweep --config configs/redundancy.yaml
|
|
|
|
percolation: $(STAMP) ## churn threshold: coverage collapse at u_c = 1 - 1/(degree-1)
|
|
$(PY) -m blend.sweep --config configs/percolation.yaml
|
|
|
|
correlated-churn: $(STAMP) ## correlated AS/region outages vs uniform churn, matched fractions
|
|
$(PY) -m blend.sweep --config configs/correlated-churn.yaml
|
|
|
|
figures: $(STAMP) ## make figures RUN=runs/<dir>
|
|
$(PY) -m blend.plotting.make_figures --run $(RUN)
|
|
|
|
verify: $(STAMP)
|
|
$(PY) -m blend.verify
|
|
|
|
test: $(STAMP)
|
|
$(PY) -m pytest
|
|
|
|
lint: $(STAMP)
|
|
$(VENV)/bin/ruff check src scripts tests
|
|
|
|
clean:
|
|
rm -rf runs/* figures/* .pytest_cache .ruff_cache .mypy_cache
|