Trait multi_validator_libp2p::infra::RunDa

source ·
pub trait RunDa<TYPES, NETWORK: ConnectedNetwork<TYPES::SignatureKey>, NODE: NodeImplementation<TYPES, Network = NETWORK, Storage = TestStorage<TYPES>, AuctionResultsProvider = TestAuctionResultsProvider<TYPES>>, V: Versions>
where <TYPES as NodeType>::ValidatedState: TestableState<TYPES>, <TYPES as NodeType>::BlockPayload: TestableBlock<TYPES>, TYPES: NodeType<Transaction = TestTransaction> + NodeType<InstanceState = TestInstanceState>, Leaf<TYPES>: TestableLeaf, Self: Sync,
{ // Required methods fn initialize_networking<'life0, 'async_trait>( config: NetworkConfig<TYPES::SignatureKey>, validator_config: ValidatorConfig<TYPES::SignatureKey>, libp2p_advertise_address: Option<String>, membership: &'life0 Arc<RwLock<<TYPES as NodeType>::Membership>>, ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn network(&self) -> NETWORK; fn config(&self) -> NetworkConfig<TYPES::SignatureKey>; fn validator_config(&self) -> ValidatorConfig<TYPES::SignatureKey>; // Provided methods fn initialize_state_and_hotshot<'life0, 'async_trait>( &'life0 self, membership: Arc<RwLock<<TYPES as NodeType>::Membership>>, ) -> Pin<Box<dyn Future<Output = SystemContextHandle<TYPES, NODE, V>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn run_hotshot<'life0, 'life1, 'async_trait>( &'life0 self, context: SystemContextHandle<TYPES, NODE, V>, transactions: &'life1 mut Vec<TestTransaction>, transactions_to_send_per_round: u64, transaction_size_in_bytes: u64, ) -> Pin<Box<dyn Future<Output = BenchResults> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } }
Expand description

Defines the behavior of a “run” of the network with a given configuration

Required Methods§

source

fn initialize_networking<'life0, 'async_trait>( config: NetworkConfig<TYPES::SignatureKey>, validator_config: ValidatorConfig<TYPES::SignatureKey>, libp2p_advertise_address: Option<String>, membership: &'life0 Arc<RwLock<<TYPES as NodeType>::Membership>>, ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Initializes networking, returns self

source

fn network(&self) -> NETWORK

Returns the underlying network for this run

source

fn config(&self) -> NetworkConfig<TYPES::SignatureKey>

Returns the config for this run

source

fn validator_config(&self) -> ValidatorConfig<TYPES::SignatureKey>

Returns the validator config with private signature keys for this run.

Provided Methods§

source

fn initialize_state_and_hotshot<'life0, 'async_trait>( &'life0 self, membership: Arc<RwLock<<TYPES as NodeType>::Membership>>, ) -> Pin<Box<dyn Future<Output = SystemContextHandle<TYPES, NODE, V>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Initializes the genesis state and HotShot instance; does not start HotShot consensus

§Panics if it cannot generate a genesis block, fails to initialize HotShot, or cannot

get the anchored view Note: sequencing leaf does not have state, so does not return state

source

fn run_hotshot<'life0, 'life1, 'async_trait>( &'life0 self, context: SystemContextHandle<TYPES, NODE, V>, transactions: &'life1 mut Vec<TestTransaction>, transactions_to_send_per_round: u64, transaction_size_in_bytes: u64, ) -> Pin<Box<dyn Future<Output = BenchResults> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Starts HotShot consensus, returns when consensus has finished

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<TYPES: NodeType<Transaction = TestTransaction, BlockPayload = TestBlockPayload, BlockHeader = TestBlockHeader, InstanceState = TestInstanceState>, NODE: NodeImplementation<TYPES, Network = CombinedNetworks<TYPES>, Storage = TestStorage<TYPES>, AuctionResultsProvider = TestAuctionResultsProvider<TYPES>>, V: Versions> RunDa<TYPES, CombinedNetworks<TYPES>, NODE, V> for CombinedDaRun<TYPES>
where <TYPES as NodeType>::ValidatedState: TestableState<TYPES>, <TYPES as NodeType>::BlockPayload: TestableBlock<TYPES>, Leaf<TYPES>: TestableLeaf, Self: Sync,

source§

impl<TYPES: NodeType<Transaction = TestTransaction, BlockPayload = TestBlockPayload, BlockHeader = TestBlockHeader, InstanceState = TestInstanceState>, NODE: NodeImplementation<TYPES, Network = Libp2pNetwork<TYPES>, Storage = TestStorage<TYPES>, AuctionResultsProvider = TestAuctionResultsProvider<TYPES>>, V: Versions> RunDa<TYPES, Libp2pNetwork<TYPES>, NODE, V> for Libp2pDaRun<TYPES>
where <TYPES as NodeType>::ValidatedState: TestableState<TYPES>, <TYPES as NodeType>::BlockPayload: TestableBlock<TYPES>, Leaf<TYPES>: TestableLeaf, Self: Sync,

source§

impl<TYPES: NodeType<Transaction = TestTransaction, BlockPayload = TestBlockPayload, BlockHeader = TestBlockHeader, InstanceState = TestInstanceState>, NODE: NodeImplementation<TYPES, Network = PushCdnNetwork<TYPES::SignatureKey>, Storage = TestStorage<TYPES>, AuctionResultsProvider = TestAuctionResultsProvider<TYPES>>, V: Versions> RunDa<TYPES, PushCdnNetwork<<TYPES as NodeType>::SignatureKey>, NODE, V> for PushCdnDaRun<TYPES>
where <TYPES as NodeType>::ValidatedState: TestableState<TYPES>, <TYPES as NodeType>::BlockPayload: TestableBlock<TYPES>, Leaf<TYPES>: TestableLeaf, Self: Sync,