pub struct ConsensusConfig {
pub network_id: u64,
pub quantum_resistant: bool,
pub security_level: u32,
pub sample_size: usize,
pub quorum_size: usize,
pub block_time_ms: u64,
pub gpu_acceleration: bool,
pub bootstrap_peers: Vec<String>,
}Expand description
Consensus configuration for AI-Chain
Fields§
§network_id: u64Network identifier
quantum_resistant: boolEnable quantum-safe cryptography
security_level: u32Security level (NIST 2, 3, or 5)
sample_size: usizeSample size for voting (k parameter)
quorum_size: usizeQuorum size (alpha parameter)
block_time_ms: u64Block time in milliseconds
gpu_acceleration: boolEnable GPU acceleration for signature verification
bootstrap_peers: Vec<String>Bootstrap peers for P2P network
Implementations§
Source§impl ConsensusConfig
impl ConsensusConfig
Sourcepub fn ai_chain_mainnet() -> Self
pub fn ai_chain_mainnet() -> Self
AI-Chain mainnet configuration
Sourcepub fn ai_chain_testnet() -> Self
pub fn ai_chain_testnet() -> Self
AI-Chain testnet configuration
Trait Implementations§
Source§impl Clone for ConsensusConfig
impl Clone for ConsensusConfig
Source§fn clone(&self) -> ConsensusConfig
fn clone(&self) -> ConsensusConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConsensusConfig
impl Debug for ConsensusConfig
Source§impl<'de> Deserialize<'de> for ConsensusConfig
impl<'de> Deserialize<'de> for ConsensusConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConsensusConfig
impl RefUnwindSafe for ConsensusConfig
impl Send for ConsensusConfig
impl Sync for ConsensusConfig
impl Unpin for ConsensusConfig
impl UnsafeUnpin for ConsensusConfig
impl UnwindSafe for ConsensusConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more