2.2 Message Layout
This section describes the Message Layout, its syntactical validation and additional metadata that may be stored by a node for a message.
MAX_MESSAGE_SIZEThe maximum allowed message size.
MIN_STRONG_PARENTSThe minimum amount of strong parents a message must reference.
126.96.36.199 Parameter Default Values
The following values shall be set as the default for the above parameters on initiation of the node application:
2.2.2 Message Structure
The structure of a Tangle message is defined in Table 2.2-1 below.
|Version||uint8||The message version. The schema specified in this specification is for version 1 only.|
|Parents count||uint8||The amount of parents preceding the current message.|
|Parents type||uint8||Bitwise encoding of parent type matching the order of preceding parents starting at |
Parents, ordered by hash ASC
|Issuer public key (Ed25519)||ByteArray||The public key of the node issuing the message.|
|Issuing timestamp||time||A value that shall represent the issuance time of the message.|
|Payload length||uint32||The length of the Payload in bytes. Since its type may be unknown to the node, it must be declared in advance. 0 length means no payload will be attached.|
An outline of a general payload
|Nonce||uint64||The nonce which lets this message fulfill the Rate Control requirement.|
|Signature (Ed25519)||ByteArray||Signature of the issuing node's private key signing the BLAKE2b-256 hash of the entire message bytes.|
Table 2.2.1: Message Structure.
2.2.3 Message ID
BLAKE2b-256 hash of the byte contents of the message. It shall be used by the nodes to index the messages and by external APIs.
2.2.4 Syntactical Validation
Messages that do not pass the Syntactical Validation shall be discarded. Only syntactically valid messages continue in the data flow, i.e., shall be allowed to pass to the Semantic Validation step.
A message is syntactically valid if:
- The message length does not exceed
- When the message parsing is complete, there are not any trailing bytes left that were not parsed.
- At least 1 and at most 8 distinct parents are given, ordered ASC and at least
MIN_STRONG_PARENTSare strong parents.
2.2.5 Semantic Validation
Messages that do not pass the Semantic Validation shall be discarded. Only semantically valid messages shall be allowed to continue in the data flow.
A message is semantically valid if:
- The Message PoW Hash contains at least the number of leading 0 defined as required by the Rate Control module (see Section 4.5 - Rate Control.
- The signature of the issuing node is valid.
- It passes the parents age checks (see Section 4.2 - Timestamps).
In addition to a message itself, a node may store additional data that describes its local perception of a message which is not part of the Tangle ('Message metadata'). Where such metadata is defined, the metadata element names and types defined in Table 2.2-2 below shall be used.
|receivedTime||time||The local time the message was received by the node.|
|solid||bool||Denotes whether a message is solid, i.e., its past cone is known.|
|solidificationTime||time||The local time the message got solid.|
|branchID||ByteArray||The branch ID of the message, i.e., the part of the Tangle where the message is located.|
|scheduled||bool||Denotes whether a message was scheduled by the scheduler.|
|booked||bool||Denotes whether a message was booked and therefore is part of the local Tangle.|
|eligible||bool||Denotes whether a message is eligible, i.e., it's timestamp is good.|
|invalid||bool||Denotes whether a message has been deemed invalid, i.e., it or its parents do not pass all checks from filters to message booker.|
|opinion||Opinion||Contains the node's opinion on the issuing timestamp of a message.|
Table 2.2.2: Message Metadata.