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
- ensure the `chain_hash` value identifies the chain it wishes to open the contract within.
114
+
- set `payout_spk` and `change_spk` to a [standard script pubkey](#script-pubkey-standardness-definition)
113
115
- set `funding_pubkey` to a valid secp256k1 pubkey in compressed format.
114
116
- set `total_collateral_satoshis` to a value greater than or equal to 1000.
115
117
- set `contract_maturity_bound` and `contract_timeout` to either both be UNIX timestamps, or both be block heights as distinguished [here](https://en.bitcoin.it/wiki/NLockTime).
@@ -141,9 +143,11 @@ The receiving node MUST reject the contract if:
141
143
- the `chain_hash` value is set to a hash of a chain that is unknown to the receiver.
142
144
- the `contract_info` refers to events unknown to the receiver.
143
145
- the `contract_info` refers to an oracle unknown or inaccessible to the receiver.
146
+
-`payout_spk` or `change_spk` are not a [standard script pubkey](#script-pubkey-standardness-definition).
144
147
- it considers `feerate_per_vb` too small for timely processing or unreasonably large.
145
148
-`funding_pubkey` is not a valid secp256k1 pubkey in compressed format.
146
149
-`funding_inputs` do not contribute at least `total_collateral_satoshis` plus full [fee payment](Transactions.md#fee-payment).
150
+
- Any input in `funding_inputs` is not a [standard script pubkey](#script-pubkey-standardness-definition).
147
151
148
152
### The `accept_dlc` Message
149
153
@@ -172,6 +176,7 @@ The `temporary_contract_id` MUST be the SHA256 hash of the `offer_dlc` message.
172
176
The sender MUST:
173
177
174
178
- set `total_collateral_satoshis` sufficiently large so that the sum of both parties' total collaterals is at least as large as the largest payout in the `offer_dlc`'s `contract_info`.
179
+
- set `payout_spk` and `change_spk` to a [standard script pubkey](#script-pubkey-standardness-definition)
175
180
- set `cet_adaptor_signatures` to valid adaptor signatures, using its `funding_pubkey` for each CET, as defined in the [transaction specification](Transactions.md#contract-execution-transaction) and using signature public keys computed using the `offer_dlc`'s `contract_info` and `oracle_info` as adaptor points.
176
181
- include an adaptor signature in `cet_adaptor_signatures` for every event specified in the `offer_dlc`'s `contract_info`.
177
182
- set `refund_signature` to the valid signature, using its `funding_pubkey` for the refund transaction, as defined in the [transaction specification](Transactions.md#refund-transaction).
@@ -185,10 +190,14 @@ The receiver:
185
190
186
191
- if `total_collateral_satoshis` is not large enough:
187
192
- MAY reject the contract.
193
+
- if `payout_spk` or `change_spk` are not a [standard script pubkey](#script-pubkey-standardness-definition)
194
+
- MUST reject the contract.
188
195
- if `cet_adaptor_signatures` or `refund_signature` fail validation:
189
196
- MUST reject the contract.
190
-
- if `funding_inputs` do not contribute at least `total_collateral_satoshis` plus [fee payment](Transactions.md#fee-payment)
191
-
- MUST reject the contract.
197
+
- if `funding_inputs` do not contribute at least `total_collateral_satoshis` plus [fee payment](Transactions.md#fee-payment)
198
+
- MUST reject the contract.
199
+
- if Any input in `funding_inputs` is not a [standard script pubkey](#script-pubkey-standardness-definition).
200
+
- MUST reject the contract.
192
201
193
202
Other fields have the same requirements as their counterparts in `offer_dlc`.
194
203
@@ -227,12 +236,27 @@ The recipient:
227
236
- on receipt of a valid `sign_dlc`:
228
237
- SHOULD broadcast the funding transaction.
229
238
239
+
### Script Pubkey Standardness Definition
240
+
241
+
For a script pub key to be valid it must be in one of the following forms:
242
+
243
+
1. `OP_DUP` `OP_HASH160` `20` 20-bytes `OP_EQUALVERIFY` `OP_CHECKSIG` (pay to pubkey hash), OR
244
+
2. `OP_HASH160` `20` 20-bytes `OP_EQUAL` (pay to script hash), OR
245
+
3. `OP_0` `20` 20-bytes (version 0 pay to witness pubkey hash), OR
246
+
4. `OP_0` `32` 32-bytes (version 0 pay to witness script hash), OR
247
+
5. `OP_1` through `OP_16` inclusive, followed by a single push of 2 to 40 bytes
248
+
(witness program versions 1 through 16)
249
+
250
+
These script pub key forms include only standard forms accepted by the wider set of deployed Bitcoin clients in the network, which increase the chances of successful propagation to miners.
0 commit comments