cargo fix and some test fixes
This commit is contained in:
parent
fe6fc55449
commit
7520651515
@ -3622,7 +3622,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
}),
|
||||
BeaconState::Capella(_) => {
|
||||
let sync_aggregate = get_sync_aggregate()?;
|
||||
let (execution_payload, blobs) =
|
||||
let (execution_payload, _blobs) =
|
||||
get_execution_payload_and_blobs(self, &state, proposer_index)?;
|
||||
//FIXME(sean) get blobs
|
||||
BeaconBlock::Capella(BeaconBlockCapella {
|
||||
|
@ -520,9 +520,9 @@ pub async fn prepare_execution_payload_and_blobs<
|
||||
T: BeaconChainTypes,
|
||||
Payload: ExecPayload<T::EthSpec>,
|
||||
>(
|
||||
chain: &BeaconChain<T>,
|
||||
state: &BeaconState<T::EthSpec>,
|
||||
proposer_index: u64,
|
||||
_chain: &BeaconChain<T>,
|
||||
_state: &BeaconState<T::EthSpec>,
|
||||
_proposer_index: u64,
|
||||
) -> Result<
|
||||
Option<(
|
||||
Payload,
|
||||
|
@ -9,7 +9,7 @@ pub use types::{
|
||||
Address, EthSpec, ExecutionBlockHash, ExecutionPayload, ExecutionPayloadHeader, FixedVector,
|
||||
Hash256, Uint256, VariableList,
|
||||
};
|
||||
use types::{Blob, KZGCommitment};
|
||||
use types::{KZGCommitment};
|
||||
|
||||
pub mod auth;
|
||||
pub mod http;
|
||||
|
@ -890,12 +890,12 @@ impl<T: EthSpec> ExecutionLayer<T> {
|
||||
|
||||
pub async fn get_blob<T: EthSpec>(
|
||||
&self,
|
||||
parent_hash: Hash256,
|
||||
timestamp: u64,
|
||||
random: Hash256,
|
||||
finalized_block_hash: Hash256,
|
||||
proposer_index: u64,
|
||||
versioned_hash: Hash256,
|
||||
_parent_hash: Hash256,
|
||||
_timestamp: u64,
|
||||
_random: Hash256,
|
||||
_finalized_block_hash: Hash256,
|
||||
_proposer_index: u64,
|
||||
_versioned_hash: Hash256,
|
||||
) -> Result<BlobDetailsV1, Error> {
|
||||
todo!()
|
||||
}
|
||||
|
@ -193,14 +193,17 @@ mod tests {
|
||||
let mut chain_spec = Spec::default_spec();
|
||||
let altair_fork_epoch = Epoch::new(1);
|
||||
let merge_fork_epoch = Epoch::new(2);
|
||||
let capella_fork_epoch = Epoch::new(3);
|
||||
|
||||
chain_spec.altair_fork_epoch = Some(altair_fork_epoch);
|
||||
chain_spec.bellatrix_fork_epoch = Some(merge_fork_epoch);
|
||||
chain_spec.capella_fork_epoch = Some(capella_fork_epoch);
|
||||
|
||||
let current_slot = match fork_name {
|
||||
ForkName::Base => Slot::new(0),
|
||||
ForkName::Altair => altair_fork_epoch.start_slot(Spec::slots_per_epoch()),
|
||||
ForkName::Merge => merge_fork_epoch.start_slot(Spec::slots_per_epoch()),
|
||||
ForkName::Capella => capella_fork_epoch.start_slot(Spec::slots_per_epoch()),
|
||||
};
|
||||
ForkContext::new::<Spec>(current_slot, Hash256::zero(), &chain_spec)
|
||||
}
|
||||
|
@ -677,14 +677,17 @@ mod tests {
|
||||
let mut chain_spec = Spec::default_spec();
|
||||
let altair_fork_epoch = Epoch::new(1);
|
||||
let merge_fork_epoch = Epoch::new(2);
|
||||
let capella_fork_epoch = Epoch::new(3);
|
||||
|
||||
chain_spec.altair_fork_epoch = Some(altair_fork_epoch);
|
||||
chain_spec.bellatrix_fork_epoch = Some(merge_fork_epoch);
|
||||
chain_spec.capella_fork_epoch = Some(capella_fork_epoch);
|
||||
|
||||
let current_slot = match fork_name {
|
||||
ForkName::Base => Slot::new(0),
|
||||
ForkName::Altair => altair_fork_epoch.start_slot(Spec::slots_per_epoch()),
|
||||
ForkName::Merge => merge_fork_epoch.start_slot(Spec::slots_per_epoch()),
|
||||
ForkName::Capella => capella_fork_epoch.start_slot(Spec::slots_per_epoch()),
|
||||
};
|
||||
ForkContext::new::<Spec>(current_slot, Hash256::zero(), &chain_spec)
|
||||
}
|
||||
|
@ -32,14 +32,17 @@ pub fn fork_context(fork_name: ForkName) -> ForkContext {
|
||||
let mut chain_spec = E::default_spec();
|
||||
let altair_fork_epoch = Epoch::new(1);
|
||||
let merge_fork_epoch = Epoch::new(2);
|
||||
let capella_fork_epoch = Epoch::new(3);
|
||||
|
||||
chain_spec.altair_fork_epoch = Some(altair_fork_epoch);
|
||||
chain_spec.bellatrix_fork_epoch = Some(merge_fork_epoch);
|
||||
chain_spec.capella_fork_epoch = Some(capella_fork_epoch);
|
||||
|
||||
let current_slot = match fork_name {
|
||||
ForkName::Base => Slot::new(0),
|
||||
ForkName::Altair => altair_fork_epoch.start_slot(E::slots_per_epoch()),
|
||||
ForkName::Merge => merge_fork_epoch.start_slot(E::slots_per_epoch()),
|
||||
ForkName::Capella => capella_fork_epoch.start_slot(E::slots_per_epoch()),
|
||||
};
|
||||
ForkContext::new::<E>(current_slot, Hash256::zero(), &chain_spec)
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ use std::task::Context;
|
||||
use std::time::Duration;
|
||||
use std::{cmp, collections::HashSet};
|
||||
use task_executor::TaskExecutor;
|
||||
use tokio::sync::{mpsc, oneshot};
|
||||
use tokio::sync::{mpsc};
|
||||
use types::{
|
||||
Attestation, AttesterSlashing, BlobsSidecar, Hash256, ProposerSlashing,
|
||||
SignedAggregateAndProof, SignedBeaconBlock, SignedContributionAndProof, SignedVoluntaryExit,
|
||||
|
@ -695,13 +695,13 @@ impl<T: BeaconChainTypes> Worker<T> {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn process_gossip_blob(
|
||||
self,
|
||||
message_id: MessageId,
|
||||
peer_id: PeerId,
|
||||
peer_client: Client,
|
||||
blob: BlobsSidecar<T::EthSpec>,
|
||||
reprocess_tx: mpsc::Sender<ReprocessQueueMessage<T>>,
|
||||
duplicate_cache: DuplicateCache,
|
||||
seen_duration: Duration,
|
||||
_message_id: MessageId,
|
||||
_peer_id: PeerId,
|
||||
_peer_client: Client,
|
||||
_blob: BlobsSidecar<T::EthSpec>,
|
||||
_reprocess_tx: mpsc::Sender<ReprocessQueueMessage<T>>,
|
||||
_duplicate_cache: DuplicateCache,
|
||||
_seen_duration: Duration,
|
||||
) {
|
||||
//FIXME(sean)
|
||||
}
|
||||
|
@ -125,9 +125,9 @@ impl<T: BeaconChainTypes> Worker<T> {
|
||||
|
||||
pub fn handle_tx_blobs_by_range_request(
|
||||
&self,
|
||||
peer_id: PeerId,
|
||||
request_id: PeerRequestId,
|
||||
mut req: TxBlobsByRangeRequest,
|
||||
_peer_id: PeerId,
|
||||
_request_id: PeerRequestId,
|
||||
_req: TxBlobsByRangeRequest,
|
||||
) {
|
||||
//FIXME(sean)
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ use std::ops::Sub;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use tokio::sync::mpsc;
|
||||
use types::{BlobsSidecar, Epoch, EthSpec, Hash256, SignedBeaconBlock, Slot};
|
||||
use types::{BlobsSidecar, EthSpec, Hash256, SignedBeaconBlock, Slot};
|
||||
|
||||
/// The number of slots ahead of us that is allowed before requesting a long-range (batch) Sync
|
||||
/// from a peer. If a peer is within this tolerance (forwards or backwards), it is treated as a
|
||||
|
@ -1,9 +1,8 @@
|
||||
use crate::{Blob, BlobsSidecar, EthSpec, Hash256, Slot};
|
||||
use crate::{BlobsSidecar, EthSpec};
|
||||
use bls::Signature;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use ssz::Encode;
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use ssz_types::VariableList;
|
||||
use tree_hash::TreeHash;
|
||||
use tree_hash_derive::TreeHash;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user