Skip to content

reenable https support#4238

Merged
MartinquaXD merged 2 commits intomainfrom
reenable-https
Mar 6, 2026
Merged

reenable https support#4238
MartinquaXD merged 2 commits intomainfrom
reenable-https

Conversation

@MartinquaXD
Copy link
Contributor

Description

When replacing the alloy dependency with its sub-depdencies I let compilation errors guide me which features need to be enabled. However, this was not enough since https support needs to be enabled via a feature and if that's missing we'll only encounter runtime errors but not compile time errors.
reqwest will throw errors like invalid URL, scheme is not http.

Changes

Enabled https on the workspace level to avoid feature unification causing us to miss https support in future edge cases
Added a unit test to ensure that https requests succeed.

How to test

new unit test

@MartinquaXD MartinquaXD requested a review from a team as a code owner March 6, 2026 08:27
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly re-enables HTTPS support for alloy-provider by adding the reqwest-default-tls feature flag at the workspace level. It also introduces an integration test to verify that HTTPS connections to an RPC endpoint are successful. My review identifies a potential reliability issue with the new test, which has been kept as it does not contradict any existing rules.

@MartinquaXD MartinquaXD enabled auto-merge March 6, 2026 08:51
@MartinquaXD MartinquaXD disabled auto-merge March 6, 2026 08:58
Copy link
Contributor

@jmg-duarte jmg-duarte left a comment

Choose a reason for hiding this comment

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

Not worth blocking over my question

let provider = Web3::new_from_url("https://rpc.mevblocker.io");
let response = provider.provider.get_block(BlockId::latest()).await;

if let Err(err) = response {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there no more specific matching?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, and no. When printing the error you get this:

Transport(Custom("batch call failed: Transport(Custom(reqwest::Error { kind: Request, url: \"https://rpc.mevblocker.io/\", source: hyper_util::client::legacy::Error(Connect, ConnectError(\"invalid URL, scheme is not http\")) }))"))

We could try to match down to the ConnectError but it seems to be the case that the connection could fail for other reasons than https support. Also the fact that the error variant identifier contains legacy is not very confidence inspiring.
Given that this check should only kick in when mevblocker is down I think this should be sufficient.

Copy link
Contributor

Choose a reason for hiding this comment

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

Matching on transport was good enough tbh, but for what it is, this works just fine and once it breaks again we'll review

@MartinquaXD MartinquaXD added this pull request to the merge queue Mar 6, 2026
Merged via the queue into main with commit ae83cf7 Mar 6, 2026
19 checks passed
@MartinquaXD MartinquaXD deleted the reenable-https branch March 6, 2026 09:23
@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2026
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.

4 participants