Skip to content

Commit d42cbbe

Browse files
committed
Fix obvious mistakes
1 parent 1f59e20 commit d42cbbe

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

beacon_node/beacon_chain/src/data_availability_checker.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,8 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
450450
executed_block: AvailabilityPendingExecutedBlock<T::EthSpec>,
451451
) -> Result<Availability<T::EthSpec>, AvailabilityCheckError> {
452452
let block = executed_block.as_block();
453-
self.partial_assembler
454-
.init(block.canonical_root(), block)
455-
.map_err(Error::PartialAssemblerError)?;
453+
// Ignore error which happens at pre-fulu blocks
454+
let _ = self.partial_assembler.init(block.canonical_root(), block);
456455
self.availability_cache.put_executed_block(executed_block)
457456
}
458457

@@ -464,9 +463,8 @@ impl<T: BeaconChainTypes> DataAvailabilityChecker<T> {
464463
block: Arc<SignedBeaconBlock<T::EthSpec>>,
465464
source: BlockImportSource,
466465
) -> Result<(), Error> {
467-
self.partial_assembler
468-
.init(block_root, block.as_ref())
469-
.map_err(Error::PartialAssemblerError)?;
466+
// Ignore error which happens at pre-fulu blocks
467+
let _ = self.partial_assembler.init(block_root, block.as_ref());
470468
self.availability_cache
471469
.put_pre_execution_block(block_root, block, source)
472470
}

beacon_node/beacon_chain/src/partial_data_column_assembler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl<E: EthSpec> PartialDataColumnAssembler<E> {
4040
where
4141
T: TryInto<PartialDataColumnHeader<E>>,
4242
{
43-
let assemblies = self.assemblies.write();
43+
let mut assemblies = self.assemblies.write();
4444

4545
if assemblies.contains(&block_root) {
4646
return Ok(false);
@@ -53,7 +53,7 @@ impl<E: EthSpec> PartialDataColumnAssembler<E> {
5353
columns: HashMap::new(),
5454
};
5555

56-
self.assemblies.write().put(block_root, assembly);
56+
assemblies.put(block_root, assembly);
5757

5858
Ok(true)
5959
}

crypto/kzg/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ pub use crate::{
1313
};
1414

1515
pub use c_kzg::{
16-
BYTES_PER_BLOB, BYTES_PER_COMMITMENT, BYTES_PER_FIELD_ELEMENT, BYTES_PER_PROOF, Blob, Bytes32,
17-
Bytes48, FIELD_ELEMENTS_PER_BLOB, KzgSettings,
16+
Blob, Bytes32, Bytes48, KzgSettings, BYTES_PER_BLOB, BYTES_PER_COMMITMENT,
17+
BYTES_PER_FIELD_ELEMENT, BYTES_PER_PROOF, FIELD_ELEMENTS_PER_BLOB,
1818
};
1919

2020
use crate::trusted_setup::load_trusted_setup;
2121
use rayon::prelude::*;
2222
pub use rust_eth_kzg::{
23-
Cell, CellIndex as CellID, CellRef, TrustedSetup as PeerDASTrustedSetup,
2423
constants::{BYTES_PER_CELL, CELLS_PER_EXT_BLOB},
24+
Cell, CellIndex as CellID, CellRef, TrustedSetup as PeerDASTrustedSetup,
2525
};
26-
use tracing::{Span, instrument};
26+
use tracing::{instrument, Span};
2727

2828
/// Disables the fixed-base multi-scalar multiplication optimization for computing
2929
/// cell KZG proofs, because `rust-eth-kzg` already handles the precomputation.

0 commit comments

Comments
 (0)