Fix for #6296: Deterministic RNG in peer DAS publish block tests (#7192)

#6296: Deterministic RNG in peer DAS publish block tests


  Made test functions to call publish-block APIs with true for the deterministic RNG boolean parameter while production code with false. This will deterministically shuffle columns for unit tests under broadcast_validation_tests.rs.
This commit is contained in:
SunnysidedJ
2025-04-09 16:35:15 +01:00
committed by GitHub
parent 759b0612b3
commit d96b73152e
9 changed files with 36 additions and 5 deletions

View File

@@ -92,6 +92,7 @@ use operation_pool::{
};
use parking_lot::{Mutex, RwLock, RwLockWriteGuard};
use proto_array::{DoNotReOrg, ProposerHeadError};
use rand::RngCore;
use safe_arith::SafeArith;
use slasher::Slasher;
use slot_clock::SlotClock;
@@ -491,6 +492,8 @@ pub struct BeaconChain<T: BeaconChainTypes> {
pub data_availability_checker: Arc<DataAvailabilityChecker<T>>,
/// The KZG trusted setup used by this chain.
pub kzg: Arc<Kzg>,
/// RNG instance used by the chain. Currently used for shuffling column sidecars in block publishing.
pub rng: Arc<Mutex<Box<dyn RngCore + Send>>>,
}
pub enum BeaconBlockResponseWrapper<E: EthSpec> {