Skip to content

Bump warp and begin axum migration#9001

Merged
mergify[bot] merged 14 commits into
sigp:unstablefrom
macladson:lh-axum
Jun 25, 2026
Merged

Bump warp and begin axum migration#9001
mergify[bot] merged 14 commits into
sigp:unstablefrom
macladson:lh-axum

Conversation

@macladson

@macladson macladson commented Mar 18, 2026

Copy link
Copy Markdown
Member

This is an alternative to #8280

Proposed Changes

  • Bump warp to 0.4. This unifies warp and axum onto the same http, hyper, h2, rustls, etc versions.
  • Create axum_utils which contain common functions and types
  • Begins migration of all HTTP API servers from warp to axum

Additional Info

The tls feature was removed in warp 0.4. This is why we pair the axum migration with the bump. Otherwise we would have to implement our own TLS connectivity. Instead, we can rely on axum-server to do it for us.

This also includes a warp patch to remove Sync requirements from warp body types. This (in combination with the warp version bump) allows us to completely do away with warpdrive from the original PR. This means the axum requests are forwarded straight through warp's Tower service natively without any compatibility layer.

I have left the mock execution server on warp as the migration started becoming more complicated than I was expecting and it can easily be left for a future PR.

@michaelsproul

Copy link
Copy Markdown
Member

Getting off warp 0.3 will save us a RUSTSEC --ignore:

mergify Bot pushed a commit that referenced this pull request Mar 21, 2026
Fix the cargo-audit failure caused by:

- https://rustsec.org/advisories/RUSTSEC-2026-0049

We can't fix it completely yet because `warp 0.3` is keeping us on an old version of `rustls`.

Mac's PR here will fix it:

- #9001


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
@jxs jxs self-requested a review March 23, 2026 22:56
@macladson macladson added ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Mar 27, 2026

@chong-he chong-he left a comment

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.

This PR is quite follow-able to me (although I can't say I understand everything).

From my understanding, http_metrics for both BN and VC will be fully on axum after this, but http_api aren't yet. I did some testing to query the APIs and metrics (including some error cases) and can confirm that the behaviour of this PR and Lighthouse v8.1.3 are the same, which is good.

I think this is in a good shape already (of course I could be missing something). I only have some mainly cosmetics comments

Comment thread validator_client/http_metrics/Cargo.toml Outdated
Comment thread common/axum_utils/src/server/builder.rs Outdated
Comment thread common/axum_utils/src/cors.rs Outdated
Comment thread common/axum_utils/src/server/mod.rs
mergify Bot pushed a commit that referenced this pull request Apr 22, 2026
Another `rustls-webpki` audit failure: https://rustsec.org/advisories/RUSTSEC-2026-0104


  Bump `rustls-webpki` to the latest (unaffected) version.
As with the previous `rustls-webpki` vulns, we add an ignore for our older version required by warp 0.3.
This ignore will be resolved by #9001


Co-Authored-By: Mac L <mjladson@pm.me>
@mergify

mergify Bot commented Jun 1, 2026

Copy link
Copy Markdown

This pull request has merge conflicts. Could you please resolve them @macladson? 🙏

@mergify mergify Bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Jun 1, 2026
@mergify mergify Bot added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Jun 18, 2026
@mergify

mergify Bot commented Jun 19, 2026

Copy link
Copy Markdown

Some required checks have failed. Could you please take a look @macladson? 🙏

@mergify mergify Bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. ready-for-review The code is ready for review and removed ready-for-review The code is ready for review waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Jun 19, 2026

@jxs jxs left a comment

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.

Hi Mac, left some comments

Comment thread beacon_node/execution_layer/src/test_utils/mock_builder.rs Outdated
Comment thread beacon_node/execution_layer/src/test_utils/mock_builder.rs
Comment thread beacon_node/http_api/src/beacon/execution_payload_bids.rs Outdated
Comment thread beacon_node/http_api/src/produce_block.rs Outdated
Comment thread common/axum_utils/src/server/builder.rs Outdated
Comment thread common/axum_utils/src/server/mod.rs Outdated
@mergify

mergify Bot commented Jun 23, 2026

Copy link
Copy Markdown

This pull request has merge conflicts. Could you please resolve them @macladson? 🙏

@mergify mergify Bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Jun 23, 2026

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.

These error types are pretty lean now and we could consider consolidating, but I kinda like the distinction

@jxs jxs left a comment

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.

LGTM, thanks Mac!

Comment thread beacon_node/execution_layer/src/test_utils/mock_builder.rs
@mergify

mergify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Queued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Merge Queue Status

This pull request spent 29 minutes 10 seconds in the queue, including 27 minutes 36 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Jun 25, 2026
mergify Bot added a commit that referenced this pull request Jun 25, 2026
@mergify mergify Bot merged commit 8c2a909 into sigp:unstable Jun 25, 2026
38 checks passed
@mergify mergify Bot removed the queued label Jun 25, 2026
@macladson macladson deleted the lh-axum branch June 25, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HTTP-API waiting-on-author The reviewer has suggested changes and awaits thier implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants