Decoding Bitcoin study cohort starts Monday 16 November · free, on Discord Sign up →

/Session-notes/2026-10-08_

Your First Code Review.

Our first Code Review Club: a Nostr identity in one command, then a real Bitcoin pull request reviewed live, step by step.

Code Review ClubHosted by Alex and Razor5 min read▶ Recording

Code Review Club: Your First Code Review

Full recording, 1h 26m. Plays from youtube-nocookie.com. Watch on YouTube

Jump to a chapter (21 chapters)
  1. Welcome: the Code Orange pipeline
  2. Part 1: a Nostr identity with nihao
  3. Why Nostr? No sign-up, no permission
  4. Blossom and owning your own data
  5. Mastodon vs Nostr vs X
  6. npub, nsec and relays
  7. NIPs and event kinds
  8. Ecash mints: get paid to your npub
  9. Logging in safely, and nak
  10. Should we run a Nostr workshop?
  11. Part 2: Bitcoin’s P2P network
  12. Peer Observer and LinkingLion
  13. Reviewing a PR: get context first
  14. Checking out the PR branch
  15. Asking Claude how to build it
  16. Running the tests as root, and NATS
  17. LLMs in open source: the debate
  18. Break the test on purpose
  19. Finding the entry point
  20. Start by reviewing, not coding
  21. Issue first, or PR first?

TL;DR

  • Nostr is to X what Bitcoin is to a bank: you hold the key, nobody can ban your identity.
  • One command (nihao) gives you a Nostr identity, relays, a Lightning address and an ecash wallet.
  • Reviewing a PR starts with context, then build it, run the tests and try to break them.
  • Start contributing by reviewing, not coding. “I ran the tests and they pass” is a real review.

Highlights

1Nostr with Alex

A Nostr identity in one command. Alex installed Gigi’s nihao and created a “Code Orange” account live. One command made the key pair, a profile, a relay list, a Lightning address and an ecash wallet. No company, no sign-up, no permission.

~ nihao
$ go install github.com/dergigi/nihao@latest
$ nihao --name "Code Orange"
✓ key pair         npub1… (share this)  nsec1… (never share this)
✓ profile          kind 0 → 4 relays
✓ follow list      kind 3
✓ DM relays        published
✓ lightning address lud16 set
✓ ecash wallet     mint validated
# done. no company, no sign-up, no permission

Simplified from the live demo.

Your npub is your account number and your nsec is your password, just like a Bitcoin key. You sign once and publish to several relays, so no single relay can silence you, and any Nostr app can read your posts.

How Nostr works

One key, many relays, any app

Swipe to see the whole diagram →

Why it matters: a relay can drop your posts, but nobody can delete your identity. Switch apps and your followers come with you.

Everything on Nostr is an event, and every event has the same shape. The kind number says what it is. The NIPs, like BIPs for Bitcoin, say what each kind means.

Anatomy of a Nostr event

idFingerprint of the event pubkeyWho sent it (your npub) created_atWhen kindWhat it is: 0 profile · 1 note · 3 follow list · 7 reaction · 14 direct message tagsMentions, replies, subjects contentThe text itself sigSignature made with your nsec, so nobody can fake your posts

2Peer Observer with Razor

Reviewing a real Bitcoin PR, live. Bitcoin nodes talk to each other over the peer-to-peer network. Peer Observer runs honeypot nodes that watch that network for anomalies and attacks, like a security team for Bitcoin. It has already helped spot LinkingLion: nodes that connect to you and only listen.

What Peer Observer sees

An eagle eye on the P2P network

Swipe to see the whole diagram →

Likely: a chain analysis company linking transactions to IP addresses. Watching how peers behave is how you catch them.

Razor then reviewed a pull request that adds integration tests to Peer Observer’s eBPF extractor, hitting the same walls any beginner hits along the way.

~/peer-observer
# 1. get the PR branch
$ git remote add b10c https://github.com/0xB10C/peer-observer
$ git fetch b10c && git checkout <pr-branch>
# 2. build it (as your normal user)
$ cargo test -p ebpf-extractor --no-run
# 3. run it (eBPF tests need root)
$ sudo -E <test-binary> --ignored
✗ 4 failed: NATS server binary not set
$ export NATS_SERVER_BINARY=$(which nats-server)
✓ test result: ok. 4 passed
# 4. break it on purpose: assert!(false)
✗ test result: FAILED. 1 failed  (line 301: now you know where to look)

Simplified from the live review. Stuck at any step? Razor pasted the PR link into Claude’s free plan and asked.

The method

How Razor reviews a pull request

Get contextReadme, PR, issue
→
Build itCheck out the branch
→
Run the testsMake them pass
→
Break themMake them fail
→
Find the entry pointThen it clicks

Key takeaways

1. Nostr is to X what Bitcoin is to a bank. On X a company owns your account. On Mastodon your account lives on someone’s server, and if they shut it down it is gone. On Nostr you hold the key.

The analogy from the call

You own it
Nostr is like Bitcoin

You hold the key pair. Your identity can’t be deleted or banned.

npub · nsec · many relays
Mastodon is like “crypto”

Half decentralized: whoever runs your server can delete your account.

Instances run by admins
X is like a central bank

One company owns the accounts, the data and the ban button.

One owner
They own it

2. Ecash makes money as easy as a message. With Lightning you have to ask for money with an invoice. With ecash someone can drop sats on your npub like a note on your desk. That opens up paying for content in sats instead of selling attention to advertisers.

3. Review before you code. You don’t need to be a maintainer to review. Running the tests and saying they pass on your machine is a valid review, and so is asking a question about something unclear. For a small fix, just open the PR. For a bigger change, open an issue first so nobody wastes their time.

“The more you learn about it, the more you realize how little you know.”

Razor, on Bitcoin

4. LLMs: useful, but you still own the review. The room was split. Some let agents write and review most of the code; Razor still drives by hand. His rule: a contributor should put in at least as much effort as the person reviewing their work.

Resources shared

Reading

Tools

  • nihao, Gigi: one command sets up a Nostr identity, relays, Lightning address and Cashu wallet, and health-checks an npub
  • nak, fiatjaf: command-line tool to sign, publish and query Nostr events
  • Peer Observer, 0xB10C: monitors the Bitcoin P2P network for anomalies and attacks with honeypot nodes; the PR we reviewed adds integration tests to its eBPF extractor
  • NATS: the message queue Peer Observer’s tests need (set NATS_SERVER_BINARY)
  • Claude: the free plan is enough to paste a PR link and ask how to build and test it
  • Cashu: ecash protocol behind the wallet nihao sets up
  • Minibits: Cashu ecash wallet and mint
  • Coinos: web wallet that runs a Cashu mint
  • Arkade: Bitcoin project an attendee contributes to, where LLMs do most first-pass reviews

Nostr apps

  • Jumble: Nostr web client used in the demo
  • Primal: Nostr client and relay
  • Damus: Nostr client for iPhone
  • Amethyst: Nostr client for Android
  • Mastodon: the “half-decentralized” comparison: your account lives on someone’s server

Code Orange

Ideas from the call: a monthly Nostr workshop (several people asked for it), and one topic per Code Review Club instead of two.

Browse every resource from every session →

These notes are also on GitHub: code-orange-dev/session-notes. Free to share and reuse (CC0).

Bitcoin Only

Ready to become a Bitcoin builder?

Join the next cohort, drop into a workshop, or come say hello in Discord. The community is free and open.