Merge branch 'unstable' into electra-alpha7

This commit is contained in:
Pawan Dhananjay
2024-10-29 11:44:53 -07:00
166 changed files with 3495 additions and 3003 deletions

View File

@@ -44,7 +44,6 @@ use std::path::Path;
use std::sync::Arc;
use std::time::Duration;
use types::data_column_sidecar::{ColumnIndex, DataColumnSidecar, DataColumnSidecarList};
use types::light_client_update::CurrentSyncCommitteeProofLen;
use types::*;
/// On-disk database that stores finalized states efficiently.
@@ -641,15 +640,14 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
pub fn get_sync_committee_branch(
&self,
block_root: &Hash256,
) -> Result<Option<FixedVector<Hash256, CurrentSyncCommitteeProofLen>>, Error> {
) -> Result<Option<MerkleProof>, Error> {
let column = DBColumn::SyncCommitteeBranch;
if let Some(bytes) = self
.hot_db
.get_bytes(column.into(), &block_root.as_ssz_bytes())?
{
let sync_committee_branch: FixedVector<Hash256, CurrentSyncCommitteeProofLen> =
FixedVector::from_ssz_bytes(&bytes)?;
let sync_committee_branch = Vec::<Hash256>::from_ssz_bytes(&bytes)?;
return Ok(Some(sync_committee_branch));
}
@@ -677,7 +675,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
pub fn store_sync_committee_branch(
&self,
block_root: Hash256,
sync_committee_branch: &FixedVector<Hash256, CurrentSyncCommitteeProofLen>,
sync_committee_branch: &MerkleProof,
) -> Result<(), Error> {
let column = DBColumn::SyncCommitteeBranch;
self.hot_db.put_bytes(

View File

@@ -1,4 +1,4 @@
pub use lighthouse_metrics::{set_gauge, try_create_int_gauge, *};
pub use metrics::{set_gauge, try_create_int_gauge, *};
use directory::size_of_dir;
use std::path::Path;