Trait orchestrator::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<'async_trait>( config: NetworkConfig<TYPES::SignatureKey>, libp2p_advertise_address: Option<SocketAddr> ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>> where Self: 'async_trait; fn network(&self) -> NETWORK; fn config(&self) -> NetworkConfig<TYPES::SignatureKey>; // Provided methods fn initialize_state_and_hotshot<'life0, 'async_trait>( &'life0 self ) -> 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<'async_trait>( config: NetworkConfig<TYPES::SignatureKey>, libp2p_advertise_address: Option<SocketAddr> ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
where Self: '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

Provided Methods§

source

fn initialize_state_and_hotshot<'life0, 'async_trait>( &'life0 self ) -> 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::SignatureKey>, Storage = TestStorage<TYPES>, AuctionResultsProvider = TestAuctionResultsProvider<TYPES>>, V: Versions> RunDa<TYPES, Libp2pNetwork<<TYPES as NodeType>::SignatureKey>, 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,