This commit is contained in:
Eitan Seri-Levi
2025-02-02 00:47:10 +03:00
parent 54c9b4dbf7
commit 3c90258468
6 changed files with 18 additions and 18 deletions

View File

@@ -1,10 +1,11 @@
use crate::engines::ForkchoiceState;
use crate::http::{
ENGINE_FORKCHOICE_UPDATED_V1, ENGINE_FORKCHOICE_UPDATED_V2, ENGINE_FORKCHOICE_UPDATED_V3,
ENGINE_GET_BLOBS_V1, ENGINE_GET_CLIENT_VERSION_V1, ENGINE_GET_PAYLOAD_BODIES_BY_HASH_V1,
ENGINE_GET_PAYLOAD_BODIES_BY_RANGE_V1, ENGINE_GET_PAYLOAD_V1, ENGINE_GET_PAYLOAD_V2,
ENGINE_GET_PAYLOAD_V3, ENGINE_GET_PAYLOAD_V4, ENGINE_GET_PAYLOAD_V5, ENGINE_NEW_PAYLOAD_V1,
ENGINE_NEW_PAYLOAD_V2, ENGINE_NEW_PAYLOAD_V3, ENGINE_NEW_PAYLOAD_V4, ENGINE_NEW_PAYLOAD_V5, ENGINE_GET_INCLUSION_LIST_V1
ENGINE_GET_BLOBS_V1, ENGINE_GET_CLIENT_VERSION_V1, ENGINE_GET_INCLUSION_LIST_V1,
ENGINE_GET_PAYLOAD_BODIES_BY_HASH_V1, ENGINE_GET_PAYLOAD_BODIES_BY_RANGE_V1,
ENGINE_GET_PAYLOAD_V1, ENGINE_GET_PAYLOAD_V2, ENGINE_GET_PAYLOAD_V3, ENGINE_GET_PAYLOAD_V4,
ENGINE_GET_PAYLOAD_V5, ENGINE_NEW_PAYLOAD_V1, ENGINE_NEW_PAYLOAD_V2, ENGINE_NEW_PAYLOAD_V3,
ENGINE_NEW_PAYLOAD_V4, ENGINE_NEW_PAYLOAD_V5,
};
use eth2::types::{
BlobsBundle, SsePayloadAttributes, SsePayloadAttributesV1, SsePayloadAttributesV2,

View File

@@ -271,7 +271,7 @@ impl<'a, E: EthSpec> TryFrom<BeaconBlockRef<'a, E>> for NewPayloadRequest<'a, E>
.collect(),
parent_beacon_block_root: block_ref.parent_root,
execution_requests: &block_ref.body.execution_requests,
il_transactions: vec![].into()
il_transactions: vec![].into(),
})),
}
}

View File

@@ -55,7 +55,7 @@ use types::{
use types::{
BeaconStateError, BlindedPayload, ChainSpec, Epoch, ExecPayload, ExecutionPayloadBellatrix,
ExecutionPayloadCapella, ExecutionPayloadElectra, ExecutionPayloadFulu, FullPayload,
ProposerPreparationData, PublicKeyBytes, Signature, Slot, InclusionListTransactions
InclusionListTransactions, ProposerPreparationData, PublicKeyBytes, Signature, Slot,
};
mod block_hash;

View File

@@ -16,7 +16,7 @@ pub fn inclusion_list_duties<T: BeaconChainTypes>(
.epoch()
// TODO(focil) unwrap
.unwrap();
// .map_err(warp_utils::reject::beacon_chain_error)?;
// .map_err(warp_utils::reject::beacon_chain_error)?;
// Determine what the current epoch would be if we fast-forward our system clock by
// `MAXIMUM_GOSSIP_CLOCK_DISPARITY`.
@@ -39,7 +39,7 @@ pub fn inclusion_list_duties<T: BeaconChainTypes>(
.validator_inclusion_list_duties(request_indices, request_epoch, head_block_root)
// TODO(focil) unwrap
.unwrap();
//.map_err(warp_utils::reject::beacon_chain_error)?;
//.map_err(warp_utils::reject::beacon_chain_error)?;
convert_to_api_response(duties, request_indices, dependent_root, chain)
} else if request_epoch > current_epoch + 1 {
Err(warp_utils::reject::custom_bad_request(format!(
@@ -79,7 +79,7 @@ fn convert_to_api_response<T: BeaconChainTypes>(
.validator_pubkey_bytes_many(&usize_indices)
// TODO(focil) unwrap
.unwrap();
// .map_err(warp_utils::reject::beacon_chain_error)?;
// .map_err(warp_utils::reject::beacon_chain_error)?;
let data = duties
.into_iter()

View File

@@ -89,8 +89,8 @@ use types::{
AttesterSlashing, BeaconStateError, ChainSpec, CommitteeCache, ConfigAndPreset, Epoch, EthSpec,
ForkName, ForkVersionedResponse, Hash256, ProposerPreparationData, ProposerSlashing,
RelativeEpoch, SignedAggregateAndProof, SignedBlindedBeaconBlock, SignedBlsToExecutionChange,
SignedContributionAndProof, SignedValidatorRegistrationData, SignedVoluntaryExit, Slot,
SyncCommitteeMessage, SyncContributionData, SignedInclusionList
SignedContributionAndProof, SignedInclusionList, SignedValidatorRegistrationData,
SignedVoluntaryExit, Slot, SyncCommitteeMessage, SyncContributionData,
};
use validator::pubkey_to_validator_index;
use version::{
@@ -3588,11 +3588,9 @@ pub fn serve<T: BeaconChainTypes>(
task_spawner.spawn_async_with_rejection(Priority::P0, async move {
not_synced_filter?;
let current_slot = chain
.slot()
.unwrap();
// TODO(focil) unwrap
// .map_err(warp_utils::reject::beacon_chain_error)?;
let current_slot = chain.slot().unwrap();
// TODO(focil) unwrap
// .map_err(warp_utils::reject::beacon_chain_error)?;
// allow a tolerance of one slot to account for clock skew
//
@@ -3610,7 +3608,7 @@ pub fn serve<T: BeaconChainTypes>(
.map(api_types::GenericResponse::from)
// TODO(focil) unwrap
.unwrap();
// .map_err(warp_utils::reject::beacon_chain_error)?;
// .map_err(warp_utils::reject::beacon_chain_error)?;
Ok::<_, warp::reject::Rejection>(warp::reply::json(&data).into_response())
})
},

View File

@@ -14,7 +14,8 @@ use types::{
SignedBeaconBlock, SignedBeaconBlockAltair, SignedBeaconBlockBase, SignedBeaconBlockBellatrix,
SignedBeaconBlockCapella, SignedBeaconBlockDeneb, SignedBeaconBlockElectra,
SignedBeaconBlockFulu, SignedBlsToExecutionChange, SignedContributionAndProof,
SignedVoluntaryExit, SingleAttestation, SubnetId, SyncCommitteeMessage, SyncSubnetId, SignedInclusionList,
SignedInclusionList, SignedVoluntaryExit, SingleAttestation, SubnetId, SyncCommitteeMessage,
SyncSubnetId,
};
#[derive(Debug, Clone, PartialEq)]