Skip to content

Commit

Permalink
get latest ef tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
realbigsean committed Jan 19, 2024
1 parent 47b28c4 commit c84536a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
13 changes: 3 additions & 10 deletions consensus/proto_array/src/proto_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -961,16 +961,9 @@ impl ProtoArray {
node_justified_checkpoint
};

let mut correct_justified = self.justified_checkpoint.epoch == genesis_epoch
|| voting_source.epoch == self.justified_checkpoint.epoch;

if let Some(node_unrealized_justified_checkpoint) = node.unrealized_justified_checkpoint {
if !correct_justified && self.justified_checkpoint.epoch + 1 == current_epoch {
correct_justified = node_unrealized_justified_checkpoint.epoch
>= self.justified_checkpoint.epoch
&& voting_source.epoch + 2 >= current_epoch;
}
}
let correct_justified = self.justified_checkpoint.epoch == genesis_epoch
|| voting_source.epoch == self.justified_checkpoint.epoch
|| voting_source.epoch + 2 >= current_epoch;

let correct_finalized = self.finalized_checkpoint.epoch == genesis_epoch
|| self.is_finalized_checkpoint_or_descendant::<E>(node.root);
Expand Down
2 changes: 1 addition & 1 deletion testing/ef_tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TESTS_TAG := v1.4.0-beta.4
TESTS_TAG := v1.4.0-beta.6
TESTS = general minimal mainnet
TARBALLS = $(patsubst %,%-$(TESTS_TAG).tar.gz,$(TESTS))

Expand Down
3 changes: 2 additions & 1 deletion testing/ef_tests/check_all_files_accessed.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
"bls12-381-tests/deserialization_G1",
"bls12-381-tests/deserialization_G2",
"bls12-381-tests/hash_to_G2",
"tests/.*/eip6110"
"tests/.*/eip6110",
"tests/.*/whisk"
]


Expand Down
3 changes: 2 additions & 1 deletion testing/ef_tests/tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![cfg(feature = "ef_tests")]

use ef_tests::{KzgInclusionMerkleProofValidityHandler, *};
use ef_tests::*;
use types::{MainnetEthSpec, MinimalEthSpec, *};

// Check that the hand-computed multiplications on EthSpec are correctly computed.
Expand Down Expand Up @@ -605,6 +605,7 @@ fn merkle_proof_validity() {
}

#[test]
#[cfg(feature = "fake_crypto")]
fn kzg_inclusion_merkle_proof_validity() {
KzgInclusionMerkleProofValidityHandler::<MainnetEthSpec>::default().run();
KzgInclusionMerkleProofValidityHandler::<MinimalEthSpec>::default().run();
Expand Down

0 comments on commit c84536a

Please sign in to comment.