Skip to main content

DiffSource

Trait DiffSource 

Source
pub trait DiffSource {
Show 15 methods // Required methods fn fork(&self) -> ForkName; fn slot(&self) -> (u64, u64); fn scalar_header(&self) -> Vec<u8> ; fn balances(&self) -> (&[u64], &[u64]); fn previous_participation(&self) -> (&[u8], &[u8]); fn validators(&self) -> (&[u8], &[u8]); fn block_roots(&self) -> &[[u8; 32]]; fn state_roots(&self) -> &[[u8; 32]]; fn randao_mixes(&self) -> &[[u8; 32]]; fn slashings(&self) -> (&[u64], &[u64]); fn inactivity_scores(&self) -> (&[u64], &[u64]); fn eth1_data_votes(&self) -> (&[u8], &[u8]); fn pending_deposits(&self) -> FifoQueueDiff; fn pending_partial_withdrawals(&self) -> FifoQueueDiff; fn pending_consolidations(&self) -> FifoQueueDiff;
}
Expand description

Read-only view of two beacon states.

Implement this trait to allow create to compute a BeaconStateDelta between two states.

Each method exposes the state component required by the corresponding delta encoder without imposing any storage layout on the implementation.

Required Methods§

Source

fn fork(&self) -> ForkName

Source

fn slot(&self) -> (u64, u64)

Source

fn scalar_header(&self) -> Vec<u8>

Source

fn balances(&self) -> (&[u64], &[u64])

Source

fn previous_participation(&self) -> (&[u8], &[u8])

Source

fn validators(&self) -> (&[u8], &[u8])

Source

fn block_roots(&self) -> &[[u8; 32]]

Source

fn state_roots(&self) -> &[[u8; 32]]

Source

fn randao_mixes(&self) -> &[[u8; 32]]

Source

fn slashings(&self) -> (&[u64], &[u64])

Source

fn inactivity_scores(&self) -> (&[u64], &[u64])

Source

fn eth1_data_votes(&self) -> (&[u8], &[u8])

Source

fn pending_deposits(&self) -> FifoQueueDiff

Source

fn pending_partial_withdrawals(&self) -> FifoQueueDiff

Source

fn pending_consolidations(&self) -> FifoQueueDiff

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§