You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bip-0322.mediawiki
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ The <code>to_sign</code> transaction is:
74
74
vout[0].nValue = 0
75
75
vout[0].scriptPubKey = OP_RETURN
76
76
77
-
A full signature consists of the base64-encoding of the <code>to_spend</code> and <code>to_sign</code> transactions concatenated in standard network serialisation.
77
+
A full signature consists of the base64-encoding of the <code>to_sign</code> transaction in standard network serialisation.
78
78
79
79
=== Full (Proof of Funds) ===
80
80
@@ -102,11 +102,9 @@ A validator is given as input an address ''A'' (which may be omitted in a proof-
102
102
Validation consists of the following steps:
103
103
104
104
# Basic validation
105
-
## Decode ''s'' as the transactions <code>to_sign</code> and <code>to_spend</code>
106
-
## Confirm that <code>message_hash</code> is the correct hash of ''m''
107
-
## Confirm that <code>message_challenge</code> is the scriptPubKey corresponding to ''A'' if ''A'' is present, and otherwise must be <code>OP_TRUE</code>
108
-
## Confirm that all other fields are set as specified above; in particular that
109
-
##* <code>to_spend</code> has exactly one input and one output
105
+
## Compute the transaction <code>to_spend</code> from ''m'' and ''A''
106
+
## Decode ''s'' as the transaction <code>to_sign</code>
107
+
## If ''s'' was a full transaction, confirm all fields are set as specified above; in particular that
110
108
##* <code>to_sign</code> has at least one input and its first input spends the output of </code>to_spend</code>
111
109
##* <code>to_sign</code> has exactly one output, as specified above
112
110
## Confirm that the two transactions together satisfy all consensus rules, except for <code>to_spend</code>'s missing input, and except that ''nSequence'' of <code>to_sign</code>'s first input and ''nLockTime'' of <code>to_sign</code> are not checked.
@@ -120,6 +118,7 @@ Validation consists of the following steps:
120
118
## <code>MINIMALIF</code>: the argument of <code>IF</code>/<code>NOTIF</code> must be exactly 0x01 or empty push
121
119
## If any of the above steps failed, the validator should stop and output the ''invalid'' state.
122
120
# Check the **upgradeable rules**
121
+
## The version of <code>to_sign</code> must be 0 or 2.
123
122
## The use of NOPs reserved for upgrades is forbidden.
124
123
## The use of segwit versions greater than 0 are forbidden.
125
124
## If any of the above steps failed, the validator should stop and output the ''inconclusive'' state.
@@ -137,7 +136,7 @@ Signers who control an address ''A'' who wish to sign a message ''m'' act as fol
137
136
They then encode their signature, choosing either ''simple'' or ''full'' as follows:
138
137
139
138
* If they added no inputs to <code>to_sign</code>, left nSequence and nLockTime at 0, and ''A'' is a Segwit address (either pure or P2SH-wrapped), then they may base64-encode <code>message_signature</code>
140
-
* Otherwise they must base64-encode the concatenation of <code>to_spend</code> followed by <code>to_sign</code>.
139
+
* Otherwise they must base64-encode <code>to_sign</code>.
0 commit comments