Repository navigation
Bitcoin Dojo: weeks 3–7 exercises, graded against real Bitcoin data - #3
Merged
Merged
Conversation
- Weeks 3-6 get exercise files, reference solutions and a check.py each: keys/addresses (BIP173 + Programming Bitcoin answers), tx parsing (reproduce real mainnet txids incl. block 170), Script + ECDSA (verify a real 2013 signature), SegWit (real txid, weight, BIP143 signature) - Week 7 capstone: verify your own signet transaction with your code - Fix week 2 importing a module that didn't exist; add FieldElement __rmul__ (point doubling over F_p was impossible without it); fix the mislabeled curve; week 1/2 checks report 'not implemented' instead of crashing; week 1/2 reference solutions - lib/dojo.py shared helpers; data/transactions.json real tx data - CI: all solutions pass on Python 3.8 and 3.12; stubs never crash Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Weeks 3–7 of the Dojo were empty folders. Weeks 1–2 were there but broken: week 2 imported a
week_01_solutionmodule that doesn't exist, and week 1 crashed on its first unimplemented method.New: weeks 3–7 (Programming Bitcoin ch. 4–13)
Each week has
exercises/(stubs with hints and discussion questions),solutions/, and acheck.pygrader that reports ✓ / ✗ / not implemented yet, like the Privacy Track's SP lab.bc1qw508d6…), the book's ch. 4 answers, WIF of key 1Expected values come from outside the repo (BIPs, the book, the blockchain), and the reference solutions pass all of them. Real tx data is in
data/transactions.jsonwith its source.Fixes to weeks 1–2
FieldElementif it works, and falls back to the reference otherwiseFieldElement.__rmul__as a provided method. Without it,3 * x**2in point doubling over F_p raised a TypeError, so week 2 could never pass even with perfect answersCI
.github/workflows/dojo.ymlruns every reference solution on Python 3.8 and 3.12 and makes sure unfinished stubs never crash. It only triggers onbitcoin-dojo/**.Note: the week 7 capstone and README point at the Privacy Track's Silent Payments lab, which lands with #2.
🤖 Generated with Claude Code