Start the `simplex` consensus engine. This will also rebuild the state of the engine from provided `Journal`.
(
self,
pending_network: (
impl Sender<PublicKey = S::PublicKey>,
impl Receiver<PublicKey = S::PublicKey>,
),
recovered_network: (
i
| 369 | ) |
| 370 | .await; |
| 371 | |
| 372 | // create the buffer |
| 373 | let (buffer, buffer_mailbox) = buffered::Engine::new( |
| 374 | context.child("buffer"), |
| 375 | buffered::Config { |
| 376 | public_key: node_public_key.clone(), |
| 377 | mailbox_size: cfg.mailbox_size, |
| 378 | deque_size: cfg.deque_size, |
| 379 | priority: true, |
| 380 | codec_config: (), |
| 381 | peer_provider: cfg.oracle.clone(), |
| 382 | }, |
| 383 | ); |
| 384 | |
| 385 | let syncer_config = summit_syncer::Config { |
| 386 | scheme_provider: scheme_provider.clone(), |
| 387 | epocher: epocher.clone(), |
| 388 | partition_prefix: cfg.partition_prefix.clone(), |
| 389 | mailbox_size: cfg.mailbox_size, |
| 390 | view_retention_timeout: ViewDelta::new(cfg.activity_timeout), |
| 391 | namespace: consensus_domain.clone(), |
| 392 | prunable_items_per_section: PRUNABLE_ITEMS_PER_SECTION, |
| 393 | page_cache: page_cache.clone(), |
| 394 | replay_buffer: REPLAY_BUFFER, |
| 395 | key_write_buffer: WRITE_BUFFER, |
| 396 | value_write_buffer: WRITE_BUFFER, |
| 397 | block_codec_config: (), |
| 398 | max_repair: MAX_REPAIR, |
| 399 | max_pending_acks: MAX_REPAIR, |
| 400 | strategy: Sequential, |
| 401 | }; |
| 402 | |
| 403 | let (syncer, syncer_mailbox) = summit_syncer::Actor::init( |
| 404 | context.child("syncer"), |
| 405 | finalizations_by_height, |
| 406 | finalized_blocks, |