diff --git a/eth2/types/src/historical_batch.rs b/eth2/types/src/historical_batch.rs new file mode 100644 index 000000000..77859ed1a --- /dev/null +++ b/eth2/types/src/historical_batch.rs @@ -0,0 +1,22 @@ +use crate::test_utils::TestRandom; +use crate::Hash256; +use rand::RngCore; +use serde_derive::{Deserialize, Serialize}; +use ssz_derive::{Decode, Encode, TreeHash}; +use test_random_derive::TestRandom; + +/// Historical block and state roots. +/// +/// Spec v0.5.0 +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Encode, Decode, TreeHash, TestRandom)] +pub struct HistoricalBatch { + pub block_roots: Vec, + pub state_roots: Vec, +} + +#[cfg(test)] +mod tests { + use super::*; + + ssz_tests!(HistoricalBatch); +} diff --git a/eth2/types/src/lib.rs b/eth2/types/src/lib.rs index 2fcb3237d..4f50e0ea5 100644 --- a/eth2/types/src/lib.rs +++ b/eth2/types/src/lib.rs @@ -20,6 +20,7 @@ pub mod eth1_data; pub mod eth1_data_vote; pub mod fork; pub mod free_attestation; +pub mod historical_batch; pub mod pending_attestation; pub mod proposal; pub mod proposer_slashing; @@ -55,6 +56,7 @@ pub use crate::eth1_data::Eth1Data; pub use crate::eth1_data_vote::Eth1DataVote; pub use crate::fork::Fork; pub use crate::free_attestation::FreeAttestation; +pub use crate::historical_batch::HistoricalBatch; pub use crate::pending_attestation::PendingAttestation; pub use crate::proposal::Proposal; pub use crate::proposer_slashing::ProposerSlashing;