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§
sourcefn 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 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
sourcefn config(&self) -> NetworkConfig<TYPES::SignatureKey>
fn config(&self) -> NetworkConfig<TYPES::SignatureKey>
Returns the config for this run
sourcefn validator_config(&self) -> ValidatorConfig<TYPES::SignatureKey>
fn validator_config(&self) -> ValidatorConfig<TYPES::SignatureKey>
Returns the validator config with private signature keys for this run.
Provided Methods§
sourcefn 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 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
sourcefn 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,
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.