mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 12:58:31 +00:00
Get electra_op_pool up to date (#5756)
* fix get attesting indices (#5742) * fix get attesting indices * better errors * fix compile * only get committee index once * Ef test fixes (#5753) * attestation related ef test fixes * delete commented out stuff * Fix Aggregation Pool for Electra (#5754) * Fix Aggregation Pool for Electra * Remove Outdated Interface * fix ssz (#5755) --------- Co-authored-by: realbigsean <sean@sigmaprime.io>
This commit is contained in:
@@ -67,9 +67,9 @@ pub struct Attestation<E: EthSpec> {
|
||||
#[superstruct(only(Electra), partial_getter(rename = "aggregation_bits_electra"))]
|
||||
pub aggregation_bits: BitList<E::MaxValidatorsPerSlot>,
|
||||
pub data: AttestationData,
|
||||
pub signature: AggregateSignature,
|
||||
#[superstruct(only(Electra))]
|
||||
pub committee_bits: BitVector<E::MaxCommitteesPerSlot>,
|
||||
pub signature: AggregateSignature,
|
||||
}
|
||||
|
||||
impl<E: EthSpec> Decode for Attestation<E> {
|
||||
@@ -92,6 +92,7 @@ impl<E: EthSpec> Decode for Attestation<E> {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(electra): think about how to handle fork variants here
|
||||
impl<E: EthSpec> TestRandom for Attestation<E> {
|
||||
fn random_for_test(rng: &mut impl RngCore) -> Self {
|
||||
let aggregation_bits: BitList<E::MaxValidatorsPerCommittee> = BitList::random_for_test(rng);
|
||||
|
||||
@@ -159,7 +159,8 @@ pub enum Error {
|
||||
IndexNotSupported(usize),
|
||||
InvalidFlagIndex(usize),
|
||||
MerkleTreeError(merkle_proof::MerkleTreeError),
|
||||
NoCommitteeFound,
|
||||
NoCommitteeFound(CommitteeIndex),
|
||||
InvalidCommitteeIndex(CommitteeIndex),
|
||||
}
|
||||
|
||||
/// Control whether an epoch-indexed field can be indexed at the next epoch or not.
|
||||
|
||||
@@ -408,6 +408,8 @@ impl EthSpec for MainnetEthSpec {
|
||||
pub struct MinimalEthSpec;
|
||||
|
||||
impl EthSpec for MinimalEthSpec {
|
||||
type MaxCommitteesPerSlot = U4;
|
||||
type MaxValidatorsPerSlot = U8192;
|
||||
type SlotsPerEpoch = U8;
|
||||
type EpochsPerEth1VotingPeriod = U4;
|
||||
type SlotsPerHistoricalRoot = U64;
|
||||
@@ -432,8 +434,6 @@ impl EthSpec for MinimalEthSpec {
|
||||
SubnetBitfieldLength,
|
||||
SyncCommitteeSubnetCount,
|
||||
MaxValidatorsPerCommittee,
|
||||
MaxCommitteesPerSlot,
|
||||
MaxValidatorsPerSlot,
|
||||
GenesisEpoch,
|
||||
HistoricalRootsLimit,
|
||||
ValidatorRegistryLimit,
|
||||
|
||||
Reference in New Issue
Block a user