-
Notifications
You must be signed in to change notification settings - Fork 161
Update Rust, hyper, rocksdb, bitcoin, elements, corepc-node and more #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: new-index
Are you sure you want to change the base?
Conversation
…`, `prometheus` and `signal-hook`
It is no longer `non_exhausive`, as of rust-bitcoin v0.32.7. See rust-bitcoin/rust-bitcoin#4640
Introduces two new dependencies, hyper-util and http-body-util, both official crates under the `hyperium` github org, and drops the `hyperlocal` dependency that is no longer necessary (UNIX socket binding can now be done directly with tokio).
This no longer seems necessary - v28 was released 15 months ago, the Esplora docker setup uses v30, and the tests were updated to use v29 (in the parent commit).
This became a warning since Rust v1.89.0: https://blog.rust-lang.org/2025/08/07/Rust-1.89.0/#mismatched-lifetime-syntaxes-lint
|
Updating Rust appears to have broken the nix build CI, with Should I downgrade? Or is there a way to make this work? |
| let socket = create_socket(&addr); | ||
| socket.listen(511).expect("setting backlog failed"); | ||
| socket | ||
| .set_nonblocking(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was previously done internally by tokio, but has to be set manually with more recent releases:
The caller is responsible for ensuring that the listener is in non-blocking mode. Otherwise all I/O operations on the listener will block the thread, which will cause unexpected behavior.
The recent releases for some crates no longer worked with Rust v1.75.0. The minimal version that does work is v1.88, but I ended up updating to the latest stable, v1.92.0.
I dropped the
bitcoind_0_28feature, which no longer seems necessary. Let me know if you think we should keep it.We don't currently have tests covering the UNIX socket functionality, but I manually verified that it works. (previously it was implemented using the
hyperlocalcrate, but can now be done withtokioandhyperdirectly)More dependency updates followups:
When updating Esplora to use the latest Electrs, we'll also need to update the Rust version to match.
We should replace the
error-chaincrate with a modern alternative (probablythiserrororanyhow?), its been deprecated for years now.But it's a pretty invasive change affecting much of the codebase, so I would at least wait until major pending PRs make it in (specifically Undo stale block entries during reorgs & related optimizations #174).
Also,
error-chainstarted producingunexpected `cfg` condition name: `has_error_description_deprecated`warnings with the latest stable Rust, which I couldn't get to go away (removing thedescription()inerrors.rsdoesn't help). But they seem harmless.It appears that there was some big controversy around
bincodemoving away from github to sourcehut under the profile of an unknown developer that did some suspicious things, which ended up with the project permanently ceasing develpment and proclaiming that "1.3.3 is considered a complete piece of software".v1.3.3 is what we were already using. But given that it was released nearly 5 years ago and won't be maintained going forward, we should probably consider switching away.