Skip to content

Commit 13940d9

Browse files
committed
Merge #2055: chore(msrv): bump MSRV to 1.85.0
fdafe86 ci: bump rust stable version to 1.90.0 for CI testing (志宇) 2f4c3d4 ci: use explicit `cache: true` on fmt job (valued mammal) eabd1be ci(coverage): Switch to `actions-rust-lang/setup-rust-toolchain` (valued mammal) 86df0c3 ci: Remove unneeded `clippy: true` from build-test (valued mammal) dc0c907 ci: drop actions-rs from clippy check (valued mammal) 81ed4d0 feat(ci): update to `actions-rust-lang/setup-rust-toolchain@v1` (Leonardo Lima) 7c189d0 chore(deps): bump `criterion` to `0.7` (Leonardo Lima) 6b67a34 fix(clippy): use `is_none_or` instead of `map_or` (Leonardo Lima) 8c15308 chore(msrv): bump MSRV to `1.85.0` (Leonardo Lima) Pull request description: fixes #2009 ### Description It bumps the project MSRV to 1.85.0, as the latest Debian trixie release establishes that as stable, see: https://tracker.debian.org/pkg/rustc. This PR does: - update all references to the previous 1.63.0 MSRV. - update the rust-version to 1.85.0. - update the CI to not exclude `bdk_electrum` anymore. - update the ci/pin-msrv.sh to 1.85.0. ### Notes to the reviewers Should we update something in the GitHub repository configuration to get rid of old mandatory CI jobs ? ### Changelog notice ``` ### Changed - Update all references to the previous 1.63.0 MSRV. - Update the rust-version to 1.85.0. - Update the CI to not exclude `bdk_electrum` anymore. - Update the ci/pin-msrv.sh to 1.85.0. ``` ### Checklists #### All Submissions: * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) ACKs for top commit: ValuedMammal: ACK fdafe86 evanlinjin: self-ACK fdafe86 thunderbiscuit: ACK fdafe86. Looks good. Tree-SHA512: f592f37df59d518c0ac17269e00e048fc6136ee94a8ea4d96857e485ac15b00c3724e46c586665f73e65ed2e07e8e9af07a7081a5df1aab599bc36acb7bc3d30
2 parents 8149e1b + fdafe86 commit 13940d9

File tree

20 files changed

+52
-96
lines changed

20 files changed

+52
-96
lines changed

.github/workflows/code_coverage.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ jobs:
1616
- name: Install lcov tools
1717
run: sudo apt-get install lcov -y
1818
- name: Install Rust toolchain
19-
uses: actions-rs/toolchain@v1
19+
uses: actions-rust-lang/setup-rust-toolchain@v1
2020
with:
2121
toolchain: nightly
2222
override: true
23-
profile: minimal
23+
cache: true
2424
components: llvm-tools-preview
25-
- name: Rust Cache
26-
uses: Swatinem/rust-cache@v2.7.8
2725
- name: Install cargo-llvm-cov
2826
run: if [[ ! -e ~/.cargo/bin/cargo-llvm-cov ]]; then cargo install cargo-llvm-cov; fi
2927
- name: Make coverage directory

.github/workflows/cont_integration.yml

Lines changed: 16 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ jobs:
2727
matrix:
2828
rust:
2929
- version: ${{ needs.prepare.outputs.rust_version }}
30-
clippy: true
31-
- version: 1.63.0 # Overall MSRV
32-
- version: 1.75.0 # Specific MSRV for `bdk_electrum`
30+
- version: 1.85.0 # MSRV
3331
features:
3432
- --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
3533
- --all-features
@@ -39,38 +37,20 @@ jobs:
3937
with:
4038
persist-credentials: false
4139
- name: Install Rust toolchain
42-
uses: actions-rs/toolchain@v1
40+
uses: actions-rust-lang/setup-rust-toolchain@v1
4341
with:
4442
toolchain: ${{ matrix.rust.version }}
4543
override: true
46-
profile: minimal
47-
- name: Rust Cache
48-
uses: Swatinem/rust-cache@v2.7.8
49-
- name: Pin dependencies for 1.75
50-
if: matrix.rust.version == '1.75.0'
51-
run: |
52-
cargo update -p home --precise "0.5.9"
53-
cargo update -p native-tls --precise "0.2.13"
54-
cargo update -p idna_adapter --precise "1.1.0"
55-
cargo update -p base64ct --precise "1.6.0"
56-
cargo update -p minreq --precise "2.13.2"
57-
cargo update -p rayon --precise "1.10.0"
58-
cargo update -p rayon-core --precise "1.12.1"
59-
cargo update -p time --precise "0.3.41"
44+
cache: true
6045
- name: Pin dependencies for MSRV
61-
if: matrix.rust.version == '1.63.0'
46+
if: matrix.rust.version == '1.85.0'
6247
run: ./ci/pin-msrv.sh
6348
- name: Build + Test
6449
env:
6550
MATRIX_RUST_VERSION: ${{ matrix.rust.version }}
6651
run: |
67-
if [ $MATRIX_RUST_VERSION = '1.63.0' ]; then
68-
cargo build --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
69-
cargo test --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
70-
else
7152
cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
7253
cargo test --workspace --exclude 'example_*' ${{ matrix.features }}
73-
fi
7454
7555
check-no-std:
7656
needs: prepare
@@ -82,14 +62,12 @@ jobs:
8262
with:
8363
persist-credentials: false
8464
- name: Install Rust toolchain
85-
uses: actions-rs/toolchain@v1
65+
uses: actions-rust-lang/setup-rust-toolchain@v1
8666
with:
8767
toolchain: ${{ needs.prepare.outputs.rust_version }}
8868
override: true
89-
profile: minimal
69+
cache: true
9070
# target: "thumbv6m-none-eabi"
91-
- name: Rust Cache
92-
uses: Swatinem/rust-cache@v2.7.8
9371
- name: Check bdk_chain
9472
working-directory: ./crates/chain
9573
# TODO "--target thumbv6m-none-eabi" should work but currently does not
@@ -116,14 +94,12 @@ jobs:
11694
- run: sudo apt-get update || exit 1
11795
- run: sudo apt-get install -y libclang-common-14-dev clang-14 libc6-dev-i386 || exit 1
11896
- name: Install Rust toolchain
119-
uses: actions-rs/toolchain@v1
97+
uses: actions-rust-lang/setup-rust-toolchain@v1
12098
with:
12199
toolchain: ${{ needs.prepare.outputs.rust_version }}
122100
override: true
123-
profile: minimal
101+
cache: true
124102
target: "wasm32-unknown-unknown"
125-
- name: Rust Cache
126-
uses: Swatinem/rust-cache@v2.7.8
127103
- name: Check esplora
128104
working-directory: ./crates/esplora
129105
run: cargo check --target wasm32-unknown-unknown --no-default-features --features bdk_core/hashbrown,async
@@ -137,11 +113,11 @@ jobs:
137113
with:
138114
persist-credentials: false
139115
- name: Install Rust toolchain
140-
uses: actions-rs/toolchain@v1
116+
uses: actions-rust-lang/setup-rust-toolchain@v1
141117
with:
142118
toolchain: nightly
143119
override: true
144-
profile: minimal
120+
cache: true
145121
components: rustfmt
146122
- name: Check fmt
147123
run: cargo fmt --all --check
@@ -156,18 +132,14 @@ jobs:
156132
- uses: actions/checkout@v4
157133
with:
158134
persist-credentials: false
159-
- uses: actions-rs/toolchain@v1
135+
- uses: actions-rust-lang/setup-rust-toolchain@v1
160136
with:
161137
toolchain: ${{ needs.prepare.outputs.rust_version }}
162138
components: clippy
163139
override: true
164-
- name: Rust Cache
165-
uses: Swatinem/rust-cache@v2.7.8
166-
- uses: actions-rs/clippy-check@v1
167-
with:
168-
token: ${{ secrets.GITHUB_TOKEN }}
169-
name: Clippy Results
170-
args: --all-features --all-targets -- -D warnings
140+
cache: true
141+
- name: Clippy
142+
run: cargo clippy --all-features --all-targets -- -D warnings
171143

172144
build-examples:
173145
needs: prepare
@@ -186,13 +158,11 @@ jobs:
186158
with:
187159
persist-credentials: false
188160
- name: Install Rust toolchain
189-
uses: actions-rs/toolchain@v1
161+
uses: actions-rust-lang/setup-rust-toolchain@v1
190162
with:
191163
toolchain: ${{ needs.prepare.outputs.rust_version }}
192164
override: true
193-
profile: minimal
194-
- name: Rust Cache
195-
uses: Swatinem/rust-cache@v2.7.8
165+
cache: true
196166
- name: Build
197167
working-directory: examples/${{ matrix.example-dir }}
198168
run: cargo build

.github/zizmor.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Zizmor config
2+
rules:
3+
unpinned-uses:
4+
config:
5+
policies:
6+
# Allow pin by ref/tag
7+
actions-rust-lang/setup-rust-toolchain: ref-pin
8+
actions/*: ref-pin

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Every new feature should be covered by functional tests where possible.
4646
When refactoring, structure your PR to make it easy to review and don't
4747
hesitate to split it into multiple small, focused PRs.
4848

49-
The Minimum Supported Rust Version is **1.63.0** (enforced by our CI).
49+
The Minimum Supported Rust Version is **1.85.0** (enforced by our CI).
5050

5151
Commits should cover both the issue fixed and the solution's rationale.
5252
These [guidelines](https://chris.beams.io/posts/git-commit/) should be kept in mind. Commit messages follow the ["Conventional Commits 1.0.0"](https://www.conventionalcommits.org/en/v1.0.0/) to make commit histories easier to read by humans and automated tools. All commits must be [GPG signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<a href="https://github.com/bitcoindevkit/bdk/blob/master/LICENSE"><img alt="MIT or Apache-2.0 Licensed" src="https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg"/></a>
1313
<a href="https://github.com/bitcoindevkit/bdk/actions?query=workflow%3ACI"><img alt="CI Status" src="https://github.com/bitcoindevkit/bdk/workflows/CI/badge.svg"></a>
1414
<a href="https://coveralls.io/github/bitcoindevkit/bdk?branch=master"><img src="https://coveralls.io/repos/github/bitcoindevkit/bdk/badge.svg?branch=master"/></a>
15-
<a href="https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html"><img alt="Rustc Version 1.63.0+" src="https://img.shields.io/badge/rustc-1.63.0%2B-lightgrey.svg"/></a>
15+
<a href="https://blog.rust-lang.org/2025/02/20/Rust-1.85.0/"><img alt="Rustc Version 1.85.0+" src="https://img.shields.io/badge/rustc-1.85.0%2B-lightgrey.svg"/></a>
1616
<a href="https://discord.gg/d7NkDKm"><img alt="Chat on Discord" src="https://img.shields.io/discord/753336465005608961?logo=discord"></a>
1717
</p>
1818

@@ -58,15 +58,14 @@ Fully working examples of how to use these components are in `/examples`:
5858

5959
## Minimum Supported Rust Version (MSRV)
6060

61-
The following BDK crates maintains a MSRV of 1.63.0. To build these crates with the MSRV of 1.63.0 you will need to pin dependencies by running the [`pin-msrv.sh`](./ci/pin-msrv.sh) script.
61+
The following BDK crates maintains a MSRV of 1.85.0. To build these crates with the MSRV of 1.85.0 you will need to pin dependencies by running the [`pin-msrv.sh`](./ci/pin-msrv.sh) script.
6262

6363
- `bdk_core`
6464
- `bdk_chain`
6565
- `bdk_bitcoind_rpc`
6666
- `bdk_esplora`
6767
- `bdk_file_store`
68-
69-
The MSRV of the `bdk_electrum` crate is 1.75.0.
68+
- `bdk_electrum`
7069

7170
## Just
7271

ci/pin-msrv.sh

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,4 @@ set -euo pipefail
88
# To pin deps, switch toolchain to MSRV and execute the below updates
99

1010
# cargo clean
11-
# rustup override set 1.63.0
12-
13-
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
14-
cargo update -p time --precise "0.3.20"
15-
cargo update -p home --precise "0.5.5"
16-
cargo update -p proptest --precise "1.2.0"
17-
cargo update -p url --precise "2.5.0"
18-
cargo update -p tokio --precise "1.38.1"
19-
cargo update -p reqwest --precise "0.12.4"
20-
cargo update -p security-framework-sys --precise "2.11.1"
21-
cargo update -p csv --precise "1.3.0"
22-
cargo update -p unicode-width --precise "0.1.13"
23-
cargo update -p native-tls --precise "0.2.13"
24-
cargo update -p flate2 --precise "1.0.35"
25-
cargo update -p bzip2-sys --precise "0.1.12"
26-
cargo update -p ring --precise "0.17.12"
27-
cargo update -p once_cell --precise "1.20.3"
28-
cargo update -p base64ct --precise "1.6.0"
29-
cargo update -p minreq --precise "2.13.2"
30-
cargo update -p tracing-core --precise "0.1.33"
31-
cargo update -p webpki-roots@1.0.3 --precise "1.0.1"
32-
cargo update -p rayon --precise "1.10.0"
33-
cargo update -p rayon-core --precise "1.12.1"
34-
cargo update -p socket2@0.6.0 --precise "0.5.10"
11+
# rustup override set 1.85.0

clippy.toml

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

crates/bitcoind_rpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "bdk_bitcoind_rpc"
33
version = "0.22.0"
44
edition = "2021"
5-
rust-version = "1.63"
5+
rust-version = "1.85.0"
66
homepage = "https://bitcoindevkit.org"
77
repository = "https://github.com/bitcoindevkit/bdk"
88
documentation = "https://docs.rs/bdk_bitcoind_rpc"

crates/chain/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "bdk_chain"
33
version = "0.23.2"
44
edition = "2021"
5-
rust-version = "1.63"
5+
rust-version = "1.85.0"
66
homepage = "https://bitcoindevkit.org"
77
repository = "https://github.com/bitcoindevkit/bdk"
88
documentation = "https://docs.rs/bdk_chain"
@@ -28,7 +28,7 @@ rusqlite = { version = "0.31.0", features = ["bundled"], optional = true }
2828
rand = "0.8"
2929
proptest = "1.2.0"
3030
bdk_testenv = { path = "../testenv" }
31-
criterion = { version = "0.2" }
31+
criterion = { version = "0.7" }
3232

3333
[features]
3434
default = ["std", "miniscript"]

crates/chain/benches/canonicalization.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use bitcoin::{
77
absolute, constants, hashes::Hash, key::Secp256k1, transaction, Amount, BlockHash, Network,
88
OutPoint, ScriptBuf, Transaction, TxIn, TxOut,
99
};
10-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
10+
use criterion::{criterion_group, criterion_main, Criterion};
1111
use miniscript::{Descriptor, DescriptorPublicKey};
1212
use std::sync::Arc;
1313

@@ -126,7 +126,7 @@ fn run_filter_chain_unspents(tx_graph: &KeychainTxGraph, chain: &LocalChain, exp
126126

127127
pub fn many_conflicting_unconfirmed(c: &mut Criterion) {
128128
const CONFLICTING_TX_COUNT: u32 = 2100;
129-
let (tx_graph, chain) = black_box(setup(|tx_graph, _chain| {
129+
let (tx_graph, chain) = std::hint::black_box(setup(|tx_graph, _chain| {
130130
let previous_output = add_ancestor_tx(tx_graph, tip_block_id(), 0);
131131
// Create conflicting txs that spend from `previous_output`.
132132
let spk_1 = spk_at_index(&tx_graph.index, 1);
@@ -164,7 +164,7 @@ pub fn many_conflicting_unconfirmed(c: &mut Criterion) {
164164

165165
pub fn many_chained_unconfirmed(c: &mut Criterion) {
166166
const TX_CHAIN_COUNT: u32 = 2100;
167-
let (tx_graph, chain) = black_box(setup(|tx_graph, _chain| {
167+
let (tx_graph, chain) = std::hint::black_box(setup(|tx_graph, _chain| {
168168
let mut previous_output = add_ancestor_tx(tx_graph, tip_block_id(), 0);
169169
// Create a chain of unconfirmed txs where each subsequent tx spends the output of the
170170
// previous one.
@@ -203,7 +203,7 @@ pub fn many_chained_unconfirmed(c: &mut Criterion) {
203203
pub fn nested_conflicts(c: &mut Criterion) {
204204
const CONFLICTS_PER_OUTPUT: usize = 3;
205205
const GRAPH_DEPTH: usize = 7;
206-
let (tx_graph, chain) = black_box(setup(|tx_graph, _chain| {
206+
let (tx_graph, chain) = std::hint::black_box(setup(|tx_graph, _chain| {
207207
let mut prev_ops = core::iter::once(add_ancestor_tx(tx_graph, tip_block_id(), 0))
208208
.collect::<Vec<OutPoint>>();
209209
for depth in 1..GRAPH_DEPTH {

0 commit comments

Comments
 (0)