[{"data":1,"prerenderedAt":100},["ShallowReactive",2],{"project-\u002Fprojects\u002Flightning-node":3},{"id":4,"title":5,"body":6,"demo":80,"description":72,"extension":81,"featured":82,"meta":83,"navigation":82,"order":84,"path":85,"pitch":86,"repo":87,"seo":88,"showcase":80,"stack":89,"stem":95,"tags":96,"__hash__":99},"projects\u002Fprojects\u002Flightning-node.md","Lightning node in Rust",{"type":7,"value":8,"toc":71},"minimark",[9,14,18,21,25,28,31,35,38,41,45,52,58,64,68],[10,11,13],"h2",{"id":12},"the-problem","The problem",[15,16,17],"p",{},"Payment infrastructure is easy to talk about and hard to feel. You can read about\nrouting, channel liquidity and settlement for a long time without ever\nunderstanding why the people who run this software worry about the things they\nworry about.",[15,19,20],{},"The only way to learn what a payment network actually demands of its operators is\nto run one and keep it running.",[10,22,24],{"id":23},"what-i-built","What I built",[15,26,27],{},"A Bitcoin Lightning node, built from scratch in Rust and operated on testnet as a\nreal service rather than a script — a systemd unit that starts on boot, survives\nrestarts, and stays up.",[15,29,30],{},"On top of the node I built a custom LNURL server and client, implementing the\nprotocol layer that turns a raw node into something a person can actually pay: a\nstatic identifier that resolves into an invoice on demand.",[10,32,34],{"id":33},"how-it-works","How it works",[15,36,37],{},"The node maintains channels with peers and keeps the local state needed to route\nand settle payments. LNURL sits above it as the usability layer — the client\nfetches a well-known endpoint, the server responds with the parameters for an\ninvoice, and the client requests one for the amount it wants. It turns \"send me a\nfresh invoice each time\" into something that works like an address.",[15,39,40],{},"Running it as a systemd service, rather than a foreground process, is what makes\nthe difference between a demo and infrastructure: restart policy, logging, and\nlifecycle all become somebody's explicit decision.",[10,42,44],{"id":43},"decisions-and-trade-offs","Decisions and trade-offs",[15,46,47,51],{},[48,49,50],"strong",{},"Rust, deliberately."," Payment software has no good failure modes. A language\nthat forces the error paths to be handled at compile time removes a whole class\nof bug from a system where that class of bug loses money.",[15,53,54,57],{},[48,55,56],{},"From scratch over an existing implementation."," Slower, and the result is worse\nthan any production node. That was the trade: the goal was to understand the\nprotocol's demands rather than to operate the best possible node, and running\nsomeone else's binary teaches you very little about why it is built the way it is.",[15,59,60,63],{},[48,61,62],{},"Testnet."," Free to be wrong, which is exactly what you want while learning what\nbreaks.",[10,65,67],{"id":66},"what-id-do-differently","What I'd do differently",[15,69,70],{},"I would instrument it from the first commit. I spent real time reasoning about\nchannel and routing behaviour from logs when a handful of metrics would have\nanswered the question immediately. For anything long-running, observability is\nnot a later concern — it is the thing that makes the system legible to you at all.",{"title":72,"searchDepth":73,"depth":73,"links":74},"",2,[75,76,77,78,79],{"id":12,"depth":73,"text":13},{"id":23,"depth":73,"text":24},{"id":33,"depth":73,"text":34},{"id":43,"depth":73,"text":44},{"id":66,"depth":73,"text":67},null,"md",true,{},3,"\u002Fprojects\u002Flightning-node","A Bitcoin Lightning node built and operated from scratch, with a custom LNURL server and client.","https:\u002F\u002Fgithub.com\u002Flinadevinci\u002Flnurl-project",{"title":5,"description":72},[90,91,92,93,94],"Rust","Bitcoin","Lightning Network","LNURL","systemd","projects\u002Flightning-node",[90,91,97,98],"Payments","Distributed Systems","lMkxeHkY40bCkcey6hSLmYsoec2mt5S8kiclzn0yeGA",1793108521241]