Message types that transit over the network and related serialization code.
Ask for other peers addresses, required for network discovery.
First part of a handshake, sender advertises its version and characteristics.
Serializable wrapper for a list of block headers.
Serializable wrapper for the block locator.
Header of any protocol message, used to identify incoming messages.
Peer addresses we know of that are fresh enough, in response to GetPeerAddrs.
We found some issue in the communication, sending an error back, usually followed by closing the connection.
Second part of a handshake, receiver of the first part replies with its own version and characteristics.
Response to a txhashset archive request, must include a zip stream of the archive after the message body.
Request to get an archive of the full txhashset store, required to sync a new node.
A wrapper around a message header. If the header is for an unknown msg type then we will be unable to parse the msg itself (just a bunch of random bytes). But we need to know how many bytes to discard to discard the full message.
Grin's user agent with current version
Read a message body from the provided stream, always blocking until we have a result (or timeout).
Read (an unknown) message from the provided stream and discard it.
Read a header from the provided stream without blocking if the underlying stream is async. Typically headers will be polled for, so we do not want to block.
Read a single item from the provided stream, always blocking until we have a result (or timeout). Returns the item and the total bytes read.
Reads a full message from the underlying stream.