[SQUASHED] Optionally skip RANDAO verif during block production (#3116)

This commit is contained in:
Michael Sproul
2022-03-25 16:30:24 +11:00
parent c5212d0f98
commit eb0324aa6b
7 changed files with 223 additions and 18 deletions

View File

@@ -2,7 +2,7 @@ pub use crate::persisted_beacon_chain::PersistedBeaconChain;
pub use crate::{
beacon_chain::{BEACON_CHAIN_DB_KEY, ETH1_CACHE_DB_KEY, FORK_CHOICE_DB_KEY, OP_POOL_DB_KEY},
migrate::MigratorConfig,
BeaconChainError,
BeaconChainError, ProduceBlockVerification,
};
use crate::{
builder::{BeaconChainBuilder, Witness},
@@ -605,7 +605,14 @@ where
let (block, state) = self
.chain
.produce_block_on_state(state, None, slot, randao_reveal, Some(graffiti))
.produce_block_on_state(
state,
None,
slot,
randao_reveal,
Some(graffiti),
ProduceBlockVerification::VerifyRandao,
)
.unwrap();
let signed_block = block.sign(
@@ -659,7 +666,14 @@ where
let (block, state) = self
.chain
.produce_block_on_state(state, None, slot, randao_reveal, Some(graffiti))
.produce_block_on_state(
state,
None,
slot,
randao_reveal,
Some(graffiti),
ProduceBlockVerification::VerifyRandao,
)
.unwrap();
let signed_block = block.sign(