Skip to content

Commit 6a045b5

Browse files
committed
Merge #90: bump elements and related dep
6ed3bbb avoid useless conversion of the same type (Riccardo Casatta) 79f3109 bump elements and related dep (Riccardo Casatta) b6ffda3 ci: let other toolchain finish if one is failing (Riccardo Casatta) 42375e4 bump MSRV 1.58 -> 1.63 (Riccardo Casatta) Pull request description: apoelstra, there are some places where I need guidance Also, I still need to check CI, just tested local `cargo check` and `cargo test` are working for now ACKs for top commit: apoelstra: ACK 6ed3bbb Tree-SHA512: 4d3d5a44c509a0df81527d73ccad1e384c251e28a351b01aae3c19b97b4ce75afa91c6f4cf3b987c7fb8feabfe5abe51fb103a8dfb27493eaa8bf3a74e0b6af4
2 parents afb5f48 + 6ed3bbb commit 6a045b5

File tree

20 files changed

+115
-165
lines changed

20 files changed

+115
-165
lines changed

.github/workflows/rust.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions-rs/toolchain@v1
2020
with:
2121
profile: minimal
22-
toolchain: 1.58.0
22+
toolchain: 1.63.0
2323
override: true
2424
- name: Running fuzzer
2525
env:
@@ -68,8 +68,9 @@ jobs:
6868
name: Tests
6969
runs-on: ubuntu-latest
7070
strategy:
71+
fail-fast: false
7172
matrix:
72-
rust: [stable, beta, nightly, 1.58.0]
73+
rust: [stable, beta, nightly, 1.63.0]
7374
steps:
7475
- name: Checkout Crate
7576
uses: actions/checkout@v2

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ rand = ["bitcoin/rand"]
1919
base64 = ["bitcoin/base64", "elements/base64"]
2020

2121
[dependencies]
22-
bitcoin = "0.31.0"
23-
elements = "0.24.0"
24-
bitcoin-miniscript = { package = "miniscript", version = "11.0" }
25-
simplicity = { package = "simplicity-lang", version = "0.2.0", optional = true }
22+
bitcoin = "0.32.0"
23+
elements = "0.25.0"
24+
bitcoin-miniscript = { package = "miniscript", version = "12.0" }
25+
simplicity = { package = "simplicity-lang", version = "0.3.0", optional = true }
2626

2727
# Do NOT use this as a feature! Use the `serde` feature instead.
2828
actual-serde = { package = "serde", version = "1.0", optional = true }
@@ -31,8 +31,8 @@ actual-serde = { package = "serde", version = "1.0", optional = true }
3131
serde_json = "1.0"
3232
actual-rand = { package = "rand", version = "0.8.4"}
3333
serde_test = "1.0.147"
34-
bitcoin = { version = "0.31.0", features = ["base64"] }
35-
secp256k1 = {version = "0.28.0", features = ["rand-std"]}
34+
bitcoin = { version = "0.32.0", features = ["base64"] }
35+
secp256k1 = { version = "0.29.0", features = ["rand-std"] }
3636
actual-base64 = { package = "base64", version = "0.13.0" }
3737

3838
[lints.rust]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![Build](https://github.com/ElementsProject/elements-miniscript/workflows/Continuous%20integration/badge.svg)
22

3-
**Minimum Supported Rust Version:** 1.58.0
3+
**Minimum Supported Rust Version:** 1.63.0
44

55
*This crate uses "2018" edition
66

@@ -40,7 +40,7 @@ Enabling the `no-std` feature does not disable `std`. To disable the `std` featu
4040
To run the benchmarks run `RUSTFLAGS=--cfg=miniscript_bench cargo +nightly bench --all-features`.
4141

4242
## Minimum Supported Rust Version (MSRV)
43-
This library should always compile with any combination of features on **Rust 1.58.0**.
43+
This library should always compile with any combination of features on **Rust 1.63.0**.
4444

4545

4646
Some dependencies do not play nicely with our MSRV, if you are running the tests

bitcoind-tests/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ edition = "2018"
1010
elements-miniscript = { path = "../" }
1111
elementsd = { version = "0.9.0" }
1212
actual-rand = { package = "rand", version = "0.8.4" }
13-
secp256k1 = { version = "0.28.1", features = ["rand-std"] }
13+
secp256k1 = { version = "0.29.0", features = ["rand-std"] }

bitcoind-tests/tests/test_arith.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub fn test_desc_satisfy(cl: &ElementsD, testdata: &TestData, desc: &str) -> Vec
125125
testdata.pubdata.genesis_hash,
126126
)
127127
.unwrap();
128-
let msg = secp256k1::Message::from_slice(&sighash_msg[..]).unwrap();
128+
let msg = secp256k1::Message::from_digest_slice(&sighash_msg[..]).unwrap();
129129
let mut aux_rand = [0u8; 32];
130130
rand::thread_rng().fill_bytes(&mut aux_rand);
131131
let sig = secp.sign_schnorr_with_aux_rand(&msg, &keypair, &aux_rand);

clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv = "1.58.0"
1+
msrv = "1.63.0"

contrib/test.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ FEATURES="compiler serde rand base64 simplicity"
77
cargo --version
88
rustc --version
99

10-
# Pin dependencies required to build with Rust 1.58
11-
if cargo --version | grep "1\.58"; then
12-
cargo update -p byteorder --precise 1.4.3
13-
cargo update -p cc --precise 1.0.94
14-
cargo update -p ppv-lite86 --precise 0.2.17
10+
# Pin dependencies required to build with Rust 1.63
11+
if cargo --version | grep "1\.63"; then
12+
cargo update -p regex --precise 1.8.4
1513
fi
1614

1715
# Format if told to

fuzz/generate-files.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ $(for name in $(listTargetNames); do echo "$name,"; done)
7171
key: cache-\${{ matrix.target }}-\${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
7272
- uses: actions-rs/toolchain@v1
7373
with:
74-
toolchain: 1.58
74+
toolchain: 1.63
7575
override: true
7676
profile: minimal
7777
- name: fuzz

src/confidential/slip77.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,10 @@ impl MasterBlindingKey {
9292
}
9393

9494
impl hex::FromHex for MasterBlindingKey {
95-
type Err = hex::HexToArrayError;
95+
type Error = hex::HexToArrayError;
9696

97-
fn from_byte_iter<I>(iter: I) -> Result<Self, Self::Err>
98-
where
99-
I: Iterator<Item = Result<u8, hex::HexToBytesError>>
100-
+ ExactSizeIterator
101-
+ DoubleEndedIterator,
102-
{
103-
Ok(MasterBlindingKey(<[u8; 32]>::from_byte_iter(iter)?))
97+
fn from_hex(s: &str) -> Result<Self, Self::Error> {
98+
Ok(MasterBlindingKey(<[u8; 32]>::from_hex(s)?))
10499
}
105100
}
106101

src/descriptor/key.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,23 +1286,23 @@ mod test {
12861286
assert_eq!(public_key.master_fingerprint().to_string(), "abcdef00");
12871287
assert_eq!(
12881288
public_key.full_derivation_path().unwrap().to_string(),
1289-
"m/0'/1'/2"
1289+
"0'/1'/2"
12901290
);
12911291
assert!(!public_key.has_wildcard());
12921292

12931293
let public_key = DescriptorPublicKey::from_str("[abcdef00/0'/1']tpubDBrgjcxBxnXyL575sHdkpKohWu5qHKoQ7TJXKNrYznh5fVEGBv89hA8ENW7A8MFVpFUSvgLqc4Nj1WZcpePX6rrxviVtPowvMuGF5rdT2Vi/*").unwrap();
12941294
assert_eq!(public_key.master_fingerprint().to_string(), "abcdef00");
12951295
assert_eq!(
12961296
public_key.full_derivation_path().unwrap().to_string(),
1297-
"m/0'/1'"
1297+
"0'/1'"
12981298
);
12991299
assert!(public_key.has_wildcard());
13001300

13011301
let public_key = DescriptorPublicKey::from_str("[abcdef00/0'/1']tpubDBrgjcxBxnXyL575sHdkpKohWu5qHKoQ7TJXKNrYznh5fVEGBv89hA8ENW7A8MFVpFUSvgLqc4Nj1WZcpePX6rrxviVtPowvMuGF5rdT2Vi/*h").unwrap();
13021302
assert_eq!(public_key.master_fingerprint().to_string(), "abcdef00");
13031303
assert_eq!(
13041304
public_key.full_derivation_path().unwrap().to_string(),
1305-
"m/0'/1'"
1305+
"0'/1'"
13061306
);
13071307
assert!(public_key.has_wildcard());
13081308
}
@@ -1317,7 +1317,7 @@ mod test {
13171317
assert_eq!(public_key.master_fingerprint().to_string(), "2cbe2a6d");
13181318
assert_eq!(
13191319
public_key.full_derivation_path().unwrap().to_string(),
1320-
"m/0'/1'/2"
1320+
"0'/1'/2"
13211321
);
13221322
assert!(!public_key.has_wildcard());
13231323

@@ -1327,7 +1327,7 @@ mod test {
13271327
assert_eq!(public_key.master_fingerprint().to_string(), "2cbe2a6d");
13281328
assert_eq!(
13291329
public_key.full_derivation_path().unwrap().to_string(),
1330-
"m/0'/1'/2'"
1330+
"0'/1'/2'"
13311331
);
13321332

13331333
let secret_key = DescriptorSecretKey::from_str("tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0/1/2").unwrap();
@@ -1336,7 +1336,7 @@ mod test {
13361336
assert_eq!(public_key.master_fingerprint().to_string(), "2cbe2a6d");
13371337
assert_eq!(
13381338
public_key.full_derivation_path().unwrap().to_string(),
1339-
"m/0/1/2"
1339+
"0/1/2"
13401340
);
13411341

13421342
let secret_key = DescriptorSecretKey::from_str("[aabbccdd]tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0/1/2").unwrap();
@@ -1345,7 +1345,7 @@ mod test {
13451345
assert_eq!(public_key.master_fingerprint().to_string(), "aabbccdd");
13461346
assert_eq!(
13471347
public_key.full_derivation_path().unwrap().to_string(),
1348-
"m/0/1/2"
1348+
"0/1/2"
13491349
);
13501350

13511351
let secret_key = DescriptorSecretKey::from_str("[aabbccdd/90']tprv8ZgxMBicQKsPcwcD4gSnMti126ZiETsuX7qwrtMypr6FBwAP65puFn4v6c3jrN9VwtMRMph6nyT63NrfUL4C3nBzPcduzVSuHD7zbX2JKVc/0'/1'/2").unwrap();
@@ -1354,7 +1354,7 @@ mod test {
13541354
assert_eq!(public_key.master_fingerprint().to_string(), "aabbccdd");
13551355
assert_eq!(
13561356
public_key.full_derivation_path().unwrap().to_string(),
1357-
"m/90'/0'/1'/2"
1357+
"90'/0'/1'/2"
13581358
);
13591359
}
13601360

0 commit comments

Comments
 (0)