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 | view: initial_state.get_view(), |
| 370 | }; |
| 371 | let num_validators = initial_state.num_validators(); |
| 372 | |
| 373 | info!( |
| 374 | sync_height = sync_start.height, |
| 375 | sync_epoch = sync_start.epoch, |
| 376 | sync_view = sync_start.view, |
| 377 | num_validators, |
| 378 | blocks_per_epoch, |
| 379 | "engine initialized" |
| 380 | ); |
| 381 | |
| 382 | let checkpoint = cfg.checkpoint_last_block.map(|last_block| SyncCheckpoint { |
| 383 | last_block, |
| 384 | finalized_header: cfg.checkpoint_finalized_header, |
| 385 | }); |
| 386 | |
| 387 | Self { |
| 388 | context, |
| 389 | application, |
| 390 | buffer, |
| 391 | buffer_mailbox, |
| 392 | syncer, |
| 393 | syncer_mailbox, |
| 394 | finalizer, |
| 395 | finalizer_mailbox, |
| 396 | finalizer_state_query, |
| 397 | orchestrator, |
| 398 | orchestrator_mailbox, |
| 399 | oracle: cfg.oracle, |
| 400 | node_public_key, |
| 401 | mailbox_size: cfg.mailbox_size, |
| 402 | fetch_timeout: cfg.fetch_timeout, |
| 403 | sync_start, |
| 404 | checkpoint, |
| 405 | cancellation_token, |
| 406 | #[cfg(feature = "permissioned")] |