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 // bitcoin

Taproot & Tapscript

Key-path and script-path spends, MAST, and Schnorr signatures.

intermediate6 days

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

./sign-in

On this page

Learning objectives

  • Contrast key-path and script-path Taproot spends
  • Explain why unused scripts stay private
  • Connect Schnorr signatures to Taproot outputs

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
BIP341BIP340Taproot

Step 1 // Required reading

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

  • bookMastering Bitcoin

    Ch. 7: Authorization and Authentication

Interactive lab // Decoding Bitcoin

Open these Bitcoin Dev Project modules and tools before (or alongside) the graded lab. Capture evidence from the interactive path — do not only skim Pull.

  • Decoding Bitcoin: Introduction to Taproot

    Interactive Taproot on-ramp before BIP-341 deep reading.

  • Decoding Bitcoin: Schnorr signatures

    Pair with tagged hashes - why Taproot prefers Schnorr.

  • Decoding Bitcoin: Tagged hashes
  • Decoding Bitcoin: Taproot roadmap

Reflection prompts

  1. Explain Taproot & Tapscript to a teammate without jargon - what problem does it solve?
  2. What would break in production if you misunderstood Taproot & Tapscript?
  3. After the Decoding Bitcoin Taproot intro, what is one privacy win of key-path spends vs revealing a script path?

Lab // Taproot interactive + regtest

Complete Steps 2–3. Finish Decoding Bitcoin's Introduction to Taproot (and Schnorr or tagged hashes if needed). Then on regtest create or inspect a Taproot address / key-path spend and note what appears on-chain vs what stays hidden.

evidence required

  • ·Screenshot or notes from Decoding Bitcoin Introduction to Taproot
  • ·Regtest address or tx showing a bc1p / witness v1 output (or descriptor)
  • ·One sentence contrasting key-path vs script-path privacy
  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.

Taproot (SegWit v1) lets coins be spent with a single Schnorr signature in the common case, while still allowing complex scripts as hidden alternatives. Addresses look like bc1p... (Bech32m).

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

Step 2 — Core idea: key-path vs script-path

Taproot improves privacy and efficiency for multisig-like policies and future Lightning constructions. Modern wallet descriptors increasingly default to Taproot.

Analogy: A house with a normal front door (key path) and several secret side doors (script leaves). Neighbors usually only see the front door — they never learn which side doors exist unless you open one.

Two ways to spend:

  1. Key-path: sign with the tweaked output key — cheapest and most private
  2. Script-path: reveal a script leaf + merkle proof + satisfy that script

Loading diagram…

Key-path spends look like simple single-sig; script-path reveals only the used leaf.

Loading diagram…

The output key commits to an optional script tree without revealing it upfront.

Script-path leaves use Tapscript — Script with Taproot-specific rules and Schnorr CHECKSIG behavior. Multisig and timelock policies can live in leaves while cooperative spends stay on the key path (especially with MuSig-style aggregation).

Taproot output keys commit to an internal key tweaked by a merkle root of scripts (or a nothing-up-my-sleeve tweak when no scripts). Unused leaves remain hidden — a privacy win versus revealing a full redeem script every time (as with many P2SH spends).

Privacy wins when you cooperate

If parties always cooperate, they can prefer key-path spends so onlookers cannot tell a complex policy was involved.

If you support Taproot script trees, backups must include enough data to reconstruct spends for every leaf you might need — not only the key path.

Done when: You can contrast key-path vs script-path privacy in one sentence.

Step 3 — Try it: interactive + regtest (lab)

Complete Decoding Bitcoin’s Introduction to Taproot. Then:

ADDR=$(bitcoin-cli -regtest getnewaddress "" "bech32m")
bitcoin-cli -regtest getaddressinfo "$ADDR"

Note witness version / descriptor. Optionally fund and spend so you see a key-path-style spend on-chain. One sentence: what stays hidden until script-path is used?

Common mistakes

  • Treating Taproot as “just a new address” without descriptors/backup of the script tree
  • Losing the internal key / merkle info needed for script-path recovery
  • Mixing Bech32 (v0) and Bech32m (v1) validation

Done when: Lab evidence (Decoding notes + bc1p/descriptor + privacy contrast) is complete.

Next lesson

Multisig & Timelocks — policies often hidden inside Taproot trees and Lightning scripts.

further reading

  • bookMastering Bitcoin

    Ch. 8: Signatures

  • bipBIP-341 Taproot
  • bipBIP-340 Schnorr

review // club

Review club

Practice on real Bitcoin OSS changes tied to this chapter. Read the diff, use the checklist, and optionally paste your review comment URL in your lab notes.

  • BIP-341 Taproot specification

    Walk through BIP-341 and note what observers learn from key-path vs script-path spends.

    spec review
    key pathscript pathprivacy
    50 min·advancedopen on GitHub
review checklist
  1. Does the change solve the stated problem?
  2. Are edge cases and rollout behavior covered?
  3. Are tests or test vectors included?
  4. Is the diff minimal and clearly explained?

More repos and GFIs on /discover and /issues.

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

prevSegWit & Bech32nextMultisig & Timelocks

On this page

Press Shift + ? for keyboard shortcuts.

Press R to research on Bitcoin Search.

No questions yet — be the first to ask.