[][src]Module exonum::messages

Handling messages received from P2P node network.

Every message passes through three phases:

  • Vec<u8>: raw bytes as received from the network
  • SignedMessage: integrity and signature of the message has been verified
  • Message: the message has been completely parsed and has correct structure

Graphical representation of the message processing flow:

+---------+             +---------------+                  +----------+
| Vec<u8> |--(verify)-->| SignedMessage |--(deserialize)-->| Message |-->(handle)
+---------+     |       +---------------+        |         +----------+
                |                                |
                V                                V
             (drop)                           (drop)

Structs

BlockRequest

Request for the block with the given height.

BlockResponse

Information about a block.

Connect

Connect to a node.

PeersRequest

Request connected peers from a node.

Precommit

Pre-commit for a proposal.

Prevote

Pre-vote for a new block.

PrevotesRequest

Request for pre-votes.

Propose

Proposal for a new block.

ProposeRequest

Request for the Propose.

RawTransaction

Transaction raw buffer. This struct is used to transfer transactions in network.

ServiceTransaction

Concrete raw transaction transaction inside TransactionSet. This type is used inside #[derive(TransactionSet)] to return raw transaction payload as part of service transaction set.

Signed

Wraps a Payload together with the corresponding SignedMessage.

Status

Current node status.

TransactionsRequest

Request for transactions by hash.

TransactionsResponse

Information about the transactions.

Enums

Consensus

Exonum consensus specific node messages.

Message

Composition of every exonum protocol messages. This messages used in network p2p communications.

Requests

Exonum node requests.

Responses

Exonum node responses.

Service

Exonum basic node messages.

Constants

PROTOCOL_MAJOR_VERSION

Version of the protocol. Different versions are incompatible.

RAW_TRANSACTION_EMPTY_SIZE

Signed<RawTransaction> size with empty transaction inside.

Traits

BinaryForm

Helper trait to define serialization format.

Functions

to_hex_string

Returns hexadecimal string representation of message.