mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 08:52:54 +00:00
Update to Spec v0.10 (#817)
* Start updating types * WIP * Signature hacking * Existing EF tests passing with fake_crypto * Updates * Delete outdated API spec * The refactor continues * It compiles * WIP test fixes * All release tests passing bar genesis state parsing * Update and test YamlConfig * Update to spec v0.10 compatible BLS * Updates to BLS EF tests * Add EF test for AggregateVerify And delete unused hash2curve tests for uncompressed points * Update EF tests to v0.10.1 * Use optional block root correctly in block proc * Use genesis fork in deposit domain. All tests pass * Cargo fmt * Fast aggregate verify test * Update REST API docs * Cargo fmt * Fix unused import * Bump spec tags to v0.10.1 * Add `seconds_per_eth1_block` to chainspec * Update to timestamp based eth1 voting scheme * Return None from `get_votes_to_consider` if block cache is empty * Handle overflows in `is_candidate_block` * Revert to failing tests * Fix eth1 data sets test * Choose default vote according to spec * Fix collect_valid_votes tests * Fix `get_votes_to_consider` to choose all eligible blocks * Uncomment winning_vote tests * Add comments; remove unused code * Reduce seconds_per_eth1_block for simulation * Addressed review comments * Add test for default vote case * Fix logs * Remove unused functions * Meter default eth1 votes * Fix comments * Address review comments; remove unused dependency * Disable/delete two outdated tests * Bump eth1 default vote warn to error * Delete outdated eth1 test Co-authored-by: Pawan Dhananjay <pawandhananjay@gmail.com>
This commit is contained in:
@@ -267,7 +267,7 @@ fn epoch_boundary_state_attestation_processing() {
|
||||
&AttestationStrategy::SomeValidators(late_validators.clone()),
|
||||
&head.beacon_state,
|
||||
head.beacon_block_root,
|
||||
head.beacon_block.slot,
|
||||
head.beacon_block.slot(),
|
||||
));
|
||||
|
||||
harness.advance_slot();
|
||||
@@ -283,9 +283,9 @@ fn epoch_boundary_state_attestation_processing() {
|
||||
for attestation in late_attestations {
|
||||
// load_epoch_boundary_state is idempotent!
|
||||
let block_root = attestation.data.beacon_block_root;
|
||||
let block: BeaconBlock<E> = store.get(&block_root).unwrap().expect("block exists");
|
||||
let block = store.get_block(&block_root).unwrap().expect("block exists");
|
||||
let epoch_boundary_state = store
|
||||
.load_epoch_boundary_state(&block.state_root)
|
||||
.load_epoch_boundary_state(&block.state_root())
|
||||
.expect("no error")
|
||||
.expect("epoch boundary state exists");
|
||||
let ebs_of_ebs = store
|
||||
@@ -396,7 +396,7 @@ fn check_chain_dump(harness: &TestHarness, expected_len: u64) {
|
||||
// Check the forwards block roots iterator against the chain dump
|
||||
let chain_dump_block_roots = chain_dump
|
||||
.iter()
|
||||
.map(|checkpoint| (checkpoint.beacon_block_root, checkpoint.beacon_block.slot))
|
||||
.map(|checkpoint| (checkpoint.beacon_block_root, checkpoint.beacon_block.slot()))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let head = harness.chain.head().expect("should get head");
|
||||
|
||||
@@ -121,7 +121,7 @@ fn iterators() {
|
||||
|
||||
assert_eq!(
|
||||
*block_roots.first().expect("should have some block roots"),
|
||||
(head.beacon_block_root, head.beacon_block.slot),
|
||||
(head.beacon_block_root, head.beacon_block.slot()),
|
||||
"first block root and slot should be for the head block"
|
||||
);
|
||||
|
||||
@@ -435,7 +435,7 @@ fn attestations_with_increasing_slots() {
|
||||
.head()
|
||||
.expect("should get head")
|
||||
.beacon_block
|
||||
.slot,
|
||||
.slot(),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -524,7 +524,7 @@ fn run_skip_slot_test(skip_slots: u64) {
|
||||
.head()
|
||||
.expect("should get head")
|
||||
.beacon_block
|
||||
.slot,
|
||||
.slot(),
|
||||
Slot::new(skip_slots + 1)
|
||||
);
|
||||
assert_eq!(
|
||||
@@ -533,7 +533,7 @@ fn run_skip_slot_test(skip_slots: u64) {
|
||||
.head()
|
||||
.expect("should get head")
|
||||
.beacon_block
|
||||
.slot,
|
||||
.slot(),
|
||||
Slot::new(0)
|
||||
);
|
||||
|
||||
@@ -566,7 +566,7 @@ fn run_skip_slot_test(skip_slots: u64) {
|
||||
.head()
|
||||
.expect("should get head")
|
||||
.beacon_block
|
||||
.slot,
|
||||
.slot(),
|
||||
Slot::new(skip_slots + 1)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user