📰 IT Security NachrichtenNIST and CISA finalize playbook to stop token theft and forgery(16.09.2026 um 09:40 Uhr)
📰 IT Security NachrichtenQnap TS-432XeU review: A super-slim rack NAS at an equally small price(16.09.2026 um 09:00 Uhr)
🕵️ SicherheitslückenGoogle fixes actively exploited Android zero-day on Pixel devices(16.09.2026 um 09:00 Uhr)
📰 IT Security NachrichtenExternal Forecasting in SAP IBP: Externe Prognosen standardnah integrieren(16.09.2026 um 07:03 Uhr)
📰 IT Security NachrichtenSteht ein Social-Media-Verbot für Kinder bevor? Klärung erwartet(16.09.2026 um 08:14 Uhr)
📰 IT Security NachrichtenSalesforce und Nvidia bringen CRM-Modell Koa heraus(16.09.2026 um 08:42 Uhr)
📰 IT Security NachrichtenVertrauen steigert Erfolg von KI-Projekten(16.09.2026 um 09:17 Uhr)
🔧 AI Nachrichten Nvidia-Chef Huang lehnt KI-Regulierung ab(16.09.2026 um 09:38 Uhr)
📰 IT Security NachrichtenNIST and CISA finalize playbook to stop token theft and forgery(16.09.2026 um 09:40 Uhr)
📰 IT Security NachrichtenQnap TS-432XeU review: A super-slim rack NAS at an equally small price(16.09.2026 um 09:00 Uhr)
🕵️ SicherheitslückenGoogle fixes actively exploited Android zero-day on Pixel devices(16.09.2026 um 09:00 Uhr)
📰 IT Security NachrichtenExternal Forecasting in SAP IBP: Externe Prognosen standardnah integrieren(16.09.2026 um 07:03 Uhr)
📰 IT Security NachrichtenSteht ein Social-Media-Verbot für Kinder bevor? Klärung erwartet(16.09.2026 um 08:14 Uhr)
📰 IT Security NachrichtenSalesforce und Nvidia bringen CRM-Modell Koa heraus(16.09.2026 um 08:42 Uhr)
📰 IT Security NachrichtenVertrauen steigert Erfolg von KI-Projekten(16.09.2026 um 09:17 Uhr)
🔧 AI Nachrichten Nvidia-Chef Huang lehnt KI-Regulierung ab(16.09.2026 um 09:38 Uhr)

🔧 Programmierung 🕛 vor 2 Monaten 3 Min Lesezeit
0

Commit-Reveal vs Dual-Layer Scripts: The Real Architecture of Bitcoin Script

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

Companion notes to my book Mastering Taproot.









CODE
HODLing is the beginning.
But Bitcoin was meant to be programmed.

"Not Just HODLing: Real Bitcoin Script Engineering" starts here.












Bitcoin Script looks like a single program. It isn’t.



Underneath, two different architectures coexist:




  • a philosophical commit–reveal model shared by all address types


  • an engineering dual-layer structure introduced only in P2SH, P2WSH, and Taproot script-path




Most confusion comes from mixing these two.



This essay separates them cleanly.









1. The Universal Truth: Commit → Reveal



Every Bitcoin output — P2PKH, SegWit, Taproot — follows one rule:




CODE
Lock:   commit to a condition
Unlock: reveal a proof satisfying it







  • P2PKH commits to a pubkey hash


  • P2SH commits to a script hash


  • P2WSH commits to SHA256(script)


  • Taproot commits to a tweaked key (optionally hiding a Merkle tree)




This is a conceptual model, not an execution structure.



Commit–reveal is the language. Opcodes are the grammar.









2. Single-Layer vs Dual-Layer Scripts



Commit–reveal is universal. Dual-layer execution is not.



Bitcoin has exactly two script architectures:









Single-Layer Scripts



Used by:




  • P2PK / P2PKH


  • P2MS (bare multisig)


  • P2WPKH


  • Taproot key-path




Structure:




CODE
scriptSig / witness pushes data

scriptPubKey (or implicit logic) executes directly






No script hash. No script extraction. No inner vs outer.



P2WPKH



Witness only carries data. Nodes recognize OP_0 <20 bytes>, then execute an implicit P2PKH-equivalent program.



This is not dual-layer because there is no script hash and no revealed script.



Taproot key-path



Pure single-layer: a single Schnorr signature verifies the tweaked key. No script execution at all.









Dual-Layer Scripts



Used only by:




  • P2SH


  • P2WSH


  • Taproot script-path




Architecture:




CODE
Outer layer:   verify a commitment (hash / tweaked key)
Inner layer: execute the revealed script









CODE
┌─────────────────────────────┐
│ Outer Commit Layer │
│ (scriptPubKey commitment) │
└───────────────┬─────────────┘


┌─────────────────────────────┐
│ Inner Execution Layer │
│ (redeemScript / witnessScript / tapscript)
└─────────────────────────────┘






Only these three structures follow: unlock → reveal → load script → execute script.



This is why P2SH has no OP_CHECKSIG in its locking script. All logic lives in the inner script.









3. The Commitment Types






P2SH






CODE
scriptPubKey:  OP_HASH160 <script_hash> OP_EQUAL
redeemScript: (actual logic, e.g. OP_CHECKSIG)









P2WSH






CODE
scriptPubKey:  OP_0 <32-byte script_hash>
witnessScript: (actual logic)









Taproot script-path






CODE
scriptPubKey:  OP_1 <32-byte output_pubkey>
witness: <stack> <tapscript> <control_block>






The control_block contains the internal key and Merkle path.



The outer script never encodes logic — only a fingerprint of logic.









4. Why This Distinction Matters



Failing to distinguish these two layers leads to confusion:




  • Why P2SH’s scriptPubKey has no OP_CHECKSIG


  • Why SegWit moves scripts into the witness


  • Why P2WSH and Taproot require revealing full scripts


  • Why Taproot must reconstruct the tweaked key


  • Why key-path spend is “scriptless”




With the correct architecture, everything clicks:



Commit–reveal is the philosophy.Dual-layer is the mechanism.



P2PKH only follows the philosophy. P2SH / P2WSH / Taproot script-path implement both.









5. The Unified Evolution






CODE
P2PK     → commit(pubkey)
P2PKH → commit(hash(pubkey))
P2SH → commit(hash(script))
P2WSH → commit(sha256(script))
Taproot → commit(internal_key + tweak(merkle_root))






Commitments grow more abstract. Privacy improves. Scripts expose less and less.



But the core remains unchanged:




CODE
Commit → Reveal → Execute






This is the true architecture of Bitcoin programmability.



By .



on July 3, 2026.

Vollständiger Original-Artikel
Den kompletten Beitrag mit allen Details direkt auf dev.to lesen.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Eine Tonne „grüner“ Stahl am Tag: US-Startup entwickelt neuen Ofen – und will diese alte Industrie umkrempeln
1 Quelle
Diversität im Backlash: Was Unternehmen jetzt tun sollten
1 Quelle
Größer als die Autobranche: Deutschlands Digitalunternehmen erwirtschaften 481 Milliarden Euro
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Commit-Reveal vs Dual-Layer Scripts: The Real Architecture of Bitcoin Script

Thematisch verwandte Begriffe: CommitReveal, DualLayer, Scripts, Real · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...