mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Deneb pr updates 2 (#4851)
* use workspace deps in kzg crate * delete unused blobs dp path field * full match on fork name in engine api get payload v3 * only accept v3 payloads on get payload v3 endpoint in mock el * remove FIXMEs related to merge transition tests * move static tx to test utils * default max_per_epoch_activation_churn_limit to mainnet value * remove unnecessary async * remove comment * use task executor in `blob_sidecars` endpoint
This commit is contained in:
@@ -253,7 +253,7 @@ impl BlockId {
|
||||
}
|
||||
|
||||
/// Return the `BlobSidecarList` identified by `self`.
|
||||
pub async fn blob_sidecar_list<T: BeaconChainTypes>(
|
||||
pub fn blob_sidecar_list<T: BeaconChainTypes>(
|
||||
&self,
|
||||
chain: &BeaconChain<T>,
|
||||
) -> Result<BlobSidecarList<T::EthSpec>, warp::Rejection> {
|
||||
@@ -263,12 +263,12 @@ impl BlockId {
|
||||
.map_err(warp_utils::reject::beacon_chain_error)
|
||||
}
|
||||
|
||||
pub async fn blob_sidecar_list_filtered<T: BeaconChainTypes>(
|
||||
pub fn blob_sidecar_list_filtered<T: BeaconChainTypes>(
|
||||
&self,
|
||||
indices: BlobIndicesQuery,
|
||||
chain: &BeaconChain<T>,
|
||||
) -> Result<BlobSidecarList<T::EthSpec>, warp::Rejection> {
|
||||
let blob_sidecar_list = self.blob_sidecar_list(chain).await?;
|
||||
let blob_sidecar_list = self.blob_sidecar_list(chain)?;
|
||||
let blob_sidecar_list_filtered = match indices.indices {
|
||||
Some(vec) => {
|
||||
let list = blob_sidecar_list
|
||||
|
||||
@@ -1729,16 +1729,18 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
.and(block_id_or_err)
|
||||
.and(warp::query::<api_types::BlobIndicesQuery>())
|
||||
.and(warp::path::end())
|
||||
.and(task_spawner_filter.clone())
|
||||
.and(chain_filter.clone())
|
||||
.and(warp::header::optional::<api_types::Accept>("accept"))
|
||||
.and_then(
|
||||
.then(
|
||||
|block_id: BlockId,
|
||||
indices: api_types::BlobIndicesQuery,
|
||||
task_spawner: TaskSpawner<T::EthSpec>,
|
||||
chain: Arc<BeaconChain<T>>,
|
||||
accept_header: Option<api_types::Accept>| {
|
||||
async move {
|
||||
task_spawner.blocking_response_task(Priority::P1, move || {
|
||||
let blob_sidecar_list_filtered =
|
||||
block_id.blob_sidecar_list_filtered(indices, &chain).await?;
|
||||
block_id.blob_sidecar_list_filtered(indices, &chain)?;
|
||||
match accept_header {
|
||||
Some(api_types::Accept::Ssz) => Response::builder()
|
||||
.status(200)
|
||||
@@ -1755,7 +1757,7 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
))
|
||||
.into_response()),
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -75,8 +75,7 @@ pub async fn publish_block<T: BeaconChainTypes, B: IntoGossipVerifiedBlockConten
|
||||
.unwrap_or_else(|| Duration::from_secs(0));
|
||||
|
||||
info!(log, "Signed block published to network via HTTP API"; "slot" => block.slot(), "publish_delay" => ?publish_delay);
|
||||
// Send the block, regardless of whether or not it is valid. The API
|
||||
// specification is very clear that this is the desired behaviour.
|
||||
|
||||
match block.as_ref() {
|
||||
SignedBeaconBlock::Base(_)
|
||||
| SignedBeaconBlock::Altair(_)
|
||||
|
||||
Reference in New Issue
Block a user