diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f79217b..68186c23 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,7 +94,7 @@ jobs: 7z a ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.zip target\${{ matrix.target }}\release\${{ matrix.name }}.exe - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }} path: | @@ -176,7 +176,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: ./artifacts diff --git a/Cargo.lock b/Cargo.lock index 52dac066..798bb936 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -391,7 +391,7 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower 0.5.0", + "tower 0.5.2", "tracing", ] @@ -437,7 +437,7 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower 0.5.0", + "tower 0.5.2", "tracing", "url", "wasmtimer", @@ -587,7 +587,7 @@ dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", "const-hex", - "heck 0.5.0", + "heck", "indexmap", "proc-macro-error2", "proc-macro2", @@ -606,7 +606,7 @@ dependencies = [ "alloy-json-abi", "const-hex", "dunce", - "heck 0.5.0", + "heck", "proc-macro2", "quote", "serde_json", @@ -651,7 +651,7 @@ dependencies = [ "serde_json", "thiserror 2.0.6", "tokio", - "tower 0.5.0", + "tower 0.5.2", "tracing", "url", "wasmtimer", @@ -667,7 +667,7 @@ dependencies = [ "alloy-transport", "reqwest", "serde_json", - "tower 0.5.0", + "tower 0.5.2", "tracing", "url", ] @@ -985,14 +985,14 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "6d6fd624c75e18b3b4c6b9caf42b1afe24437daaee904069137d8bab077be8b8" dependencies = [ - "async-trait", "axum-core", "axum-macros", "bytes", + "form_urlencoded", "futures-util", "http", "http-body", @@ -1012,7 +1012,7 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 1.0.1", "tokio", - "tower 0.4.13", + "tower 0.5.2", "tower-layer", "tower-service", "tracing", @@ -1020,11 +1020,10 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "df1362f362fd16024ae199c1970ce98f9661bf5ef94b9808fee734bc3698b733" dependencies = [ - "async-trait", "bytes", "futures-util", "http", @@ -1033,7 +1032,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", "tracing", @@ -1041,9 +1040,9 @@ dependencies = [ [[package]] name = "axum-extra" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0be6ea09c9b96cb5076af0de2e383bd2bc0c18f827cf1967bdd353e0b910d733" +checksum = "460fc6f625a1f7705c6cf62d0d070794e94668988b1c38111baeec177c715f7b" dependencies = [ "axum", "axum-core", @@ -1056,19 +1055,17 @@ dependencies = [ "mime", "pin-project-lite", "serde", - "tower 0.4.13", + "tower 0.5.2", "tower-layer", "tower-service", - "tracing", ] [[package]] name = "axum-macros" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00c055ee2d014ae5981ce1016374e8213682aa14d9bf40e48ab48b5f3ef20eaa" +checksum = "604fde5e028fea851ce1d8570bbdc034bec850d157f7569d10f347d06808c05c" dependencies = [ - "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.90", @@ -1305,6 +1302,7 @@ version = "0.5.0" dependencies = [ "aes 0.8.4", "alloy", + "async-trait", "axum", "base64 0.22.1", "bimap", @@ -1485,7 +1483,7 @@ version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn 2.0.90", @@ -2449,12 +2447,6 @@ dependencies = [ "http", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -2849,9 +2841,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "memchr" @@ -4132,7 +4124,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "rustversion", @@ -4498,16 +4490,18 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36b837f86b25d7c0d7988f00a54e74739be6477f2aac6201b8f429a7569991b7" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", + "tokio", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -4518,9 +4512,9 @@ checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" diff --git a/Cargo.toml b/Cargo.toml index c8e5ecc3..cd60da32 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,8 +41,8 @@ ssz_types = "0.8" ethereum_serde_utils = "0.7.0" # networking -axum = { version = "0.7.5", features = ["macros"] } -axum-extra = { version = "0.9.3", features = ["typed-header"] } +axum = { version = "0.8.1", features = ["macros"] } +axum-extra = { version = "0.10.0", features = ["typed-header"] } reqwest = { version = "0.12.4", features = ["json", "stream"] } headers = "0.4.0" diff --git a/crates/common/Cargo.toml b/crates/common/Cargo.toml index 5cb8a410..1ff1c979 100644 --- a/crates/common/Cargo.toml +++ b/crates/common/Cargo.toml @@ -17,6 +17,7 @@ reqwest.workspace = true # async / threads tokio.workspace = true +async-trait.workspace = true # serialization toml.workspace = true diff --git a/crates/common/src/pbs/constants.rs b/crates/common/src/pbs/constants.rs index 07f9faf4..3da8d96d 100644 --- a/crates/common/src/pbs/constants.rs +++ b/crates/common/src/pbs/constants.rs @@ -2,7 +2,7 @@ use crate::constants::COMMIT_BOOST_VERSION; pub const BUILDER_API_PATH: &str = "/eth/v1/builder"; -pub const GET_HEADER_PATH: &str = "/header/:slot/:parent_hash/:pubkey"; +pub const GET_HEADER_PATH: &str = "/header/{slot}/{parent_hash}/{pubkey}"; pub const GET_STATUS_PATH: &str = "/status"; pub const REGISTER_VALIDATOR_PATH: &str = "/validators"; pub const SUBMIT_BLOCK_PATH: &str = "/blinded_blocks"; diff --git a/crates/common/src/pbs/event.rs b/crates/common/src/pbs/event.rs index f7954907..d4049781 100644 --- a/crates/common/src/pbs/event.rs +++ b/crates/common/src/pbs/event.rs @@ -1,8 +1,8 @@ use std::net::SocketAddr; use alloy::{primitives::B256, rpc::types::beacon::relay::ValidatorRegistration}; +use async_trait::async_trait; use axum::{ - async_trait, extract::State, response::{IntoResponse, Response}, routing::post,