Skip to content

Conversation

yeastplume
Copy link
Member

This PR updates several long-overdue dependencies:

  • Tokio: upgraded to version 1.x

  • Hyper: upgraded to version 0.14

  • Hyper-rustls: upgrade to 0.23

  • Tokio-util: upgrade version 0.7

  • Rustls: Added as an explicit dependency at version 0.20

  • HTTP Connector Fix: Modified the HTTP connector to allow both HTTP and HTTPS connections for testing purposes.

This will likely require extensive testing once reviewed and merged into master. I'll likely move onto upgrading hyper once these changes are sufficiently verified.

@yeastplume yeastplume requested review from phyro and tromp March 2, 2025 13:56
let listener = TcpListener::bind(&addr).await.expect("failed to bind");

let tls_stream = async_stream::stream! {
loop {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this need a loop that was not needed before?

Copy link
Member Author

@yeastplume yeastplume Mar 8, 2025

Choose a reason for hiding this comment

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

Without the loop it would handle a single connection before stopping, this is the common pattern in this particular version of hyper (and beyond, I think, though we'll get to updating hyper to the latest in a future PR). An example here https://github.com/hs-CN/async-rustls-stream/blob/ec4298493353d3fae6f86e106d07543b9f1bea56/examples/server_client.rs#L38

}
}
}
.for_each(move |socket| {
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't believe how bad git is at diffing this change. It looks like it matches perfectly from the old line 611 vs this line 619 down, but git manages to mismatch it all...

Copy link
Contributor

@tromp tromp left a comment

Choose a reason for hiding this comment

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

It all looks perfectly acceptable. Just wondering about the introduction of the two loops...

@yeastplume yeastplume merged commit 8e79856 into mimblewimble:master Mar 8, 2025
12 checks passed
bayk pushed a commit to mwcproject/mwc-node that referenced this pull request Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants