Feedback
Sign in./start

Site navigation

Theme

Learn

  • Roadmaps

Build

  • Projects
  • Developer Tools

Contribute

  • Open Source Projects
  • Issues
  • Reviews
  • First Contribution
  • BountiesSoon
  • Feedback

Prove

  • Builders

Ecosystem

  • Partners
  • Get Funded↗
  • HackathonsSoon
Sign in./start-building

Become an Open Source Builder. Learn. Build. Contribute. Prove.

Feedback welcome — open a GitHub issue.

Learn

RoadmapsStart Building

Build

ProjectsDeveloper Tools

Contribute

Open Source ProjectsIssuesReviewsFirst ContributionSupportFeedback

Prove

Builders Directory

Account

Sign in

Legal

PrivacyTermsCredits

© 2026 Pull // code MIT · curriculum CC BY-SA 4.0

PrivacyTermsCredits

lesson // lightning

Channel Lifecycle

Cooperative close, force close, and penalty transaction scenarios.

advanced5 days

Public lesson — sign in to track progress on this roadmap.

./sign-in

On this page

Learning objectives

  • Contrast cooperative close vs force close
  • Explain when penalties apply
  • Practice backup and recovery discipline

study // plan

Lessons are primers. Start with Step 1 (required reading) when present, then follow the numbered steps in the article. Depth comes from primary sources, labs, reflection, and evidence.

Research on Bitcoin Search

Step 1 // Required reading

Complete these before the numbered steps in the lesson body. Links are listed here once — not repeated below.

  • bookMastering the Lightning Network

    Ch. 7: Payment Channels

Reflection prompts

  1. Explain Channel Lifecycle to a teammate without jargon - what problem does it solve?
  2. What would break in production if you misunderstood Channel Lifecycle?
  3. Which BOLT (or implementation doc) is the source of truth for this topic, and what did you verify there?

Lab // Close path + backup note

Complete Steps 2–3. Prefer a cooperative close on Polar/regtest. Document what backup you would export after open, and when you would choose force close vs cooperative.

evidence required

  • ·Cooperative close proof (or documented attempt + result)
  • ·Backup checklist item (SCB / recovery data note)
  • ·One sentence choosing force vs cooperative for a stuck-peer scenario
  • ·Link to Ch. 7 or BOLT2 closing section you used
  1. 01

    Worked mental model

    Re-read the diagrams in this lesson once out loud in plain language. If you cannot explain the flow to a friend without jargon, pause and revisit the Mastering Bitcoin / Mastering Lightning chapters linked in Resources. Chapter references are intentional, not decorative.

  2. 02

    Hands-on habit

    Every protocol idea should be paired with one local experiment. That habit turns reading into builder instinct.

    1. Reproduce the happy path on regtest (or Polar for Lightning)
    2. Break it on purpose (wrong fee, expired invoice, offline peer)
    3. Write down what error you saw and which layer produced it (wallet, node, mempool, peer)
  3. 03

    Glossary check

    Pick three terms from this lesson and define them in one sentence each without opening notes. Weak definitions mean the lesson is not finished yet.

  4. 04

    Resource order

    Use Resources in order: narrative book chapter first, then BIP/BOLT for precision, then implementation docs for commands. Jumping straight to RPC flags without the mental model creates brittle knowledge.

Channels begin with funding and end with a close. How you close determines fees, delay, and risk.

Complete Step 1 // Required reading in the study plan above, then continue here.

Step 2 — Core idea: cooperative, force, penalty

Force closes are expensive and slow. Lost channel state without backups can lose funds. Lifecycle literacy is operational safety.

Close typeWhat happens
CooperativeBoth agree — efficient on-chain settlement
ForceBroadcast latest commitment — timelocks may delay funds
PenaltyResponse to revoked (old) state broadcast

Loading diagram…

Prefer cooperative closes; prepare for force closes and breaches.

Backup before you need it

Export static channel backups / recovery data after opens. Test restore on regtest.

Done when: You can pick cooperative vs force for a stuck-peer scenario in one sentence.

Step 3 — Close + backup (lab)

Cooperatively close a lab channel if you can. Note backup artifacts your stack expects (e.g. LND SCB). Write the stuck-peer decision sentence.

Common mistakes

  • Force closing to “speed up” when fees are high
  • Running nodes without disk redundancy
  • Ignoring unresolved HTLCs during close

Done when: Lab evidence (close proof + backup note + decision sentence + source) is complete.

Next lesson

Dual Funding & Splicing — change capacity without a full teardown.

further reading

  • boltBOLT2 closing
  • docsStatic Channel Backups (LND)

progress // sign in

Reading is public. Sign in to mark lessons complete, sync across devices, and unlock your roadmap.

./sign-in-to-track

discussion

Discussion

prevHTLC MechanicsnextDual Funding & Splicing

On this page

Press Shift + ? for keyboard shortcuts.

Press R to research on Bitcoin Search.

No questions yet — be the first to ask.