Struct exonum::messages::Precommit [] [src]

pub struct Precommit { /* fields omitted */ }

Pre-commit for a proposal.

Validation

A node panics if it has already sent a different Precommit for the same round.

Processing

Pre-commit is added to the list of known pre-commits. If a proposal is unknown to the node, ProposeRequest is sent in reply. If round number from the message is bigger than a node's "locked round", then a node replies with PrevotesRequest. If there are unknown transactions, then TransactionsRequest is sent in reply. If a validator receives +2/3 precommits for the same proposal with the same block_hash, then block is executed and Status is broadcast.

Generation

A node broadcasts Precommit in response to Prevote if there are +2/3 pre-votes and no unknown transactions.

Methods

impl Precommit
[src]

[src]

Creates message and signs it.

[src]

Creates message and appends existing signature.

[src]

Returns the hex representation of the binary data. Lower case letters are used (e.g. f9b4ca).

[src]

The validator id.

[src]

The height to which the message is related.

[src]

The round to which the message is related.

[src]

Hash of the corresponding Propose.

[src]

Hash of the new block.

[src]

Time of the Precommit.

Trait Implementations

impl Clone for Precommit
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Precommit
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl ServiceMessage for Precommit
[src]

SERVICE_ID: u16 = CONSENSUS

ID of the service this message belongs to.

MESSAGE_ID: u16 = 0 + 1 + 1 + 1 + 1

ID of the message itself. Should be unique within a service. Read more

impl Message for Precommit
[src]

[src]

Converts the raw message into the specific one.

[src]

Returns raw message.

[src]

Verifies the message using given public key.

impl<'a> SegmentField<'a> for Precommit
[src]

[src]

size of item fixed part that this Field collect.

[src]

count of items in collection

[src]

extend buffer with this collection

[src]

create collection from buffer

[src]

check collection data

impl AsRef<RawMessage> for Precommit
[src]

[src]

Performs the conversion.

impl FromHex for Precommit
[src]

[src]

Creates an instance of type Self from the given hex string, or fails with a custom error type. Read more

impl StorageValue for Precommit
[src]

Important traits for Vec<u8>
[src]

Serialize a value into a vector of bytes.

[src]

Deserialize a value from bytes.

impl Debug for Precommit
[src]

[src]

Formats the value using the given formatter. Read more

impl ExonumJson for Precommit
[src]

[src]

write deserialized field in buffer on place.

[src]

serialize field as json::Value

impl ExonumJsonDeserialize for Precommit
[src]

[src]

deserialize json value.

impl<'de> Deserialize<'de> for Precommit
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for Precommit
[src]

[src]

Serialize this value into the given Serde serializer. Read more

impl VoteMessage for Precommit
[src]

[src]

Return validator if of the message.

Auto Trait Implementations

impl Send for Precommit

impl Sync for Precommit