diff --git a/consensus/proto_array/src/proto_array_fork_choice.rs b/consensus/proto_array/src/proto_array_fork_choice.rs index 6db1ac132f3..5e106ae1fa2 100644 --- a/consensus/proto_array/src/proto_array_fork_choice.rs +++ b/consensus/proto_array/src/proto_array_fork_choice.rs @@ -542,7 +542,8 @@ impl ProtoArrayForkChoice { // Check shuffling stability. let shuffling_stable = re_org_block_slot % E::slots_per_epoch() != 0; if !shuffling_stable { - return Err(DoNotReOrg::ShufflingUnstable.into()); + // [JC] Allow re-orgs to happen on epoch boundaries for testing. + // return Err(DoNotReOrg::ShufflingUnstable.into()); } // Check FFG. diff --git a/validator_client/src/block_service.rs b/validator_client/src/block_service.rs index 3b37492377f..8462f6db0b8 100644 --- a/validator_client/src/block_service.rs +++ b/validator_client/src/block_service.rs @@ -185,6 +185,22 @@ impl BlockService { sleep(delay).await; } + // Delay block production for slot 31 of every epoch. + if let Some(slot) = service.slot_clock.now() { + let slots_per_epoch = E::slots_per_epoch(); + let slot_offset = slot % slots_per_epoch; + if slot_offset == (slots_per_epoch - 1) { + let delay = Duration::from_millis(4000); + debug!( + service.context.log(), + "Delaying block production by {}ms", + delay.as_millis(); + "slot" => slot.as_u64(), + ); + sleep(delay).await; + } + } + service.do_update(notif).await.ok(); } debug!(log, "Block service shutting down");