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
containing at least two leaves: one with an <code>OP_VAULT</code>-containing script that
160
-
facilitates the expected withdrawal process, and leaf another with
161
+
facilitates the expected withdrawal process, and another leaf with
161
162
<code>OP_VAULT_RECOVER</code> which ensures the coins can be recovered
162
163
at any time prior to withdrawal finalization.
163
164
@@ -192,9 +193,9 @@ The vault has a number of stages, some of them optional:
192
193
193
194
* '''trigger transaction''': spends one or more <code>OP_VAULT</code>-tapleaf inputs into an output which is encumbered by a timelocked withdrawal to a fixed set of outputs, chosen at trigger time. This publicly broadcasts the intent to withdraw to some specific set of outputs.<br /><br />The trigger transaction may have an additional output which allocates some of the vault balance into a partial "revault," which simply encumbers the revaulted portion of the value into the same <code>scriptPubKey</code> as the <code>OP_VAULT</code>-containing input(s) being spent.
194
195
195
-
* '''withdrawal transaction''': spends the timelocked <code>OP_CHECKTEMPLATEVERIFY</code> trigger inputs into a compatible set of final withdrawal outputs per the CTV hash, after the trigger inputs have matured per the spend delay. Timelocked CTV transactions are the motivating usage of OP_VAULT, but any script template can be specified during the creation of the vault.
196
+
* '''withdrawal transaction''': spends the timelocked, destination-locked trigger inputs into a compatible set of final withdrawal outputs (per, e.g., a <code>CHECKTEMPLATEVERIFY</code> hash), after the trigger inputs have matured per the spend delay. Timelocked CTV transactions are the motivating usage of OP_VAULT, but any script template can be specified during the creation of the vault.
196
197
197
-
* '''recovery transaction''': spends one or more <code>OP_VAULT_RECOVER</code>-tapleaf inputs to the prespecified recovery path, which can be done at any point before the withdrawal transaction confirms. Each input can optionally require a witness satisfying a specified ''recovery authorization'' script, an optional script prefixing the <code>OP_VAULT_RECOVER</code> fragment. The use of recovery authorization has certain trade-offs discussed later.
198
+
* '''recovery transaction''': spends one or more vault inputs via <code>OP_VAULT_RECOVER</code> tapleaf to the prespecified recovery path, which can be done at any point before the withdrawal transaction confirms. Each input can optionally require a witness satisfying a specified ''recovery authorization'' script, an optional script prefixing the <code>OP_VAULT_RECOVER</code> fragment. The use of recovery authorization has certain trade-offs discussed later.
198
199
199
200
200
201
=== Fee management ===
@@ -208,7 +209,7 @@ Providing dynamic fee management is critical to the operation of a vault, since
208
209
But dynamic fee management can introduce
209
210
[https://bitcoinops.org/en/topics/transaction-pinning/ pinning vectors]. Care
210
211
has been taken to avoid unnecessarily introducing these vectors when using the new
211
-
content-based spending policies that this proposal introduces.
212
+
destination-based spending policies that this proposal introduces.
212
213
213
214
Originally, this proposal had a hard dependency on reformed transaction
214
215
nVersion=3 policies, including ephemeral anchors, but it has since been revised
@@ -262,7 +263,7 @@ After the stack is parsed, the following validation checks are performed:
262
263
* Let the output designated by <code><trigger-vout-idx></code> be called ''triggerOut''.
263
264
* If the scriptPubKey of ''triggerOut'' is not a witness program of the same version and same tapleaf version as the currently executing script, script execution MUST fail and terminate immediately.
264
265
* Let the script constructed by taking the <code><leaf-update-script-body></code> and prefixing it with minimally-encoded data pushes of the <code><n-pushes></code> leaf-update script data items be called the ''leaf-update-script''.
265
-
** The leaf-update data items will be in the same order in the ''leaf-update-script'' as they appeared on the stack.
266
+
** Note: the leaf-update data items will be in the same order in the ''leaf-update-script'' as they appeared on the stack.
266
267
* If the scriptPubKey of ''triggerOut'' does not match that of a taptree that is identical to that of the currently evaluated input, but with the leaf script substituted for ''leaf-update-script'', script execution when spending this output MUST fail and terminate immediately.
267
268
** Note: the parity bit of the resulting taproot output is allowed to vary, so both values for the new output must be checked.
268
269
* Let the output designated by <code><revault-vout-idx></code> (if the index value is non-negative) be called ''revaultOut''.
@@ -303,7 +304,7 @@ If none of the conditions fail, a single true value (<code>0x01</code>) is left
303
304
304
305
In order to prevent possible pinning attacks, recovery transactions must be replaceable.
305
306
306
-
* When validating an <code>OP_VAULT_RECOVER</code> input being spent, the script must FAIL (by policy, not consensus) and terminate immediately if both<ref>'''Why are recovery transactions required to be replaceable?''' In the case of unauthorized recoveries, an attacker may attempt to pin recovery transactions by broadcasting a "rebundled" version with a low fee rate. Vault owners must be able to overcome this with replacement. In the case of authorized recovery, if an attacker steals the recovery authorization key, the attacker may try to pin the recovery transaction during theft. Requiring replaceability ensures that the owner can always raise the fee rate of the recovery transaction, even if they are RBF rule #3 griefed in the process.</ref>
307
+
* When validating an <code>OP_VAULT_RECOVER</code> input being spent, the script MUST fail (by policy, not consensus) and terminate immediately if both<ref>'''Why are recovery transactions required to be replaceable?''' In the case of unauthorized recoveries, an attacker may attempt to pin recovery transactions by broadcasting a "rebundled" version with a low fee rate. Vault owners must be able to overcome this with replacement. In the case of authorized recovery, if an attacker steals the recovery authorization key, the attacker may try to pin the recovery transaction during theft. Requiring replaceability ensures that the owner can always raise the fee rate of the recovery transaction, even if they are RBF rule #3 griefed in the process.</ref>
307
308
*# the input is not marked as opt-in replaceable by having an nSequence number less than <code>0xffffffff - 1</code>, per [https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki BIP-0125], and
308
309
*# the version of the recovery transaction has an nVersion other than 3.
309
310
@@ -325,7 +326,7 @@ A sample implementation is available on bitcoin-inquisition [https://github.com/
325
326
326
327
== Applications ==
327
328
328
-
The specification above, perhaps surprisingly, does not cover how a relative timelocked withdrawal process with a fixed target is implemented. The tapleaf update semantics specified in <code>OP_VAULT</code> as well as the output-based authorization enabled by <code>OP_VAULT_RECOVER</code> can be used to implement a vault, but they are incomplete without two other pieces:
329
+
The specification above, perhaps surprisingly, does not specifically cover how a relative timelocked withdrawal process with a fixed target is implemented. The tapleaf update semantics specified in <code>OP_VAULT</code> as well as the output-based authorization enabled by <code>OP_VAULT_RECOVER</code> can be used to implement a vault, but they are incomplete without two other pieces:
329
330
330
331
* a way to enforce relative timelocks, like <code>OP_CHECKSEQUENCEVERIFY</code>, and
331
332
* a way to enforce that proposed withdrawals are ultimately being spent to a precise set of outputs, like <code>OP_CHECKTEMPLATEVERIFY</code>.
@@ -335,7 +336,7 @@ These two pieces are combined with the tapleaf update capabilities of
335
336
336
337
=== Creating a vault ===
337
338
338
-
In order to vault coins, they must be spent into a witness v1 <code>scriptPubKey</code>
339
+
In order to vault coins, they can be spent into a witness v1 <code>scriptPubKey</code>
0 commit comments