Update gloas api routes to match updated spec (#9418)

tldr the routes got pluralized
https://github.com/ethereum/beacon-APIs/pull/613


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
Eitan Seri-Levi
2026-06-05 13:16:06 -07:00
committed by GitHub
parent e78e1d38ba
commit 42e678189c
9 changed files with 88 additions and 88 deletions

View File

@@ -14,8 +14,8 @@ use tracing::{debug, warn};
use types::SignedExecutionPayloadBid;
use warp::{Filter, Rejection, Reply, hyper::Body, hyper::Response};
// POST /eth/v1/beacon/execution_payload_bid (SSZ)
pub(crate) fn post_beacon_execution_payload_bid_ssz<T: BeaconChainTypes>(
// POST /eth/v1/beacon/execution_payload_bids (SSZ)
pub(crate) fn post_beacon_execution_payload_bids_ssz<T: BeaconChainTypes>(
eth_v1: EthV1Filter,
task_spawner_filter: TaskSpawnerFilter<T>,
chain_filter: ChainFilter<T>,
@@ -23,7 +23,7 @@ pub(crate) fn post_beacon_execution_payload_bid_ssz<T: BeaconChainTypes>(
) -> ResponseFilter {
eth_v1
.and(warp::path("beacon"))
.and(warp::path("execution_payload_bid"))
.and(warp::path("execution_payload_bids"))
.and(warp::path::end())
.and(warp::body::bytes())
.and(task_spawner_filter)
@@ -46,8 +46,8 @@ pub(crate) fn post_beacon_execution_payload_bid_ssz<T: BeaconChainTypes>(
.boxed()
}
// POST /eth/v1/beacon/execution_payload_bid
pub(crate) fn post_beacon_execution_payload_bid<T: BeaconChainTypes>(
// POST /eth/v1/beacon/execution_payload_bids
pub(crate) fn post_beacon_execution_payload_bids<T: BeaconChainTypes>(
eth_v1: EthV1Filter,
task_spawner_filter: TaskSpawnerFilter<T>,
chain_filter: ChainFilter<T>,
@@ -55,7 +55,7 @@ pub(crate) fn post_beacon_execution_payload_bid<T: BeaconChainTypes>(
) -> ResponseFilter {
eth_v1
.and(warp::path("beacon"))
.and(warp::path("execution_payload_bid"))
.and(warp::path("execution_payload_bids"))
.and(warp::path::end())
.and(warp::body::json())
.and(task_spawner_filter)

View File

@@ -24,8 +24,8 @@ use warp::{
hyper::{Body, Response},
};
// POST beacon/execution_payload_envelope (SSZ)
pub(crate) fn post_beacon_execution_payload_envelope_ssz<T: BeaconChainTypes>(
// POST beacon/execution_payload_envelopes (SSZ)
pub(crate) fn post_beacon_execution_payload_envelopes_ssz<T: BeaconChainTypes>(
eth_v1: EthV1Filter,
task_spawner_filter: TaskSpawnerFilter<T>,
chain_filter: ChainFilter<T>,
@@ -33,7 +33,7 @@ pub(crate) fn post_beacon_execution_payload_envelope_ssz<T: BeaconChainTypes>(
) -> ResponseFilter {
eth_v1
.and(warp::path("beacon"))
.and(warp::path("execution_payload_envelope"))
.and(warp::path("execution_payload_envelopes"))
.and(warp::path::end())
.and(warp::body::bytes())
.and(task_spawner_filter)
@@ -57,8 +57,8 @@ pub(crate) fn post_beacon_execution_payload_envelope_ssz<T: BeaconChainTypes>(
.boxed()
}
// POST beacon/execution_payload_envelope
pub(crate) fn post_beacon_execution_payload_envelope<T: BeaconChainTypes>(
// POST beacon/execution_payload_envelopes
pub(crate) fn post_beacon_execution_payload_envelopes<T: BeaconChainTypes>(
eth_v1: EthV1Filter,
task_spawner_filter: TaskSpawnerFilter<T>,
chain_filter: ChainFilter<T>,
@@ -66,7 +66,7 @@ pub(crate) fn post_beacon_execution_payload_envelope<T: BeaconChainTypes>(
) -> ResponseFilter {
eth_v1
.and(warp::path("beacon"))
.and(warp::path("execution_payload_envelope"))
.and(warp::path("execution_payload_envelopes"))
.and(warp::path::end())
.and(warp::body::json())
.and(task_spawner_filter.clone())
@@ -85,7 +85,7 @@ pub(crate) fn post_beacon_execution_payload_envelope<T: BeaconChainTypes>(
.boxed()
}
/// Publishes a signed execution payload envelope to the network. Implements
/// `POST /eth/v1/beacon/execution_payload_envelope` per the in-flight beacon-APIs PR
/// `POST /eth/v1/beacon/execution_payload_envelopes` per the in-flight beacon-APIs PR
/// <https://github.com/ethereum/beacon-APIs/pull/580>.
pub async fn publish_execution_payload_envelope<T: BeaconChainTypes>(
envelope: SignedExecutionPayloadEnvelope<T::EthSpec>,
@@ -292,8 +292,8 @@ fn build_gloas_data_columns<T: BeaconChainTypes>(
}
// TODO(gloas): add tests for this endpoint once we support importing payloads into the db
// GET beacon/execution_payload_envelope/{block_id}
pub(crate) fn get_beacon_execution_payload_envelope<T: BeaconChainTypes>(
// GET beacon/execution_payload_envelopes/{block_id}
pub(crate) fn get_beacon_execution_payload_envelopes<T: BeaconChainTypes>(
eth_v1: EthV1Filter,
block_id_or_err: impl Filter<Extract = (BlockId,), Error = Rejection>
+ Clone
@@ -305,7 +305,7 @@ pub(crate) fn get_beacon_execution_payload_envelope<T: BeaconChainTypes>(
) -> ResponseFilter {
eth_v1
.and(warp::path("beacon"))
.and(warp::path("execution_payload_envelope"))
.and(warp::path("execution_payload_envelopes"))
.and(block_id_or_err)
.and(warp::path::end())
.and(task_spawner_filter)

View File

@@ -1,4 +1,4 @@
pub mod execution_payload_bid;
pub mod execution_payload_envelope;
pub mod execution_payload_bids;
pub mod execution_payload_envelopes;
pub mod pool;
pub mod states;