massa_final_state/
config.rs

1//! Copyright (c) 2022 MASSA LABS <info@massa.net>
2
3//! This file defines a configuration structure containing all settings for final state management
4
5use massa_async_pool::AsyncPoolConfig;
6use massa_deferred_calls::config::DeferredCallsConfig;
7use massa_executed_ops::{ExecutedDenunciationsConfig, ExecutedOpsConfig};
8use massa_ledger_exports::LedgerConfig;
9use massa_pos_exports::PoSConfig;
10use massa_time::MassaTime;
11use std::path::PathBuf;
12
13/// Ledger configuration
14#[derive(Debug, Clone)]
15pub struct FinalStateConfig {
16    /// ledger configuration
17    pub ledger_config: LedgerConfig,
18    /// asynchronous pool configuration
19    pub async_pool_config: AsyncPoolConfig,
20    /// config for deferred calls
21    pub deferred_calls_config: DeferredCallsConfig,
22    /// proof-of-stake configuration
23    pub pos_config: PoSConfig,
24    /// executed operations configuration
25    pub executed_ops_config: ExecutedOpsConfig,
26    /// executed denunciations configuration
27    pub executed_denunciations_config: ExecutedDenunciationsConfig,
28    /// final changes history length
29    pub final_history_length: usize,
30    /// thread count
31    pub thread_count: u8,
32    /// periods per cycle
33    pub periods_per_cycle: u64,
34    /// initial PoS seed string
35    pub initial_seed_string: String,
36    /// initial rolls file path
37    pub initial_rolls_path: PathBuf,
38    /// endorsement count
39    pub endorsement_count: u32,
40    /// max number of denunciation index in executed denunciations struct
41    pub max_executed_denunciations_length: u64,
42    /// max number of denunciations that can be included in a block header
43    /// or in executed denunciations struct
44    pub max_denunciations_per_block_header: u32,
45    /// TODO
46    pub t0: MassaTime,
47    /// TODO
48    pub genesis_timestamp: MassaTime,
49    /// Interval of periods between creation of each ledger backup
50    pub ledger_backup_periods_interval: u64,
51}