From 44515b8cbeb5f0733518d95a1fbe783df9212c13 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Wed, 5 Oct 2022 17:20:54 -0400 Subject: [PATCH] cargo fix --- beacon_node/beacon_chain/src/blob_verification.rs | 7 +++---- beacon_node/beacon_chain/src/execution_payload.rs | 3 +-- beacon_node/http_api/src/publish_blobs.rs | 11 ++++------- .../src/beacon_processor/worker/gossip_methods.rs | 6 +++--- consensus/types/src/blobs_sidecar.rs | 2 +- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/beacon_node/beacon_chain/src/blob_verification.rs b/beacon_node/beacon_chain/src/blob_verification.rs index 90709d581..dd2d1badc 100644 --- a/beacon_node/beacon_chain/src/blob_verification.rs +++ b/beacon_node/beacon_chain/src/blob_verification.rs @@ -2,11 +2,10 @@ use derivative::Derivative; use slot_clock::SlotClock; use crate::beacon_chain::{BeaconChain, BeaconChainTypes, MAXIMUM_GOSSIP_CLOCK_DISPARITY}; -use crate::{block_verification::get_validator_pubkey_cache, BeaconChainError}; +use crate::{BeaconChainError}; use bls::PublicKey; -use std::sync::Arc; use types::{ - consts::eip4844::BLS_MODULUS, BeaconStateError, BlobsSidecar, EthSpec, Hash256, + consts::eip4844::BLS_MODULUS, BeaconStateError, Hash256, SignedBlobsSidecar, Slot, }; @@ -105,7 +104,7 @@ impl<'a, T: BeaconChainTypes> VerifiedBlobsSidecar<'a, T> { chain: &BeaconChain, ) -> Result { let blob_slot = blob_sidecar.message.beacon_block_slot; - let blob_root = blob_sidecar.message.beacon_block_root; + let _blob_root = blob_sidecar.message.beacon_block_root; // Do not gossip or process blobs from future or past slots. let latest_permissible_slot = chain .slot_clock diff --git a/beacon_node/beacon_chain/src/execution_payload.rs b/beacon_node/beacon_chain/src/execution_payload.rs index 642fae528..768434330 100644 --- a/beacon_node/beacon_chain/src/execution_payload.rs +++ b/beacon_node/beacon_chain/src/execution_payload.rs @@ -12,7 +12,6 @@ use crate::{ BeaconChain, BeaconChainError, BeaconChainTypes, BlockError, BlockProductionError, ExecutionPayloadError, }; -use execution_layer::json_structures::JsonBlobBundlesV1; use execution_layer::{BuilderParams, PayloadStatus}; use fork_choice::{InvalidationOperation, PayloadVerificationStatus}; use proto_array::{Block as ProtoBlock, ExecutionStatus}; @@ -26,7 +25,7 @@ use std::sync::Arc; use tokio::task::JoinHandle; use tree_hash::TreeHash; use types::{ - BeaconBlockRef, BeaconState, BeaconStateError, Blob, BlobsSidecar, EthSpec, ExecPayload, + BeaconBlockRef, BeaconState, BeaconStateError, Blob, EthSpec, ExecPayload, ExecutionBlockHash, Hash256, KzgCommitment, SignedBeaconBlock, Slot, }; diff --git a/beacon_node/http_api/src/publish_blobs.rs b/beacon_node/http_api/src/publish_blobs.rs index 41d76c61c..5748ab696 100644 --- a/beacon_node/http_api/src/publish_blobs.rs +++ b/beacon_node/http_api/src/publish_blobs.rs @@ -1,16 +1,13 @@ use crate::metrics; -use beacon_chain::validator_monitor::{get_block_delay_ms, get_slot_delay_ms, timestamp_now}; -use beacon_chain::{BeaconChain, BeaconChainTypes, BlockError, CountUnrealized}; +use beacon_chain::validator_monitor::{get_slot_delay_ms, timestamp_now}; +use beacon_chain::{BeaconChain, BeaconChainTypes}; use lighthouse_network::PubsubMessage; use network::NetworkMessage; -use slog::{crit, error, info, warn, Logger}; -use slot_clock::SlotClock; +use slog::{Logger}; use std::sync::Arc; use tokio::sync::mpsc::UnboundedSender; -use tree_hash::TreeHash; use types::{ - BlindedPayload, ExecPayload, ExecutionBlockHash, ExecutionPayload, FullPayload, Hash256, - SignedBeaconBlock, SignedBlobsSidecar, + SignedBlobsSidecar, }; use warp::Rejection; diff --git a/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs b/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs index b59537a1d..2cabd1ba3 100644 --- a/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs +++ b/beacon_node/network/src/beacon_processor/worker/gossip_methods.rs @@ -2245,10 +2245,10 @@ impl Worker { BlobError::PastSlot { .. } => { self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Ignore); } - BlobError::BeaconChainError(e) => { + BlobError::BeaconChainError(_e) => { self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Ignore); } - BlobError::BlobOutOfRange { blob_index } => { + BlobError::BlobOutOfRange { blob_index: _ } => { self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Reject); } BlobError::InvalidKZGCommitment => { @@ -2257,7 +2257,7 @@ impl Worker { BlobError::ProposalSignatureInvalid => { self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Reject); } - BlobError::RepeatSidecar { proposer, slot } => { + BlobError::RepeatSidecar { proposer: _, slot: _ } => { self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Ignore); } BlobError::UnknownHeadBlock { beacon_block_root } => { diff --git a/consensus/types/src/blobs_sidecar.rs b/consensus/types/src/blobs_sidecar.rs index 5003a97a6..4e9174d94 100644 --- a/consensus/types/src/blobs_sidecar.rs +++ b/consensus/types/src/blobs_sidecar.rs @@ -1,5 +1,5 @@ use crate::kzg_proof::KzgProof; -use crate::{BeaconBlock, Blob, EthSpec, Hash256, SignedRoot, Slot}; +use crate::{Blob, EthSpec, Hash256, SignedRoot, Slot}; use serde_derive::{Deserialize, Serialize}; use ssz::Encode; use ssz_derive::{Decode, Encode};