Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/labs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Labs

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
labs:
runs-on: ubuntu-22.04 # still has Python 3.8 builds
strategy:
matrix:
python: ["3.8", "3.12"] # labs promise Python 3.8+
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Silent Payments reference solutions pass all BIP352 vectors
working-directory: privacy-track/labs/silent-payments
run: |
python3 run_vectors.py send --solution
python3 run_vectors.py receive --solution

- name: Unimplemented exercises are skipped, not crashed
working-directory: privacy-track/labs/silent-payments
run: |
for side in send receive; do
out=$(python3 run_vectors.py $side || true)
echo "$out" | tail -3
if echo "$out" | grep -q "crashed"; then echo "::error::$side stub crashed"; exit 1; fi
done
python3 scan_benchmark.py 20

- name: Other labs run end to end
run: |
for lab in chain-analysis/chain_analysis_lab.py coin-selection/coin_selection_simulator.py compact-block-filters/compact_block_filters.py; do
(cd privacy-track/labs/$(dirname $lab) && python3 $(basename $lab) > /dev/null)
done

links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: python3 tools/check_links.py
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__pycache__/
*.pyc
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ All materials are released under **CC0 1.0 Universal (Public Domain)** - use the
### Recommended Learning Path

```
Bitcoin Dojo (7 weeks) ──> rawBit (10 weeks) ──> Decoding Bitcoin (8 weeks)
│ │
└── Sovereign Bitcoiner (5-10 weeks) └── Open-source contribution
Bitcoin Dojo (7 weeks) ──> rawBit (10 weeks) ──> Decoding Bitcoin (8 weeks) ──> Open-source contribution
│ ▲
└── Sovereign Bitcoiner (5-10 weeks) Privacy Track (drop-in, biweekly) ─┘
```

| Program | Duration | Level | Directory |
Expand All @@ -30,6 +30,7 @@ Bitcoin Dojo (7 weeks) ──> rawBit (10 weeks) ──> Decoding Bitcoin (8 wee
| **rawBit Study Cohort** | 10 weeks | Intermediate | [`/rawbit/`](./rawbit/) |
| **Decoding Bitcoin** | 8 weeks | Intermediate-Advanced | [`/decoding-bitcoin/`](./decoding-bitcoin/) |
| **Sovereign Bitcoiner Crash Course** | 5-10 weeks | Beginner-Intermediate | [`/sovereign-bitcoiner/`](./sovereign-bitcoiner/) |
| **Privacy Track** | 12 biweekly sessions, drop-in | Intermediate | [`/privacy-track/`](./privacy-track/) |
| **Vibe Coding on Nostr** | Monthly workshops | All levels | [`/nostr-workshops/`](./nostr-workshops/) |
| **Workshop Modules** | Single session | Varies | [`/workshops/`](./workshops/) |

Expand Down Expand Up @@ -96,6 +97,9 @@ curriculum/
│ ├── week-06-psbt/
│ ├── week-07-bitcoin-core/
│ └── week-08-contributing/
├── privacy-track/ # The Privacy Sessions: 12 drop-in sessions + labs
│ ├── README.md, SESSIONS.md # Overview and session plans (starts with Silent Payments)
│ └── labs/ # Offline Python labs (BIP352 vectors, chain analysis, ...)
├── sovereign-bitcoiner/ # 5-10 week crash course
│ ├── README.md
│ ├── week-01-philosophy/
Expand Down
38 changes: 23 additions & 15 deletions privacy-track/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ If you find a technical error (wrong BIP reference, incorrect code, broken link)

The exercises are designed to be challenging but achievable. If you completed one and found it too easy, too hard, or unclear, submit a PR with improvements. Include a note explaining what you changed and why.

### Add a new exercise
### Add a new lab

New exercises are welcome, especially for:
- Module 1 (chain analysis): real-world transaction analysis using mainnet data
- Module 3 (Payjoin): exercises using the Payjoin Dev Kit in Rust
- Module 4 (wallet privacy): CoinJoin simulation, timing analysis exercises
- Any module: exercises in Rust (current exercises are Python-heavy)
New labs are welcome, especially:
- A wallet-fingerprinting lab built on **real** transaction hex from the S4 fingerprint table (not invented wallet behavior)
- A payjoin lab that runs against `payjoin-cli` on regtest
- Rust versions of the Python labs
- Season Two topics (see [SESSIONS.md](./SESSIONS.md))

### Translate the curriculum

If you want to translate this curriculum into another language, create a new directory (e.g., `translations/id/` for Indonesian, `translations/th/` for Thai) and translate the READMEs. Exercise code comments should also be translated; the code itself stays in English.

### Add reference implementations

If you've completed the exercises and want to share your solutions as reference implementations, add them to `exercises/solutions/` in the relevant module. Name them clearly (e.g., `chain_analysis_lab_solution.py`).
Solutions live next to their lab in `labs/<lab>/solutions/`. If the lab has a grader (like `labs/silent-payments/run_vectors.py`), your solution must pass it.

---

Expand All @@ -47,20 +47,28 @@ If you've completed the exercises and want to share your solutions as reference
- Python exercises: Python 3.8+, minimal dependencies, clear docstrings, type hints
- Rust exercises: stable Rust, idiomatic style, well-commented
- All exercises must include: clear instructions, type signatures, test cases, and reflection questions
- Never include complete solutions in the exercise files - only hints, pseudocode, and test cases
- Never include complete solutions in the exercise files: only hints, pseudocode and tests. Solutions go in `solutions/`

### File structure

```
module-XX-topic/
├── README.md # Session-by-session breakdown
├── exercises/
│ ├── exercise_name.py # Coding exercise
│ ├── exercise_name.md # Non-coding exercise (analysis, discussion)
│ └── solutions/ # Reference implementations (optional)
└── resources/ # Additional reading, diagrams, data files
privacy-track/
├── README.md, SESSIONS.md # overview and the 12 session plans
├── FACILITATOR_GUIDE.md # how to run any session
├── ISSUE_POOL.md, PR_CHECKLIST.md
├── labs/<topic>/
│ ├── README.md # what you build, how to run it
│ ├── *.py # exercise files with YOUR CODE HERE markers
│ └── solutions/ # reference implementations (optional)
└── resources/ # glossary, reading list
```

### Accuracy rules

- Every factual claim about a wallet, BIP or PR should be checkable. Link the source
- Prefer official test vectors over hand-made test data. When a lab simplifies the spec, say so in its README
- Exercise files must run without errors when nothing is implemented yet (skip unimplemented parts gracefully)

---

## Review Process
Expand Down
Loading
Loading