[][src]Enum parsec::Malice

pub enum Malice<T: NetworkEvent, P: PublicId> {
    UnexpectedGenesis(EventHash),
    DuplicateVote(EventHashEventHash),
    MissingGenesis(EventHash),
    IncorrectGenesis(Box<PackedEvent<T, P>>),
    Fork(EventHash),
    InvalidAccusation(EventHash),
    OtherParentBySameCreator(Box<PackedEvent<T, P>>),
    SelfParentByDifferentCreator(Box<PackedEvent<T, P>>),
    InvalidRequest(Box<PackedEvent<T, P>>),
    InvalidResponse(Box<PackedEvent<T, P>>),
    Unprovable(UnprovableMalice),
    Accomplice(EventHashBox<Malice<T, P>>),
}

Type of malicious behaviour.

Variants

UnexpectedGenesis(EventHash)

Event carries a vote for Observation::Genesis, but shouldn't.

DuplicateVote(EventHashEventHash)

Two or more votes with the same observation by the same creator.

MissingGenesis(EventHash)

Event should be carrying a vote for Observation::Genesis, but doesn't

IncorrectGenesis(Box<PackedEvent<T, P>>)

Event carries a vote for Observation::Genesis which doesn't correspond to what we know.

Fork(EventHash)

More than one events having this event as its self_parent.

InvalidAccusation(EventHash)

A node incorrectly accused other node of malice. Contains hash of the invalid Accusation event.

OtherParentBySameCreator(Box<PackedEvent<T, P>>)

Event's creator is the same to its other_parent's creator. The accusation contains the original event so other peers can verify the accusation directly.

SelfParentByDifferentCreator(Box<PackedEvent<T, P>>)

Event's creator is different to its self_parent's creator. The accusation contains the original event so other peers can verify the accusation directly.

InvalidRequest(Box<PackedEvent<T, P>>)

The event should be a request with other_parent as a requesting event specifying this peer, but isn't.

InvalidResponse(Box<PackedEvent<T, P>>)

The event should be a response to a request made to the peer, but isn't.

Unprovable(UnprovableMalice)

Detectable but unprovable malice. Relies on consensus.

Accomplice(EventHashBox<Malice<T, P>>)

A node is not reporting malice when it should.

Trait Implementations

impl<T: Clone + NetworkEvent, P: Clone + PublicId> Clone for Malice<T, P>[src]

impl<T: Debug + NetworkEvent, P: Debug + PublicId> Debug for Malice<T, P>[src]

impl<'de, T: NetworkEvent, P: PublicId> Deserialize<'de> for Malice<T, P>[src]

impl<T: Eq + NetworkEvent, P: Eq + PublicId> Eq for Malice<T, P>[src]

impl<T: Hash + NetworkEvent, P: Hash + PublicId> Hash for Malice<T, P>[src]

impl<T: Ord + NetworkEvent, P: Ord + PublicId> Ord for Malice<T, P>[src]

impl<T: PartialEq + NetworkEvent, P: PartialEq + PublicId> PartialEq<Malice<T, P>> for Malice<T, P>[src]

impl<T: PartialOrd + NetworkEvent, P: PartialOrd + PublicId> PartialOrd<Malice<T, P>> for Malice<T, P>[src]

impl<T: NetworkEvent, P: PublicId> Serialize for Malice<T, P>[src]

impl<T: NetworkEvent, P: PublicId> StructuralEq for Malice<T, P>[src]

impl<T: NetworkEvent, P: PublicId> StructuralPartialEq for Malice<T, P>[src]

Auto Trait Implementations

impl<T, P> RefUnwindSafe for Malice<T, P> where
    P: RefUnwindSafe,
    T: RefUnwindSafe,
    <P as PublicId>::Signature: RefUnwindSafe

impl<T, P> Send for Malice<T, P> where
    P: Send,
    T: Send,
    <P as PublicId>::Signature: Send

impl<T, P> Sync for Malice<T, P> where
    P: Sync,
    T: Sync,
    <P as PublicId>::Signature: Sync

impl<T, P> Unpin for Malice<T, P>

impl<T, P> UnwindSafe for Malice<T, P> where
    P: RefUnwindSafe + UnwindSafe,
    T: UnwindSafe,
    <P as PublicId>::Signature: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,