diff --git a/crates/blockchain/src/store.rs b/crates/blockchain/src/store.rs index 04138a91..a7208dac 100644 --- a/crates/blockchain/src/store.rs +++ b/crates/blockchain/src/store.rs @@ -7,9 +7,11 @@ use ethlambda_state_transition::{ use ethlambda_storage::{ForkCheckpoints, SignatureKey, Store}; use ethlambda_types::{ ShortRoot, - attestation::{AggregatedAttestation, Attestation, AttestationData, SignedAttestation}, + attestation::{ + AggregatedAttestation, AggregationBits, Attestation, AttestationData, SignedAttestation, + }, block::{ - AggregatedAttestations, AggregatedSignatureProof, AggregationBits, Block, BlockBody, + AggregatedAttestations, AggregatedSignatureProof, Block, BlockBody, SignedBlockWithAttestation, }, primitives::{H256, ssz::TreeHash}, diff --git a/crates/blockchain/tests/signature_types.rs b/crates/blockchain/tests/signature_types.rs index 31d03c66..b52e2b32 100644 --- a/crates/blockchain/tests/signature_types.rs +++ b/crates/blockchain/tests/signature_types.rs @@ -1,8 +1,8 @@ use super::common::{AggregationBits, Block, Container, ProposerAttestation, TestInfo, TestState}; -use ethlambda_types::attestation::XmssSignature; +use ethlambda_types::attestation::{AggregationBits as EthAggregationBits, XmssSignature}; use ethlambda_types::block::{ - AggregatedSignatureProof, AggregationBits as EthAggregationBitsSig, AttestationSignatures, - BlockSignatures, BlockWithAttestation, SignedBlockWithAttestation, + AggregatedSignatureProof, AttestationSignatures, BlockSignatures, BlockWithAttestation, + SignedBlockWithAttestation, }; use ethlambda_types::primitives::ssz::{Decode as SszDecode, Encode as SszEncode}; use serde::Deserialize; @@ -104,7 +104,7 @@ impl From for SignedBlockWithAttestation { .into_iter() .map(|att_sig| { // Convert participants bitfield - let participants: EthAggregationBitsSig = att_sig.participants.into(); + let participants: EthAggregationBits = att_sig.participants.into(); // Create proof with participants but empty proof_data AggregatedSignatureProof::empty(participants) }) diff --git a/crates/common/types/src/block.rs b/crates/common/types/src/block.rs index 776dbb1e..634c7953 100644 --- a/crates/common/types/src/block.rs +++ b/crates/common/types/src/block.rs @@ -2,7 +2,7 @@ use serde::Serialize; use ssz_types::typenum::U1048576; use crate::{ - attestation::{AggregatedAttestation, Attestation, XmssSignature}, + attestation::{AggregatedAttestation, AggregationBits, Attestation, XmssSignature}, primitives::{ ByteList, H256, ssz::{Decode, Encode, TreeHash}, @@ -102,24 +102,8 @@ impl AggregatedSignatureProof { proof_data: ByteList::empty(), } } - - /// Get the participants bitfield. - pub fn participants(&self) -> &AggregationBits { - &self.participants - } - - /// Get the proof data. - pub fn proof_data(&self) -> &ByteListMiB { - &self.proof_data - } } -/// Bitlist representing validator participation in an attestation or signature. -/// -/// A general-purpose bitfield for tracking which validators have participated -/// in some collective action (attestation, signature aggregation, etc.). -pub type AggregationBits = ssz_types::BitList; - /// Bundle containing a block and the proposer's attestation. #[derive(Debug, Clone, Encode, Decode, TreeHash)] pub struct BlockWithAttestation {