Skip to content

Commit 292ae98

Browse files
committed
docs(publish): curate repository and add GitHub Pages report
1 parent 3d8d4b3 commit 292ae98

6 files changed

Lines changed: 961 additions & 0 deletions

File tree

.github/workflows/pages.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Publish Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.11"
29+
30+
- name: Install package
31+
run: pip install -e .
32+
33+
- name: Build curated docs
34+
run: |
35+
PYTHONPATH=src python -m coinjoin_simulator.publish_site \
36+
--mitigation mitigation_experiments.json \
37+
--longrun longrun_policy_results.json \
38+
--daily daily_cost_study_results.json \
39+
--output docs/index.html \
40+
--data-output docs/publish_summary.json
41+
42+
- name: Upload pages artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: docs
46+
47+
deploy:
48+
needs: build
49+
runs-on: ubuntu-latest
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*.so
5+
6+
# Virtual environments
7+
.venv/
8+
venv/
9+
10+
# Tool caches
11+
.mypy_cache/
12+
.pytest_cache/
13+
.ruff_cache/
14+
15+
# Local scratch space
16+
tmp/*
17+
!tmp/.gitkeep
18+
19+
# Generated reports not kept for publish
20+
daily_cost_report.html
21+
longrun_policy_report.html
22+
network_report.html
23+
report.html
24+
25+
# Extra experiment dumps not kept for publish
26+
extreme_attack_recovery_results.json
27+
followup_strategy_experiments.json
28+
merge_sustainability_results.json
29+
network_experiments_grid.json
30+
network_sweep_default.json
31+
32+
# OS/editor noise
33+
.DS_Store
34+
.idea/
35+
.vscode/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# CoinJoin Simulator
2+
3+
Compact simulation toolkit for analyzing CoinJoin privacy under probing and adversarial taker pressure.
4+
5+
This repository is curated for publishing: it keeps the key datasets, a focused GitHub Pages report, and the core simulation code.
6+
7+
## What This Repository Shows
8+
9+
The published report focuses on four high-signal views:
10+
11+
1. Mitigation impact at fixed CoinJoin size (8 makers/CJ)
12+
2. Long-run sustained attack outcomes (baseline vs recommended policy)
13+
3. Probe-intensity privacy/cost trade-off
14+
4. Attack-to-recovery timeline
15+
16+
Published output:
17+
18+
- `docs/index.html`
19+
- `docs/publish_summary.json`
20+
21+
## Quick Start
22+
23+
```bash
24+
pip install -e ".[dev]"
25+
```
26+
27+
Requires Python 3.11+.
28+
29+
Generate the curated publish page from the tracked datasets:
30+
31+
```bash
32+
PYTHONPATH=src python -m coinjoin_simulator.publish_site \
33+
--mitigation mitigation_experiments.json \
34+
--longrun longrun_policy_results.json \
35+
--daily daily_cost_study_results.json \
36+
--output docs/index.html \
37+
--data-output docs/publish_summary.json
38+
```
39+
40+
You can also run it through the CLI:
41+
42+
```bash
43+
PYTHONPATH=src python -m coinjoin_simulator publish-site
44+
```
45+
46+
## Reproduce Input Datasets
47+
48+
These scripts regenerate the three datasets consumed by the publish page:
49+
50+
- `run_mitigation_experiments.py` -> `mitigation_experiments.json`
51+
- `run_longrun_policy_study.py` -> `longrun_policy_results.json`
52+
- `run_daily_cost_study.py` -> `daily_cost_study_results.json`
53+
54+
Note: these studies sample from the live JoinMarket orderbook URL configured in `src/coinjoin_simulator/network.py`.
55+
56+
## Core CLI Commands
57+
58+
```bash
59+
# list built-in scenarios
60+
coinjoin-sim list
61+
62+
# run one scenario
63+
coinjoin-sim run --scenario naive_baseline
64+
65+
# run all scenarios
66+
coinjoin-sim benchmark
67+
68+
# run realistic network sweep
69+
coinjoin-sim network --makers 100 --rounds 1000 --evil-fractions 0.0,0.2,0.4,0.6
70+
```
71+
72+
## Repository Layout
73+
74+
```text
75+
src/coinjoin_simulator/
76+
network.py realistic maker/probing simulator
77+
publish.py curated metric extraction
78+
publish_site.py GitHub Pages report generation
79+
... core anonymity/sybil/role/surveillance modules
80+
81+
tests/ unit tests
82+
docs/ publish-ready report assets for GitHub Pages
83+
```
84+
85+
## Development Checks
86+
87+
```bash
88+
PYTHONPATH=src ruff check .
89+
PYTHONPATH=src mypy src/
90+
PYTHONPATH=src pytest
91+
```
92+
93+
## License
94+
95+
MIT

0 commit comments

Comments
 (0)