Hi, I'm Austin and I'm a
Spiral Grantee working on Programming Lightning.
What is Programming Lightning?
Programming Lightning is a
Replit-based workshop designed to teach students how the Lightning Network works. Inspired by
Programming Bitcoin, the workshop includes coding exercises throughout the course to reinforce concepts and provide hands-on experience.
We start the workshop by gently introducing the concept of a naive "payment channel" (i.e., sending "off-chain" payments via a series of text/email messages). We identify all of the security issues with this "payment channel" and begin solving them one-by-one. Along the way, we leverage the socratic method to build our intuition for each step, asking question such as “what problem is this step solving?”, “what security issues still remain”?, etc. This workshop makes heavy use of diagrams, which hopefully helps visual learners (like me!).
Since the entire workshop takes place in Replit, each participant will be able to seamlessly run a bitcoin node within their Replit environment, allowing them to simulate broadcasting their own Lightning network transactions without the hassle of setting up a bitcoin node.
What will you learn after attending this workshop?
Participants will gain an intuitive understanding of how Lightning channels work, including an introduction (and optional deep dive) to Lightning channel keys, Hashed Timelock Contracts (HTLCs), and the process of revoking old channel states. We'll cover important topics such as: why does Lightning have asymmetric commitment transactions?, why do HTLCs make Lightning payments atomic?, why do we need second-stage HTLC transactions?, etc.
Since the workshop is also a free, self-paced course, participants will be able to return to the workshop and refresh these concepts whenever they'd like.
Prerequisites
To get the most out of the workshop, you should have a conceptual understanding of Bitcoin Script, transactions, and elliptic curve cryptography. You don’t need to be an expert, but we'll build on these concepts quickly, so it's important that you have a foundation to work upon. A good benchmark to see if you're ready would be your understanding of: