kona_sources/runtime/
config.rs

1//! Contains the runtime configuration for the node.
2
3use alloy_primitives::Address;
4use op_alloy_rpc_types_engine::ProtocolVersion;
5
6/// The runtime config.
7#[derive(Copy, Clone, Debug, PartialEq, Eq)]
8pub struct RuntimeConfig {
9    /// The Unsafe Block Signer Address.
10    /// This is also called the "p2p block signer address".
11    pub unsafe_block_signer_address: Address,
12    /// The required protocol version.
13    pub required_protocol_version: ProtocolVersion,
14    /// The recommended protocol version.
15    pub recommended_protocol_version: ProtocolVersion,
16}
17
18impl std::fmt::Display for RuntimeConfig {
19    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20        write!(
21            f,
22            "RuntimeConfig {{ unsafe_block_signer_address: {}, required_protocol_version: {}, recommended_protocol_version: {} }}",
23            self.unsafe_block_signer_address,
24            self.required_protocol_version,
25            self.recommended_protocol_version
26        )
27    }
28}