A hands-on training program for building Bitcoin applications using Rust and contributing to the Bitcoin open-source ecosystem.
.
├── .github/ # GitHub workflows and CI/CD configurations
├── rfb_labs_week_1/ # Week 1 labs and exercises
│ ├── grader/ # Grading scripts and evidence checking
│ ├── src/ # Source code for labs
│ │ ├── labs/ # Individual lab implementations (lab01-lab10)
│ │ ├── error.rs # Error handling
│ │ ├── lib.rs # Library entry point
│ │ ├── model.rs # Data models
│ │ └── rpc.rs # RPC client implementation
│ ├── submissions/ # Lab submission templates
│ ├── tests/ # Lab tests and support utilities
│ ├── Cargo.toml # Rust project configuration
│ ├── Cargo.lock # Dependency lock file
│ ├── LABS.md # Lab documentation
│ └── README.md # Week 1 specific README
├── rfb_labs_week_2/ # Week 2 Bitcoin transaction modelling assignment
│ ├── src/ # Student implementation files
│ │ ├── lib.rs # Library entry point and public exports
│ │ ├── transaction.rs # Transaction types, methods, traits, and borrowing
│ │ ├── error.rs # Custom transaction errors
│ │ ├── utxo.rs # UTXO model and coin selection
│ │ └── main.rs # Payment transaction example
│ ├── tests/ # Starter integration tests
│ │ ├── transaction.rs # Transaction and validation tests
│ │ └── utxo.rs # UTXO selection tests
│ ├── Cargo.toml # Rust package configuration
│ ├── Cargo.lock # Locked dependency versions
│ ├── ASSIGNMENT.md # Ordered requirements and progress checklist
│ └── README.md # Week 2 workflow and written-answer template
├── rfb_labs_week_2_session_4/ # Session 4 lending-library assignment (pure Rust)
│ ├── src/ # Student implementation files
│ │ ├── lib.rs # Library entry point and public exports
│ │ ├── catalogue.rs # Media kinds, loan status, items, and the LoanTerms trait
│ │ ├── member.rs # Library members
│ │ ├── library.rs # Owning collection, lookups, checkout, and return
│ │ ├── error.rs # Custom library errors
│ │ └── main.rs # Lending example
│ ├── tests/ # Starter integration tests
│ │ └── library.rs # Checkout, borrow limit, late fee, and search tests
│ ├── Cargo.toml # Rust package configuration
│ ├── ASSIGNMENT.md # Ordered requirements and progress checklist
│ └── README.md # Session 4 workflow and written-answer template
├── rfb_labs_week_3/ # Week 3: Understanding Bitcoin Data
│ ├── trxparse/ # Program for parsing raw Bitcoin transactions
│ │ ├── src/
│ │ │ └── main.rs # Parses a raw Bitcoin transaction into a JSON object
│ │ └── Cargo.toml
│ │
│ ├── decodetrx/ # Program for decoding raw Bitcoin transactions
│ │ ├── src/
│ │ │ ├── lib.rs # Main decode_transaction function and decoding logic
│ │ │ ├── transaction.rs # Bitcoin transaction data structures
│ │ │ └── main.rs # Clap CLI for collecting input and calling decode_transaction
│ │ └── Cargo.toml
│ │
│ ├── tests/ # Tests for transaction parsing and decoding
│ │ ├── trxparse.rs # Raw transaction parsing tests
│ │ └── decodetrx.rs # Legacy and SegWit decoding tests
│ │
│ ├── Cargo.toml # Workspace/package configuration
│ ├── Cargo.lock # Locked dependency versions
│ ├── ASSIGNMENT.md # Ordered requirements and progress checklist
│ └── README.md # Week 3 workflow and written-answer template
├── .gitignore # Git ignore patterns
├── README.md # This file
└── x.sh # Setup/utility script
.github/- GitHub Actions workflows for automated grading and CI/CDrfb_labs_week_1/- Week 1 lab exercises covering Bitcoin fundamentals and Rust basicsgrader/- Automated grading scripts for evaluating lab submissionssrc/- Source code including lab implementations and supporting modulessubmissions/- Templates for participants to submit their lab evidencetests/- Unit tests for each lab to verify implementation correctness
rfb_labs_week_2/- Week 2 assignment for modelling a Bitcoin transaction in Rustsrc/- Starter implementation, organized by transaction, error, and UTXO concernstests/- Staged integration tests that students enable as they progressASSIGNMENT.md- Requirements in implementation orderREADME.md- Student workflow, commands, and written questions
rfb_labs_week_2_session_4/- Session 4 assignment on enums, structs, traits, ownership, borrowing, and error handling, deliberately not Bitcoin-themed so the Rust concepts stand alonesrc/- Starter implementation, organized by catalogue, member, library, and error concernstests/- Staged integration tests that students enable as they progressASSIGNMENT.md- Requirements in implementation orderREADME.md- Student workflow, commands, and written questions
- 🦀 The Rust Book - Comprehensive Rust programming guide
- 📄 Bitcoin Whitepaper - Original Bitcoin protocol specification
- 🔄 Bitcoin Improvement Proposals (BIPs) - Protocol standards and proposals
- 🔧 Rust Bitcoin Documentation - Library documentation and examples
- ⛏️ Bitcoin Core Documentation - Core implementation reference
The major goal of this program is to contribute meaningfully to Bitcoin open-source projects. Participants will:
- 🔄 Learn Git workflow and best practices
- 📤 Create and submit Pull Requests
- 👁️ Participate in code reviews
- 📖 Read and understand BIPs
- 💬 Join Bitcoin Core Review Club discussions
- 🤝 Collaborate with global Bitcoin developers
- 💰 Explore grant opportunities for active contributors
- Follow project contribution guidelines
- Write clear commit messages
- Engage constructively in code reviews
- Respect maintainers' time and decisions
All participants will complete a capstone project demonstrating their skills and knowledge gained throughout the program.
- Bitcoin Wallet - Full-featured wallet implementation
- Lightning Tool - Lightning Network utility or application
- Bitcoin CLI - Command-line interface for Bitcoin operations
- Bitcoin Indexer - Blockchain data indexing and analysis
- Transaction Explorer - Transaction visualization and analysis
- Block Explorer - Blockchain block exploration interface
- Wallet Library - Reusable wallet functionality library
- 📦 GitHub Repository with complete source code
- 📖 Comprehensive README with documentation
- 🏗️ Architecture Diagram
- 🎥 Demo Video
- 🎤 Live Presentation during Demo Day
Before starting the program, ensure you have:
- 🦀 Rust installed (latest stable version)
- 📦 Cargo (comes with Rust)
- 🔄 Git version control
- 🌐 GitHub Account (configured with SSH keys)
- 🐳 Docker for containerized development
- ⚡ Polar for Bitcoin regtest networks
- 💻 VS Code (recommended IDE)
git clone https://github.com/thebuidl-grid/rust-for-bitcoin-2.0.git
cd rust-for-bitcoin-2.0cargo buildcargo testSee rfb_labs_week_1/README.md for detailed environment setup instructions.
For the transaction modelling assignment, see
rfb_labs_week_2/README.md.
We welcome contributions! Follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Write clear, descriptive commit messages
- Include tests for new features
- Update documentation as needed
- Follow Rust coding conventions
- Ensure all tests pass before submitting
This project is licensed under the MIT License - see the LICENSE file for details.