Expand description
Encoding and decoding of messages of the protocols used by Polkadot/Substrate.
Re-exports§
pub use crate::finality::decode::CommitMessageRef;pub use crate::finality::decode::UnsignedPrecommitRef;
Structs§
- Block
Announce Ref - Decoded block announcement notification.
- Block
Announces Handshake Decode Error - Error potentially returned by
decode_block_announces_handshake. - Block
Announces Handshake Ref - Decoded handshake sent or received when opening a block announces notifications substream.
- Block
Data - Block sent in a block response.
- Blocks
Request Config - Description of a block request that can be sent to a peer.
- Blocks
Request Fields - Which fields should be present in the response.
- Call
Proof Request Config - Description of a call proof request that can be sent to a peer.
- Catch
UpRef - Catch
UpRequest - Decode
Block Announce Error - Error potentially returned by
decode_block_announces_handshake. - Decode
Grandpa Notification Error - Error potentially returned by
decode_grandpa_notification. - Decode
Grandpa Warp Sync Response Error - Error potentially returned by
decode_grandpa_warp_sync_response. - Grandpa
Warp Sync Response - Response to a GrandPa warp sync request.
- Grandpa
Warp Sync Response Fragment - Response to a GrandPa warp sync request.
- Identify
Response - Description of a response to an identify request.
- Justification
- See
BlockData::justifications. - Neighbor
Packet - Prevote
Ref - Primary
Propose Ref - Protobuf
Decode Error - Error while decoding the Protobuf encoding.
- State
Request - Description of a state request that can be sent to a peer.
- Storage
Proof Request Config - Description of a storage proof request that can be sent to a peer.
- Unsigned
Prevote Ref - Vote
Message Ref
Enums§
- Blocks
Request Config Start - Which block the remote must return first.
- Blocks
Request Direction - Whether the first block should be the one with the highest number, of the one with the lowest number.
- Decode
Block Request Error - Error potentially returned by
decode_block_request. - Decode
Block Response Error - Error potentially returned by
decode_block_response. - Decode
Find Node Response Error - Error potentially returned by
decode_find_node_response. - Decode
Identify Response Error - Error potentially returned by
decode_identify_response. - Decode
State Response Error - Error potentially returned by
decode_state_response. - Decode
Storage Call Proof Response Error - Error potentially returned by
decode_storage_or_call_proof_response. - Grandpa
Notification Ref - Message
Ref - Protocol
Name - Name of a protocol that is part of the Substrate/Polkadot networking.
- Role
- Role a node reports playing on the network.
- State
Request Start - See
StateRequest::start_key. - Storage
OrCall Proof - Passed as parameter to
decode_storage_or_call_proof_responseto indicate what kind of request the response corresponds to.
Functions§
- build_
block_ request - Builds the bytes corresponding to a block request.
- build_
block_ response - Builds the bytes corresponding to a block response.
- build_
call_ proof_ request - Builds the bytes corresponding to a call proof request.
- build_
find_ node_ request - Builds a wire message to send on the Kademlia request-response protocol to ask the target to return the nodes closest to the parameter.
- build_
identify_ response - Builds the bytes corresponding to a block request.
- build_
state_ request - Builds the bytes corresponding to a state request.
- build_
storage_ proof_ request - Builds the bytes corresponding to a storage proof request.
- decode_
block_ announce - Decodes a block announcement.
- decode_
block_ announces_ handshake - Decodes a SCALE-encoded block announces handshake.
- decode_
block_ request - Decodes a blocks request.
- decode_
block_ response - Decodes a response to a block request.
- decode_
find_ node_ response - Decodes a response to a request built using
build_find_node_request. - decode_
grandpa_ notification - Attempt to decode the given SCALE-encoded Grandpa notification.
- decode_
grandpa_ warp_ sync_ response - Decodes a SCALE-encoded GrandPa warp sync response.
- decode_
identify_ response - Decodes a response to an identify request.
- decode_
protocol_ name - Decodes a protocol name into its components.
- decode_
state_ response - Decodes a response to a state request.
- decode_
storage_ or_ call_ proof_ response - Decodes a response to a storage proof request or a call proof request.
- encode_
block_ announce - Turns a block announcement into its SCALE-encoding ready to be sent over the wire.
- encode_
block_ announces_ handshake - Turns a block announces handshake into its SCALE-encoding ready to be sent over the wire.
- encode_
protocol_ name - Turns a
ProtocolNameinto its string version. Returns a list of objects that, when concatenated together, forms the string version of theProtocolName. - encode_
protocol_ name_ string - Turns a
ProtocolNameinto a string.