Skip to content

Bump MSRV to 1.85.0#1046

Open
luisschwab wants to merge 11 commits into
getfloresta:masterfrom
luisschwab:chore/bump-msrv-1-85-0
Open

Bump MSRV to 1.85.0#1046
luisschwab wants to merge 11 commits into
getfloresta:masterfrom
luisschwab:chore/bump-msrv-1-85-0

Conversation

@luisschwab
Copy link
Copy Markdown
Member

@luisschwab luisschwab commented May 11, 2026

Closes #1010

This PR bumps MSRV to 1.85.0 in preparation for using bdk_wallet as the wallet backend for floresta-watch-only [#950].

Changelog

- Bump MSRV to 1.85.0
- Inherit `rust-version` and `edition` from the workspace on all crates
- Bump `rand` to v0.9: `gen` is now a keyword, which conflicts with `.gen()`
- Resolve new `unsafe` warnings
- Format everything
- Update `Dockerfile` toolchain to 1.85.0
- Pin `time` to v0.14.7: incompatible transitive deps
- Pin `rcgen` to v0.3.45: incompatible transitive deps
- Pin `tonic` and `tonic-prost` to v0.14.5
- Pin `vcpkg` to `rust-bitcoinkernel`'s vendored `libbitcoinkernel-sys` version

I guess MSFT recently changed something about the Windows runner, which broke Boost installation due to out-of-sync vcpkg versions. This is fixed by pinning vcpkg installation using the version that rust-bitcoinkernel's vendored libbitcoinkernel-sys uses.

The version hash can be found at https://github.com/sedited/rust-bitcoinkernel/blob/0eadd82ba2c0bdb07b8321f4da5636ff502c0ea6/libbitcoinkernel-sys/bitcoin/vcpkg.json#L4

@luisschwab luisschwab changed the title Bump MSRV 1 85 0 Bump MSRV 1.85.0 May 11, 2026
@jaoleal jaoleal requested review from Davidson-Souza and jaoleal May 11, 2026 21:30
@jaoleal jaoleal added this to the Q2/2026 milestone May 11, 2026
@jaoleal jaoleal added this to Floresta May 11, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Floresta May 11, 2026
@jaoleal jaoleal moved this from Backlog to In progress in Floresta May 11, 2026
@jaoleal jaoleal added dependencies Pull requests that update a dependency file CI A change or issue related to CI labels May 11, 2026
@luisschwab luisschwab changed the title Bump MSRV 1.85.0 Bump MSRV to 1.85.0 May 11, 2026
@luisschwab luisschwab force-pushed the chore/bump-msrv-1-85-0 branch from c038223 to 2305f34 Compare May 12, 2026 01:05
@luisschwab luisschwab marked this pull request as ready for review May 12, 2026 04:16
Copy link
Copy Markdown
Member

@jaoleal jaoleal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All those formatting commits, it could be squashed

Comment thread crates/floresta-chain/src/pruned_utreexo/flat_chain_store.rs
@luisschwab
Copy link
Copy Markdown
Member Author

luisschwab commented May 12, 2026

All those formatting commits, it could be squashed

I'll squash after everyone reviews. Otherwise it's a huge commit. Squashed.

@Davidson-Souza
Copy link
Copy Markdown
Member

Tip to reviwers: to check those fmt commits, run:

git checkout 393e514fa7f777a8f46af49bc53137d7d79b2656
just fmt
git diff 6d107d3b156fb63e8797f73ffc367ae90d262196

it should show this diff:

diff --git a/crates/floresta-wire/src/p2p_wire/address_man.rs b/crates/floresta-wire/src/p2p_wire/address_man.rs
index 57dbca7..0d8cc4c 100644
--- a/crates/floresta-wire/src/p2p_wire/address_man.rs
+++ b/crates/floresta-wire/src/p2p_wire/address_man.rs
@@ -528,7 +528,8 @@ impl AddressMan {
     }
 
     pub fn get_addresses_to_send(&self) -> AddressToSend {
-        self.good_addresses
+        let addresses = self
+            .good_addresses
             .iter()
             .filter_map(|id| {
                 let address = self.addresses.get(id)?;
@@ -539,7 +540,9 @@ impl AddressMan {
                     address.port,
                 ))
             })
-            .collect()
+            .collect();
+
+        addresses
     }
 
     fn do_lookup(host: &str, default_port: u16, socks5: Option<SocketAddr>) -> Vec<LocalAddress> {

This means the rest was generated by cargo fmt. It would actually be nice if the diff was clean.

@luisschwab
Copy link
Copy Markdown
Member Author

If you guys prefer, I can squash the formatting commits now. Just let me know.

@jaoleal
Copy link
Copy Markdown
Member

jaoleal commented May 13, 2026

If you guys prefer, I can squash the formatting commits now. Just let me know.

I think its better to review, a single big commit that the changes are only formatting.

@luisschwab luisschwab force-pushed the chore/bump-msrv-1-85-0 branch from 8d97f14 to b2249eb Compare May 13, 2026 17:21
Copy link
Copy Markdown
Member

@jaoleal jaoleal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question, i think everything is good

Comment thread crates/floresta-wire/src/p2p_wire/node/conn.rs
Comment thread crates/floresta-chain/src/pruned_utreexo/flat_chain_store.rs
@luisschwab luisschwab force-pushed the chore/bump-msrv-1-85-0 branch from b2249eb to 43515de Compare May 13, 2026 18:18
@luisschwab luisschwab requested a review from jaoleal May 13, 2026 18:18
ServiceFlags::NONE,
port,
rand::random(),
rand::random::<u64>() as usize,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went on a search, it looks like this cast can lead to data-loss on 32-bit devices. Is this something to be worried ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a problem. These random numbers are just random ID's, and the loss doesn't really matter, as this value is only used internally.

I could always just replace them with u32's, but I think it's best to drop those usizes from the structs themselves in favor of u32 or u64. Then we can drop the casts completely.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be done on a follow up, as proposed by yourself on #1014

@luisschwab luisschwab force-pushed the chore/bump-msrv-1-85-0 branch from 43515de to a0d7e24 Compare May 14, 2026 16:14
@luisschwab luisschwab added the BDK Floresta Issues related to the integration of Floresta in BDK label May 14, 2026
@luisschwab luisschwab moved this from In progress to Needs review in Floresta May 14, 2026
@luisschwab luisschwab requested review from JoseSK999 and csgui May 14, 2026 18:21
@luisschwab luisschwab requested a review from moisesPompilio May 14, 2026 20:00
@luisschwab
Copy link
Copy Markdown
Member Author

cc @moisesPompilio this will be needed for your BDK PR

Copy link
Copy Markdown
Member

@jaoleal jaoleal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3a7df87

@JoseSK999
Copy link
Copy Markdown
Member

Rebased needed

luisschwab added 11 commits May 15, 2026 17:47
- Bump the workspace MSRV to 1.85.0
- Add `edition = 2024` to the workspace's `Cargo.toml`
Rust 1.85.0 is stricter when it comes to `unsafe`s.

Before, unsafe functions could be called from within another
functions without wrapping them in an `unsafe` block. Now,
`rustc` 1.85.0 requires that we wrap each call of an unsafe
function in an `unsafe` block.
…test_gbt_with_conflict`

Add the missing `ConflictingTransaction` to the `did_conflict` arm.

This test used to pass pass due to how `rand` v0.8 built the transactions
with the `21` seed. Since `rand`'s RNG behavior is unstable across minor
versions, it now builds a conflicting transaction, which causes a
`ConflictingTransaction` error.
…cpkg.json`

I'm guessing that GitHub very recently changed something about their
`windows-latest` CI runner, which broke Boost installation on the
Windows cross-testing job.

Fix it by pinning `vcpkg` to the version declared on
`rust-bitcoinkernel` v0.2.0 vendored `libbitcoinkernel-sys`
`vcpkg.json` (120deac3062162151622ca4860575a33844ba10b),
which can be found at:

https://github.com/sedited/rust-bitcoinkernel/blob/0eadd82ba2c0bdb07b8321f4da5636ff502c0ea6/libbitcoinkernel-sys/bitcoin/vcpkg.json
@luisschwab luisschwab force-pushed the chore/bump-msrv-1-85-0 branch from 3a7df87 to 4cc3d44 Compare May 15, 2026 21:05
@luisschwab luisschwab requested a review from jaoleal May 15, 2026 21:07
@luisschwab
Copy link
Copy Markdown
Member Author

@JoseSK999 rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BDK Floresta Issues related to the integration of Floresta in BDK CI A change or issue related to CI compatibility dependencies Pull requests that update a dependency file

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

Bump MSRV to 1.85.0

4 participants