kona_engine/
kinds.rs

1//! Contains the different kinds of execution engine clients that can be used.
2
3use derive_more::{Display, FromStr};
4
5/// The engine kind identifies the engine client's kind,
6/// used to control the behavior of optimism in different engine clients.
7#[derive(Debug, Display, FromStr, Clone, Copy, PartialEq, Eq)]
8pub enum EngineKind {
9    /// Geth engine client.
10    #[display("geth")]
11    Geth,
12    /// Reth engine client.
13    #[display("reth")]
14    Reth,
15    /// Erigon engine client.
16    #[display("erigon")]
17    Erigon,
18}
19
20impl EngineKind {
21    /// Contains all valid engine client kinds.
22    pub const KINDS: [Self; 3] = [Self::Geth, Self::Reth, Self::Erigon];
23
24    /// Returns whether the engine client kind supports post finalization EL sync.
25    #[deprecated(
26        since = "0.1.0",
27        note = "Node behavior is now equivalent across all engine client types."
28    )]
29    pub const fn supports_post_finalization_elsync(self) -> bool {
30        match self {
31            Self::Geth => false,
32            Self::Erigon | Self::Reth => true,
33        }
34    }
35}