Nyzo techMessages

Messages

This page will include descriptions of all messages used in Nyzo. Deprecated messages will not be included.

Standard-operation messages

The 200 - 299 range is defined as "test messages" in the current code comments. However, the ping (200/201) message pair, which is the only message pair in the range, is used in standard operation. The test range will be absorbed into the standard operation range, which will encompass 0 - 299. In anticipation of this change, the ping (200) and ping response (201) are currently included in this section.

name
number
description
invalid
0
A placeholder number. Unused. As the name indicates, not a valid message.
transaction
5
Contains a single Nyzo transaction.
transaction response
6
Returned to the sender of a transaction message. Indicates whether the transaction was accepted. Includes a field for a human-readable message explaining acceptance or rejection of the transaction.
previous-hash request
7
Requests the height and hash of the verifier's current frozen edge.
previous-hash response
8
Returned in response to a previous-hash request. Should contain the height and hash of the frozen edge. This information is used when building transactions.
new block
9
Used by verifiers to send newly produced blocks to other verifiers.
new-block response
10
Acknowledges receipt of a new block.
block request
11
Used to request a series of blocks and, optionally, an initial balance list.
block response
12
Sent in response to a block request. To conserve resources, verifiers are configured to respond to block requests for no more than 10 blocks at a time and to limit frequency of responses that include balance lists.
transaction-pool request
13
Requests pending transactions from a verifier. This request must be self-signed (signed with the verifier's own private key).
transaction-pool response
14
Sent in response to a transaction-pool request. If the request is not self-signed, a valid but empty response is returned. Contains full transaction information for all pending transactions on the verifier.
mesh request
15
Requests a list of all nodes in the cycle.
mesh response
16
Sent in response to a mesh request. Returns a list of all nodes in the cycle. Each node includes identifier, IP address, TCP port, and queue timestamp according to the responding verifier. Currently has a maximum size of 10,000 nodes, but this limit should not be a concern for many years.
status request
17
Requests the status of the verifier. If the request is self-signed (signed with the verifier's own private key), the status response will contain additional details not contained in a typical status response.
status response
18
Sent in response to a status request. Provides, in plain text, various information about the current operational state of the verifier. If the status request is self-signed (signed with the verifier's own private key), this response will contain additional details not contained in a typical status response.
block vote
19
Sent to indicate choice of a block to become the new frozen edge. Contains the hash and block height of the block, along with the current timestamp. Sent over UDP.
block-vote response
20
An empty message indicating receipt of a block vote. While verifiers still produce this message in response to TCP block vote messages, they are seldom used because block votes are now sent over UDP.
new-verifier vote
21
Sent to indicate choice of the next verifier to join the cycle. Sent over UDP.
new-verifier vote response
22
An empty message indicating receipt of a new-verifier vote. While verifiers still produce this message in response to TCP new-verifier vote messages, they are seldom used because new-verifier votes are now sent over UDP.
missing-block-vote request
23
Requests a verifier's block vote at a specified height.
missing-block-vote response
24
Sent in response to a missing-block-vote request. Contains the vote for the requested height, if available.
missing-block request
25
Requests a missing block with a specified hash and height.
missing-block response
26
Sent in response to a missing-block request. Contains the block with the request height and hash, if available.
timestamp request
27
Requests the current timestamp of a verifier.
timestamp response
28
Sent in a response to a timestamp request. Contains the current timestamp of the verifier.
hash-vote override request
29
Requests setting the manual block-vote override to a specified hash at a specified height. If the hash is all zeros, clears the manual block-vote override at the specified height. This request must be self-signed (signed with the verifier's own private key).
hash-vote override response
30
Acknowledges receipt of a hash-vote override request. Indicates whether the override was accepted. Includes a plain-text explanation.
consensus-threshold override request
31
Requests setting the consensus threshold to a value other than 75% for the specified height. Expressed as an integer percentage of cycle length. If the value is 0, clears the consensus-threshold override at the specified height. This request must be self-signed (signed with the verifier's own private key).
consensus-threshold override response
32
Acknowledges receipt of a consensus-threshold override request. Indicates whether the override was accepted. Includes a plain-text explanation.
new-verifier-vote override request
33
Requests setting the new-verifier vote to the specified identifier. A value of all zeros erases the override. If not erased with a new override request, the override will persist until restart of the verifier or until the verifier represented by the override joins the cycle. This request must be self-signed (signed with the verifier's own private key).
new-verifier-vote override response
34
Acknowledges receipt of a new-verifier-vote override request. Indicates whether the override was accepted. Includes a plain-text explanation.
bootstrap request
35
Requests information useful for a verifier to begin tracking the cycle. This request contains a field for the TCP port of the requesting verifier, but the field is no longer used.
bootstrap response
36
Sent in response to a bootstrap request. Contains the frozen-edge height, frozen-edge hash, and identifiers in the cycle leading up to the frozen edge. This response is used by the ChainInitializationManager, which is used by both the verifier and client run modes to initialize blockchain tracking. This response is also used by the CycleTransactionSignScript to determine the next verifiers in the cycle and by SentinelUtil to initialize the frozen edge.
block-with-votes request
37
Requests a block and the cycle's corresponding block votes for a particular height.
block-with-votes response
38
Sent in response to a block-with-votes request. Contains a block and the cycle's latest block votes for the height of the block. Only produced for blocks at or behind the frozen edge.
verifier-removal vote
39
Sent from an in-cycle verifier to all other in-cycle verifiers to indicate which verifiers should be removed from the cycle due to poor performance.
verifier-removal-vote response
40
An empty message that acknowledges a verifier-removal-vote message.
full-mesh request
41
Requests a list of all nodes, both in-cycle and out-of-cycle.
full-mesh response
42
Sent in response to a full-mesh request. The structure is the same as message 16 (mesh response). Currently has a limit of 10,000 nodes. If the size of the full mesh is more than 10,000 nodes, includes all in-cycle nodes and a random subset of out-of-cycle nodes.
node join
43
Sent to request registering or updating a verifier's entry on another verifier. If the sending verifier is in-cycle or the update does not result in an identifier change at the IP address, this results in an immediate update. If the sending verifier is out-of-cycle and the message would either result in an identifier change or an addition of a new entry, the node is added to a queue for later querying before an update is performed.
node-join response
44
Sent in response to a node join. Results in the same updates as a node join, additionally updating information for out-of-cycle nodes that is not updated in some cases due to node joins.
frozen-edge balance list request
45
Requests the balance list of the verifier's current frozen edge. Does not specify height. Currently only used by MeshListenerStressScript.
frozen-edge balance list response
46
Sent in response to a frozen-edge balance list request. Contains the balance list of the current frozen edge. Only provided once per IP address per 10 minutes unless the IP address is whitelisted by the verifier. If requested more frequently, an empty but valid response is produced.
minimal block
51
Used by sentinels to send blocks for verifiers attempting to join the cycle. Contains only a verification timestamp and the block signature in the message object. Sent over UDP.
minimal-block response
52
Unused. Reserved to preserve request/response alignment with even and odd message numbers. Minimal blocks have only been sent over UDP, and responses have never been sent to UDP messages.
IP-address request
53
Requests the IPv4 address of this host as seen from the receiver. This is used by the sentinel in the automatic whitelist negotiation process.
IP-address response
54
Sent in response to an IP-address request. Contains the IPv4 address of the requester as seen by this host.
ping
200
A simple message for checking reachability.
ping response
201
Sent in response to a ping. Includes a human-readable message.

Maintenance messages

name
number
description
update request
300
Requests a verifier update. This request must be self-signed (signed with the verifier's own private key).
update response
301
Returned in response to an update request. Indicates whether the request was accepted. Includes a field for a human-readable message explaining acceptance or rejection of the request. If the request was accepted, initiates a pull of the latest code from the remote repository, a rebuild, and a restart. This message was used extensively before start of the public blockchain, but it has fallen out of use since the public blockchain began.

Debugging messages

This is described as "debugging and private messages" in the current code, and the whitelist request (424) and response (425) are currently included in this range. As the standard-operation range already includes several other private (self-signed) messages, the whitelist request and response would be more appropriately located in that range.

name
number
description
block-rejection request
400
Designed to request rejection of blocks to simulate a brief outage. This message is not yet implemented.
block-rejection response
401
Designed to be sent in response to a block-rejection request. This message is not yet implemented.
detachment request
402
Designed to request that a verifier fail to produce a block for two cycles to simulate a verifier tracking problem. This message is not yet implemented.
detachment response
403
Designed to be sent in response to a detachment request. This message is not yet implemented.
unfrozen-block-pool purge request
404
Requests clearing of the unfrozenBlocks map in UnfrozenBlockManager.
unfrozen-block-pool purge response
405
Indicates whether the unfrozen-block-pool purge request was accepted. Includes a plain-text explanation.
unfrozen-block-pool status request
406
Requests information about the contents of the unfrozenBlocks map in UnfrozenBlockManager.
unfrozen-block-pool status response
407
Produced in response to an unfrozen-block-pool status request. Shows information about block heights, hashes, verifier identifiers, chain scores, and block vote.
mesh status request
408
Requests textual information regarding the nodes returned by the NodeManager.getMesh() method.
mesh status response
409
Produced in response to a mesh status request. This message was used extensively in pre-release testing. However, this response is limited to 2000 nodes, which limits its utility with the current Nyzo queue.
toggle-pause request
410
Intended to request completely pausing a verifier to simulate an outage. This message is not currently implemented.
toggle-pause response
411
Intended to be produced in response to a toggle-pause request. This message is not currently implemented.
consensus-tally status request
412
Requests the internal state of the BlockVoteManager for the block one past the frozen edge.
consensus-tally status response
413
Provides a plain-text list of all block votes in BlockVoteManager for the block one past the frozen edge. First displays the nickname (or identifier, if no nickname is available) and the compact hash of the vote of each in-cycle verifier from which a vote has been received. Then, displays the full hash and vote count for each block for which a vote has been received.
new-verifier-tally status request
414
Requests the internal state of the NewVerifierVoteManager
new-verifier-tally status response
415
Provides a plain-text list of the identifiers, nicknames (if available), and vote counts in NewVerifierVoteManager.