pub struct ReputationConfig {
pub initial_reputation: f64,
pub min_reputation: f64,
pub max_reputation: f64,
pub correct_vote_reward: f64,
pub incorrect_vote_penalty: f64,
pub timeout_penalty: f64,
pub byzantine_penalty: f64,
pub decay_rate: f64,
}Expand description
Reputation configuration
Fields§
§initial_reputation: f64Initial reputation for new authorities
min_reputation: f64Minimum reputation before authority is excluded
max_reputation: f64Maximum reputation cap
correct_vote_reward: f64Reputation increase for correct votes
incorrect_vote_penalty: f64Reputation decrease for incorrect votes
timeout_penalty: f64Reputation decrease for timeouts
byzantine_penalty: f64Reputation decrease for Byzantine behavior
decay_rate: f64Decay rate per round (0.0 = no decay)
Trait Implementations§
Source§impl Clone for ReputationConfig
impl Clone for ReputationConfig
Source§fn clone(&self) -> ReputationConfig
fn clone(&self) -> ReputationConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 ReputationConfig
impl Debug for ReputationConfig
Source§impl Default for ReputationConfig
impl Default for ReputationConfig
Source§impl<'de> Deserialize<'de> for ReputationConfig
impl<'de> Deserialize<'de> for ReputationConfig
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 ReputationConfig
impl RefUnwindSafe for ReputationConfig
impl Send for ReputationConfig
impl Sync for ReputationConfig
impl Unpin for ReputationConfig
impl UnwindSafe for ReputationConfig
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