mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2025-01-09 12:31:23 +00:00
1ef4f0ea12
## Issue Addressed NA ## Proposed Changes There are four new conditions introduced in v0.12.3: 1. _[REJECT]_ The attestation's epoch matches its target -- i.e. `attestation.data.target.epoch == compute_epoch_at_slot(attestation.data.slot)` 1. _[REJECT]_ The attestation's target block is an ancestor of the block named in the LMD vote -- i.e. `get_ancestor(store, attestation.data.beacon_block_root, compute_start_slot_at_epoch(attestation.data.target.epoch)) == attestation.data.target.root` 1. _[REJECT]_ The committee index is within the expected range -- i.e. `data.index < get_committee_count_per_slot(state, data.target.epoch)`. 1. _[REJECT]_ The number of aggregation bits matches the committee size -- i.e. `len(attestation.aggregation_bits) == len(get_beacon_committee(state, data.slot, data.index))`. This PR implements new logic to suit (1) and (2). Tests are added for (3) and (4), although they were already implicitly enforced. ## Additional Info - There's a bit of edge-case with target root verification that I raised here: https://github.com/ethereum/eth2.0-specs/pull/2001#issuecomment-699246659 - I've had to add an `--ignore` to `cargo audit` to get CI to pass. See https://github.com/sigp/lighthouse/issues/1669 |
||
---|---|---|
.. | ||
attestation_verification.rs | ||
beacon_chain.rs | ||
beacon_fork_choice_store.rs | ||
beacon_snapshot.rs | ||
block_verification.rs | ||
builder.rs | ||
chain_config.rs | ||
errors.rs | ||
eth1_chain.rs | ||
events.rs | ||
head_tracker.rs | ||
lib.rs | ||
metrics.rs | ||
migrate.rs | ||
naive_aggregation_pool.rs | ||
observed_attestations.rs | ||
observed_attesters.rs | ||
observed_block_producers.rs | ||
observed_operations.rs | ||
persisted_beacon_chain.rs | ||
persisted_fork_choice.rs | ||
shuffling_cache.rs | ||
snapshot_cache.rs | ||
test_utils.rs | ||
timeout_rw_lock.rs | ||
validator_pubkey_cache.rs |