Skip to content

Commit eab92a1

Browse files
authored
Merge pull request bitcoin#411 from jl2012/bip112_114_fix
BIP112/114 example fix
2 parents ae70f3e + 7478ee3 commit eab92a1

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

bip-0112.mediawiki

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ A simple output, paying to Alice might then look like:
138138

139139
HASH160 <revokehash> EQUAL
140140
IF
141-
<Bob key hash>
141+
<Bob's pubkey>
142142
ELSE
143143
"24h" CHECKSEQUENCEVERIFY DROP
144-
<Alice key hash>
144+
<Alice's pubkey>
145145
ENDIF
146146
CHECKSIG
147147
@@ -153,10 +153,10 @@ With CHECKLOCKTIMEVERIFY, this would look like:
153153

154154
HASH160 <revokehash> EQUAL
155155
IF
156-
<Bob key hash>
156+
<Bob's pubkey>
157157
ELSE
158158
"2015/12/15" CHECKLOCKTIMEVERIFY DROP
159-
<Alice key hash>
159+
<Alice's pubkey>
160160
ENDIF
161161
CHECKSIG
162162
@@ -181,13 +181,13 @@ Alice might look like the following in Alice's commitment transaction:
181181
IF
182182
"24h" CHECKSEQUENCEVERIFY
183183
2DROP
184-
<Alice key hash>
184+
<Alice's pubkey>
185185
ELSE
186186
<Commit-Revocation-Hash> EQUAL
187187
NOTIF
188188
"2015/10/20 10:33" CHECKLOCKTIMEVERIFY DROP
189189
ENDIF
190-
<Bob key hash>
190+
<Bob's pubkey>
191191
ENDIF
192192
CHECKSIG
193193
@@ -196,12 +196,12 @@ and correspondingly in Bob's commitment transaction:
196196
HASH160 DUP <R-HASH> EQUAL
197197
SWAP <Commit-Revocation-Hash> EQUAL ADD
198198
IF
199-
<Alice key hash>
199+
<Alice's pubkey>
200200
ELSE
201201
"2015/10/20 10:33" CHECKLOCKTIMEVERIFY
202202
"24h" CHECKSEQUENCEVERIFY
203203
2DROP
204-
<Bob key hash>
204+
<Bob's pubkey>
205205
ENDIF
206206
CHECKSIG
207207

bip-0114.mediawiki

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,20 @@ The following is the "Hashed TIme-Lock Contract" example in [[bip-0112.mediawiki
9696
IF
9797
"24h" CHECKSEQUENCEVERIFY
9898
2DROP
99-
<Alice key hash>
99+
<Alice's pubkey>
100100
ELSE
101101
<Commit-Revocation-Hash> EQUAL
102102
NOTIF
103103
"Timestamp" CHECKLOCKTIMEVERIFY DROP
104104
ENDIF
105-
<Bob key hash>
105+
<Bob's pubkey>
106106
ENDIF
107107
CHECKSIG
108108

109109
To create a MAST Root, it is flattened to 3 mutually exclusive branches:
110-
HASH160 <R-HASH> EQUALVERIFY "24h" CHECKSEQUENCEVERIFY DROP <Alice key hash> CHECKSIG
111-
HASH160 <Commit-Revocation-Hash> EQUALVERIFY <Bob key hash> CHECKSIG
112-
"Timestamp" CHECKLOCKTIMEVERIFY DROP <Bob key hash> CHECKSIG
110+
HASH160 <R-HASH> EQUALVERIFY "24h" CHECKSEQUENCEVERIFY DROP <Alice's pubkey> CHECKSIG
111+
HASH160 <Commit-Revocation-Hash> EQUALVERIFY <Bob's pubkey> CHECKSIG
112+
"Timestamp" CHECKLOCKTIMEVERIFY DROP <Bob's pubkey> CHECKSIG
113113

114114
which significantly improves readability and reduces the witness size when it is redeemed.
115115

0 commit comments

Comments
 (0)