Merge remote-tracking branch 'origin/deneb-free-blobs' into tree-states-deneb

This commit is contained in:
Michael Sproul
2023-10-11 11:52:39 +11:00
11 changed files with 27 additions and 34 deletions

View File

@@ -388,7 +388,7 @@ pub struct KzgVerifiedBlob<T: EthSpec> {
impl<T: EthSpec> PartialOrd for KzgVerifiedBlob<T> {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
self.blob.partial_cmp(&other.blob)
Some(self.cmp(other))
}
}

View File

@@ -67,7 +67,7 @@ impl CheckpointMap {
pub fn insert(&mut self, checkpoint: Checkpoint, eth1_finalization_data: Eth1FinalizationData) {
self.store
.entry(checkpoint.epoch)
.or_insert_with(Vec::new)
.or_default()
.push((checkpoint.root, eth1_finalization_data));
// faster to reduce size after the fact than do pre-checking to see

View File

@@ -178,20 +178,17 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
let signature_set = signed_blocks
.iter()
.zip_eq(block_roots)
.filter_map(|(block, block_root)| {
(block_root != self.genesis_block_root).then(|| {
block_proposal_signature_set_from_parts(
block,
Some(block_root),
block.message().proposer_index(),
&self.spec.fork_at_epoch(block.message().epoch()),
self.genesis_validators_root,
|validator_index| {
pubkey_cache.get(validator_index).cloned().map(Cow::Owned)
},
&self.spec,
)
})
.filter(|&(_block, block_root)| (block_root != self.genesis_block_root))
.map(|(block, block_root)| {
block_proposal_signature_set_from_parts(
block,
Some(block_root),
block.message().proposer_index(),
&self.spec.fork_at_epoch(block.message().epoch()),
self.genesis_validators_root,
|validator_index| pubkey_cache.get(validator_index).cloned().map(Cow::Owned),
&self.spec,
)
})
.collect::<Result<Vec<_>, _>>()
.map_err(HistoricalBlockError::SignatureSet)