Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Conversation

@benalleng
Copy link
Collaborator

This updates the msrv of ohttp-relay as well as bumping the deps up to a higher version that still fall within the msrv the ecosystem has chosen.

This is a relatively new msrv version so all of the deps latest version stlll fallws within the msrv. perhaps there will be future versions that wont but hopefully we have some CI actions to prevent any breaking changes in the future.

@benalleng benalleng marked this pull request as draft August 19, 2025 17:55
@benalleng
Copy link
Collaborator Author

@nothingmuch I have disabled the integration tests for now but when you get a chance maybe we can pair to get these across this finish-line or make a point to disable them until we transition away from some of these deps

@benalleng
Copy link
Collaborator Author

The integration tests are failing due to some failure in the current layout to load the certificates.

A single test

nginx: [emerg] cannot load certificate key "/tmp/nix-shell.tLou6a/key_d0369835-6423-4c35-bddb-35fa575d1ada.pem": PEM_re
ad_bio_PrivateKey() failed (SSL: error:1E08010C:DECODER routines::unsupported:No supported data to decode. Input type: 
PEM)
test integration::test_request_response_tcp ... FAILED

failures:

---- integration::test_request_response_tcp stdout ----
OHTTP relay binding to port [::]:33971
Gateway listening on port 43839

thread 'integration::test_request_response_tcp' (2375590) panicked at tests/integration.rs:181:49:
called `Result::unwrap()` on an `Err` value: hyper_util::client::legacy::Error(Connect, ConnectError("tcp connect error
", 0.0.0.0:37121, Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    integration::test_request_response_tcp

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 3 filtered out; finished in 6.07s

All tests

Details
nginx: [emerg] cannot load certificate key "/tmp/nix-shell.tLou6a/key_16079a54-1bb9-4896-8512-bef3fe61d0bb.pem": PEM_re
ad_bio_PrivateKey() failed (SSL: error:1E08010C:DECODER routines::unsupported:No supported data to decode. Input type: 
PEM)
nginx: [emerg] cannot load certificate key "/tmp/nix-shell.tLou6a/key_202558b8-383a-4e49-831a-3548c39b3d9d.pem": PEM_re
ad_bio_PrivateKey() failed (SSL: error:1E08010C:DECODER routines::unsupported:No supported data to decode. Input type: 
PEM)
nginx: [emerg] cannot load certificate key "/tmp/nix-shell.tLou6a/key_0f5da90f-0d44-4b0d-86d4-13941e624847.pem": PEM_re
ad_bio_PrivateKey() failed (SSL: error:1E08010C:DECODER routines::unsupported:No supported data to decode. Input type: 
PEM)
nginx: [emerg] cannot load certificate key "/tmp/nix-shell.tLou6a/key_fe14985a-625f-4475-8f37-14ab3eead0ee.pem": PEM_re
ad_bio_PrivateKey() failed (SSL: error:1E08010C:DECODER routines::unsupported:No supported data to decode. Input type: 
PEM)
test integration::test_request_response_socket ... FAILED
test integration::bootstrap::ws_bootstrap::test_ws_bootstrap ... FAILED
test integration::bootstrap::connect_bootstrap::test_connect_bootstrap ... FAILED
test integration::test_request_response_tcp ... FAILED

failures:

---- integration::test_request_response_socket stdout ----
Error: Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }

---- integration::bootstrap::ws_bootstrap::test_ws_bootstrap stdout ----
OHTTP relay binding to port [::]:33051
Gateway listening on port 39565

thread 'integration::bootstrap::ws_bootstrap::test_ws_bootstrap' (2375519) panicked at tests/integration.rs:262:26:
Failed to connect: Io(Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- integration::bootstrap::connect_bootstrap::test_connect_bootstrap stdout ----
OHTTP relay binding to port [::]:38553
Gateway listening on port 46161
gateway for proxy: https://0.0.0.0:46161/.well-known/ohttp-gateway

thread 'tokio-runtime-worker' (2375531) panicked at tests/integration.rs:317:56:
called `Result::unwrap()` on an `Err` value: Io(Custom { kind: ConnectionRefused, error: "Connection refused" })

thread 'integration::bootstrap::connect_bootstrap::test_connect_bootstrap' (2375518) panicked at tests/integration.rs:3
20:18:
called `Result::unwrap()` on an `Err` value: JoinError::Panic(Id(9), "called `Result::unwrap()` on an `Err` value: Io(C
ustom { kind: ConnectionRefused, error: \"Connection refused\" })", ...)

---- integration::test_request_response_tcp stdout ----
OHTTP relay binding to port [::]:44153
Gateway listening on port 40277

thread 'integration::test_request_response_tcp' (2375521) panicked at tests/integration.rs:181:49:
called `Result::unwrap()` on an `Err` value: hyper_util::client::legacy::Error(Connect, ConnectError("tcp connect error
", 0.0.0.0:39859, Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }))


failures:
    integration::bootstrap::connect_bootstrap::test_connect_bootstrap
    integration::bootstrap::ws_bootstrap::test_ws_bootstrap
    integration::test_request_response_socket
    integration::test_request_response_tcp

test result: FAILED. 0 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.07s

@benalleng benalleng force-pushed the msrv-update branch 2 times, most recently from 34b8b31 to 659f33c Compare August 20, 2025 17:58
This bumps the msrv for the ohttp relay up to 1.85.0. This changes comes
following the debian stable update to a similar update and many other
projects in the bitcoin world moving to a similar msrv.

This commit does not make any updates to the dependencies yet.
This updates the tokio and hyper tungstenite msrvs to match the
ohttp-relay msrv at 1.85.0.
This commit updates the mockito msrv and the api that changes as a
result to match the new msrv for ohttp relay of 1.85.0
This commits updates dependencies to match the ohttp relay msrv that
dont require source changes or ahve any significant updates to their
features or apis.
@DanGould
Copy link
Collaborator

Hey Ben, I force-pushed over your WIP commit which I think should be testable now

@DanGould DanGould force-pushed the msrv-update branch 2 times, most recently from 4dd8526 to 1d15204 Compare August 25, 2025 21:54
Continue to use ring's crypto by initializing the default provider.
@benalleng
Copy link
Collaborator Author

TACK on 1d15204

@benalleng benalleng marked this pull request as ready for review August 26, 2025 00:36
let https =
ureq::AgentBuilder::new().tls_config(Arc::new(config)).proxy(proxy).build();
// Convert to owned Vec and leak to get &'static [u8]
let cert_static = cert.to_vec().leak();
Copy link
Collaborator Author

@benalleng benalleng Aug 26, 2025

Choose a reason for hiding this comment

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

How does .leak() avoid being considered "unsafe" rust?

@DanGould DanGould merged commit a918c2c into payjoin:main Aug 26, 2025
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants