2025-07-14 10:43:35 +03:00
|
|
|
use serde::{Deserialize, Serialize};
|
2024-12-29 14:11:47 +02:00
|
|
|
use std::path::PathBuf;
|
2024-11-25 07:26:16 +02:00
|
|
|
|
2025-07-17 11:51:46 +03:00
|
|
|
//
|
|
|
|
|
|
2025-07-14 10:43:35 +03:00
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
2025-07-14 13:25:40 +03:00
|
|
|
///Helperstruct for account serialization
|
2025-07-14 10:43:35 +03:00
|
|
|
pub struct AccountInitialData {
|
|
|
|
|
pub balance: u64,
|
|
|
|
|
}
|
2024-11-25 07:26:16 +02:00
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
|
|
|
pub struct SequencerConfig {
|
|
|
|
|
///Home dir of sequencer storage
|
|
|
|
|
pub home: PathBuf,
|
2024-11-28 22:05:14 +02:00
|
|
|
///Override rust log (env var logging level)
|
|
|
|
|
pub override_rust_log: Option<String>,
|
2024-11-25 07:26:16 +02:00
|
|
|
///Genesis id
|
|
|
|
|
pub genesis_id: u64,
|
|
|
|
|
///If `True`, then adds random sequence of bytes to genesis block
|
|
|
|
|
pub is_genesis_random: bool,
|
|
|
|
|
///Maximum number of transactions in block
|
|
|
|
|
pub max_num_tx_in_block: usize,
|
2024-11-28 22:05:14 +02:00
|
|
|
///Interval in which blocks produced
|
2024-12-29 14:11:47 +02:00
|
|
|
pub block_create_timeout_millis: u64,
|
|
|
|
|
///Port to listen
|
|
|
|
|
pub port: u16,
|
2025-07-23 15:16:53 +03:00
|
|
|
///List of initial accounts data
|
2025-07-14 10:43:35 +03:00
|
|
|
pub initial_accounts: Vec<AccountInitialData>,
|
2024-11-25 07:26:16 +02:00
|
|
|
}
|