Skip to content

Commit 79cb31a

Browse files
jimmygcheneserilev
authored andcommitted
partial merge of jimmys ci fixes
1 parent 3c519d3 commit 79cb31a

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

beacon_node/beacon_chain/src/block_verification.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1761,8 +1761,12 @@ pub fn check_block_is_finalized_checkpoint_or_descendant<
17611761
// If we have a split block newer than finalization then we also ban blocks which are not
17621762
// descended from that split block.
17631763
let split = chain.store.get_split_info();
1764+
let is_descendant_from_split_block =
1765+
split.slot == 0 || fork_choice.is_descendant(split.block_root, block.parent_root());
1766+
1767+
println!("Block is descendant: {:?}", is_descendant_from_split_block);
17641768
if fork_choice.is_finalized_checkpoint_or_descendant(block.parent_root())
1765-
&& fork_choice.is_descendant(split.block_root, block.parent_root())
1769+
&& is_descendant_from_split_block
17661770
{
17671771
Ok(block)
17681772
} else {

beacon_node/beacon_chain/tests/payload_invalidation.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,19 @@ async fn immediate_forkchoice_update_payload_invalid() {
471471
}
472472

473473
#[tokio::test]
474+
// Failing since this change on `holesky-rescue`. We've lift this restriction so the previously
475+
// valid block can be marked invalid on Holesky.
476+
// https://github.com/sigp/lighthouse/commit/19fc31a75be727ff811f54c249db19159003e90b
477+
#[ignore]
474478
async fn immediate_forkchoice_update_payload_invalid_block_hash() {
475479
immediate_forkchoice_update_invalid_test(|_| Payload::InvalidBlockHash).await
476480
}
477481

478482
#[tokio::test]
483+
// Failing since this change on `holesky-rescue`. We've lift this restriction so the previously
484+
// valid block can be marked invalid on Holesky.
485+
// https://github.com/sigp/lighthouse/commit/19fc31a75be727ff811f54c249db19159003e90b
486+
#[ignore]
479487
async fn immediate_forkchoice_update_payload_invalid_terminal_block() {
480488
immediate_forkchoice_update_invalid_test(|_| Payload::Invalid {
481489
latest_valid_hash: Some(ExecutionBlockHash::zero()),

consensus/fork_choice/tests/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg(not(debug_assertions))]
1+
// #![cfg(not(debug_assertions))]
22

33
use beacon_chain::test_utils::{
44
AttestationStrategy, BeaconChainHarness, BlockStrategy, EphemeralHarnessType,

0 commit comments

Comments
 (0)