File tree Expand file tree Collapse file tree 7 files changed +49
-5
lines changed Expand file tree Collapse file tree 7 files changed +49
-5
lines changed Original file line number Diff line number Diff line change
1
+ # 7.0.1 - March 8, 2023
2
+
3
+ - Fixed a typing rule in ` multi_a ` for taproot miniscript descriptors. Current typing rules
4
+ incorrectly tagged ` multi_a ` with the ` n ` property. Certain miniscripts of the form ` j:multi_a ` could
5
+ could not spent without the first key. We could not find any evidence of these scripts being used
6
+ in the wild. While this is technically a breaking change, any downstream users whose code would
7
+ break by this change are already vulnerable.
8
+
1
9
# 7.0.0 - April 20, 2022
2
10
3
11
- Fixed miniscript type system bug. This is a security vulnerability and users are strongly encouraged to upgrade.
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " miniscript"
3
- version = " 7.0.0 "
3
+ version = " 7.0.1 "
4
4
authors = [
" Andrew Poelstra <[email protected] >, Sanket Kanjalkar <[email protected] >" ]
5
5
repository = " https://github.com/apoelstra/miniscript"
6
6
description = " Miniscript: a subset of Bitcoin Script designed for analysis"
Original file line number Diff line number Diff line change 8
8
alias cargo=" cargo +$TOOLCHAIN "
9
9
fi
10
10
11
+
12
+ # Pin dependencies as required if we are using MSRV toolchain.
13
+ if cargo --version | grep " 1\.41" ; then
14
+ # 1.0.108 uses `matches!` macro so does not work with Rust 1.41.1, bad `syn` no biscuit.
15
+ cargo update -p syn --precise 1.0.107
16
+ fi
17
+
11
18
# Lint if told to
12
19
if [ " $DO_LINT " = true ]
13
20
then
Original file line number Diff line number Diff line change @@ -173,6 +173,15 @@ impl Property for Correctness {
173
173
}
174
174
}
175
175
176
+ fn from_multi_a ( _: usize , _: usize ) -> Self {
177
+ Correctness {
178
+ base : Base :: B ,
179
+ input : Input :: Any ,
180
+ dissatisfiable : true ,
181
+ unit : true ,
182
+ }
183
+ }
184
+
176
185
fn from_hash ( ) -> Self {
177
186
Correctness {
178
187
base : Base :: B ,
Original file line number Diff line number Diff line change @@ -122,6 +122,14 @@ impl Property for Malleability {
122
122
}
123
123
}
124
124
125
+ fn from_multi_a ( _: usize , _: usize ) -> Self {
126
+ Malleability {
127
+ dissat : Dissat :: Unique ,
128
+ safe : true ,
129
+ non_malleable : true ,
130
+ }
131
+ }
132
+
125
133
fn from_hash ( ) -> Self {
126
134
Malleability {
127
135
dissat : Dissat :: Unknown ,
Original file line number Diff line number Diff line change @@ -270,10 +270,7 @@ pub trait Property: Sized {
270
270
fn from_multi ( k : usize , n : usize ) -> Self ;
271
271
272
272
/// Type property of a `MultiA` fragment
273
- fn from_multi_a ( k : usize , n : usize ) -> Self {
274
- // default impl same as multi
275
- Self :: from_multi ( k, n)
276
- }
273
+ fn from_multi_a ( k : usize , n : usize ) -> Self ;
277
274
278
275
/// Type property of a hash fragment
279
276
fn from_hash ( ) -> Self ;
@@ -584,6 +581,13 @@ impl Property for Type {
584
581
}
585
582
}
586
583
584
+ fn from_multi_a ( k : usize , n : usize ) -> Self {
585
+ Type {
586
+ corr : Property :: from_multi_a ( k, n) ,
587
+ mall : Property :: from_multi_a ( k, n) ,
588
+ }
589
+ }
590
+
587
591
fn from_hash ( ) -> Self {
588
592
Type {
589
593
corr : Property :: from_hash ( ) ,
Original file line number Diff line number Diff line change @@ -191,6 +191,14 @@ impl Property for CompilerExtData {
191
191
}
192
192
}
193
193
194
+ fn from_multi_a ( k : usize , n : usize ) -> Self {
195
+ CompilerExtData {
196
+ branch_prob : None ,
197
+ sat_cost : 66.0 * k as f64 + ( n - k) as f64 ,
198
+ dissat_cost : Some ( n as f64 ) , /* <w_n> ... <w_1> := 0x00 ... 0x00 (n times) */
199
+ }
200
+ }
201
+
194
202
fn from_hash ( ) -> Self {
195
203
CompilerExtData {
196
204
branch_prob : None ,
You can’t perform that action at this time.
0 commit comments