mirror of
https://github.com/logos-blockchain/research.git
synced 2026-08-07 19:53:10 +00:00
Static-graph simulator quantifying how a node's peering degree trades off propagation speed, adversary exposure, deanonymization, and reliability in the Blend network. Scales to 1e6 nodes (sparse CSR + sampled Dijkstra); the adversary and deanonymization metrics are exact at every N. Model (ms): seeded d-regular peer graph (matching-union), Blend cascade (sender -> blend_hops timed-release mix relays -> final flood), geographic link base + exponential transport jitter, per-node processing lag, free-running release-clock mixing. Metrics: - propagation: full-delay mean/p50/p90/p99, path/broadcast split, coverage times - reliability: message success-delivery-rate ~ (1-unresponsive_frac)^blend_hops and flood coverage, with unresponsive nodes modelled as routing holes - adversary (exact): observed/eclipsed fractions, random + worst-case placement - deanonymization (exact): P(whole blend path adversarial) ~ f_adv^blend_hops, and full deanonymization (path adversarial AND honest sender peered with an adversary) = deanon_rate * observed_frac Deterministic blake2b seed streams, three parquet tables, joblib parallelism, memguard, an analytic verify harness, 50 unit tests, and an auto-installing Makefile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
44 lines
879 B
TOML
44 lines
879 B
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "pd"
|
|
version = "0.1.0"
|
|
description = "Peering-degree Monte-Carlo graph simulator for the Blend network"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"numpy",
|
|
"pandas",
|
|
"pyarrow",
|
|
"matplotlib",
|
|
"scipy",
|
|
"pyyaml",
|
|
"tqdm",
|
|
"joblib",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest", "pytest-xdist", "ruff", "mypy"]
|
|
|
|
[project.scripts]
|
|
pd-sweep = "pd.sweep:main"
|
|
pd-verify = "pd.verify:main"
|
|
pd-figures = "pd.plotting.make_figures:main"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/pd"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py311"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "UP", "B", "NPY"]
|
|
ignore = ["E741"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = "-q"
|
|
markers = ["slow: marks slow tests (deselect with -m 'not slow')"]
|