1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-08-31 18:47:36 +00:00

Merge pull request #2267 from guggero/bip379-malleability-caveat

BIP-379: note that the type properties assume their requirements
This commit is contained in:
Jon Atack
2026-08-30 15:06:53 -07:00
committed by GitHub

View File

@@ -155,6 +155,10 @@ its type properties in function of those of their subexpressions.
| `j:X` | X is Bn | B | o=o<sub>X</sub>; n; d; u=u<sub>X</sub> | `j:X` | X is Bn | B | o=o<sub>X</sub>; n; d; u=u<sub>X</sub>
| `n:X` | X is B | B | z=z<sub>X</sub>; o=o<sub>X</sub>; n=n<sub>X</sub>; d=d<sub>X</sub>; u | `n:X` | X is B | B | z=z<sub>X</sub>; o=o<sub>X</sub>; n=n<sub>X</sub>; d=d<sub>X</sub>; u
The properties of a fragment assume that the conditions in its "Requires" column are met. They exist
only to reason about correctness, so they say nothing about an expression that does not meet them:
such an expression is not valid Miniscript.
#### Timelock Type Mixing #### Timelock Type Mixing
There is one additional correctness property that Miniscript expressions must satisfy: There is one additional correctness property that Miniscript expressions must satisfy:
@@ -207,6 +211,14 @@ The following table lists the malleability properties and requirement of each fr
| `j:X` | | s=s<sub>X</sub>; e=f<sub>X | `j:X` | | s=s<sub>X</sub>; e=f<sub>X
| `n:X` | | s=s<sub>X</sub>; f=f<sub>X</sub>; e=e<sub>X</sub> | `n:X` | | s=s<sub>X</sub>; f=f<sub>X</sub>; e=e<sub>X</sub>
As in the correctness table, the properties of a fragment assume that the conditions in its
"Requires" column are met. They exist only to reason about malleability, so they say nothing about
an expression that does not meet them: such an expression is malleable, and so is every expression
containing it.
Implementors of APIs which unconditionally return values for these properties should always return
false for malleable expressions.
### Satisfaction ### Satisfaction
The following table shows all valid satisfactions and dissatisfactions for every Miniscript, using The following table shows all valid satisfactions and dissatisfactions for every Miniscript, using