mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-16 10:18:15 +00:00
Merge branch 'unstable' of https://github.com/sigp/lighthouse into gloas-alpha-spec-9
This commit is contained in:
@@ -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)
|
||||
@@ -26,8 +26,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>,
|
||||
@@ -35,7 +35,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)
|
||||
@@ -59,8 +59,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>,
|
||||
@@ -68,7 +68,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())
|
||||
@@ -87,7 +87,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>,
|
||||
@@ -146,7 +146,7 @@ pub async fn publish_execution_payload_envelope<T: BeaconChainTypes>(
|
||||
PubsubMessage::ExecutionPayload(Box::new(envelope_for_gossip)),
|
||||
)
|
||||
.map_err(|_| {
|
||||
EnvelopeError::BeaconChainError(Arc::new(
|
||||
EnvelopeError::BeaconChainError(Box::new(
|
||||
beacon_chain::BeaconChainError::UnableToPublish,
|
||||
))
|
||||
})
|
||||
@@ -306,8 +306,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
|
||||
@@ -319,7 +319,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)
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user