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
| 406 | #[cfg(feature = "permissioned")] |
| 407 | paused, |
| 408 | } |
| 409 | } |
| 410 | |
| 411 | /// Configuration for the backfill resolver. |
| 412 | /// |
| 413 | /// The active-request timeout must come from [`EngineConfig::fetch_timeout`]: the |
| 414 | /// resolver drops in-flight requests when the timeout fires, so responses arriving |
| 415 | /// later are discarded and backfill never completes if the timeout is shorter than |
| 416 | /// what peers need to serve finalized history. |
| 417 | pub(crate) fn backfill_resolver_config( |
| 418 | &self, |
| 419 | ) -> summit_syncer::resolver::p2p::Config<PublicKey, O, O> { |
| 420 | summit_syncer::resolver::p2p::Config { |
| 421 | public_key: self.node_public_key.clone(), |
| 422 | provider: self.oracle.clone(), |
| 423 | blocker: self.oracle.clone(), |
| 424 | mailbox_size: self.mailbox_size, |
| 425 | initial: BACKFILL_INITIAL_EXPECTED, |
| 426 | timeout: self.fetch_timeout, |
| 427 | fetch_retry_timeout: BACKFILL_FETCH_RETRY_TIMEOUT, |
| 428 | priority_requests: false, |
| 429 | priority_responses: false, |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | /// Start the `simplex` consensus engine. |
| 434 | /// |
| 435 | /// This will also rebuild the state of the engine from provided `Journal`. |
| 436 | pub fn start( |
| 437 | self, |
| 438 | pending_network: ( |
| 439 | impl Sender<PublicKey = S::PublicKey>, |
| 440 | impl Receiver<PublicKey = S::PublicKey>, |
| 441 | ), |
| 442 | recovered_network: ( |
| 443 | impl Sender<PublicKey = S::PublicKey>, |
| 444 | impl Receiver<PublicKey = S::PublicKey>, |
| 445 | ), |
| 446 | resolver_network: ( |
| 447 | impl Sender<PublicKey = S::PublicKey>, |
| 448 | impl Receiver<PublicKey = S::PublicKey>, |
| 449 | ), |
| 450 | broadcast_network: ( |
| 451 | impl Sender<PublicKey = S::PublicKey>, |
| 452 | impl Receiver<PublicKey = S::PublicKey>, |
| 453 | ), |
| 454 | backfill_network: ( |
| 455 | impl Sender<PublicKey = PublicKey>, |
| 456 | impl Receiver<PublicKey = PublicKey>, |
| 457 | ), |
| 458 | ) -> Handle<anyhow::Result<()>> { |
| 459 | self.context.clone().spawn(|_| { |
| 460 | self.run( |
| 461 | pending_network, |
| 462 | recovered_network, |
| 463 | resolver_network, |
| 464 | broadcast_network, |
| 465 | backfill_network, |