diff --git a/_includes/devdoc/ref_p2p_networking.md b/_includes/devdoc/ref_p2p_networking.md index 73720d33..d72f733f 100644 --- a/_includes/devdoc/ref_p2p_networking.md +++ b/_includes/devdoc/ref_p2p_networking.md @@ -1751,18 +1751,15 @@ wallet) to minimize data usage. | --- | --- | --- | --- | | 1 | fSendDSQueue | bool | 0 - Notify peer to not send any `dsq` messages
1 - Notify peer to send all `dsq` messages - {% endautocrossref %} - #### SendHeaders {% include helpers/subhead-links.md %} @@ -1960,7 +1957,15 @@ the Developer Guide [InstantSend section](developer-guide#instantsend +{% highlight text %} +c1310100 ................................... Block Height: 78273 + +03bb286a877135fad3b33ea9cce9a525 +e5edc0879411afaff513b30100000000 ........... Block Hash + +12a3331fd8d0008804edaaf94c57b491 +d36f38f1993d06dfff71df9ec83da463 +dcd5497d105932e609016dac075f02df +1259951e3bcebfcc26afc904f6cd92df +7ff9b8c6c2ac9dcc9cb1a7dc7ec03bcc +005574710c3aabc2f8670959cf8bc9b5 ........... LLMQ BLS Signature {% endhighlight %} ---> {% endautocrossref %} #### islock @@ -1986,24 +2003,45 @@ message header has been omitted.) *Added in protocol version 70214 of Dash Core* -The `islock` message is used to... +The `islock` message is used to provide details of transactions that have been +locked by LLMQ-based InstantSend. The message includes the details of all +transaction inputs along with the transaction ID and the BLS signature of the +LLMQ that approved the transaction lock. | Bytes | Name | Data type | Description | | --- | --- | --- | --- | -| 1-9 | inputsSize | compactSize uint | Number of inputs| +| 1-9 | inputsSize | compactSize uint | Number of inputs | | 36 * `inputsSize`| inputs | COutPoint | Outpoints used in the transaction | | 32 | txid | uint256 | TXID of the locked transaction | | 96 | sig | byte[] | LLMQ BLS Signature | - {% endautocrossref %} #### ix @@ -2785,7 +2823,7 @@ The `mnauth` message is sent by a masternode immediately after sending a sent when the sender is actually a masternode. The `mnauth` message signs a challenge that was previously sent via a -`version` message. The challenge is signed differently depending on depending on +`version` message. The challenge is signed differently depending on if the connection is inbound or outbound. This is primarily used as a DoS protection mechanism to allow persistent @@ -2794,18 +2832,24 @@ are reached. | Bytes | Name | Data type | Description | | --- | --- | --- | --- | -| 2 | proRegTxHash | uint256 | Version of the message +| 32 | proRegTxHash | uint256 | Version of the message | 96 | sig | byte[] | BLS signature, signed with the operator key of the masternode - {% endautocrossref %} @@ -2892,6 +2936,11 @@ section][section message header] for an example of a message without a payload. #### Distributed Key Generation {% include helpers/subhead-links.md %} +The following network messages enable the creation of long living masternode +quorums (LLMQs) as described in [DIP6](https://github.com/dashpay/dips/blob/master/dip-0006.md). + +With the exception of the `qfcommit` message, these messages are for intra-quorum +communication only and are not propagated on the Dash network. ##### qcontrib {% include helpers/subhead-links.md %} @@ -3104,6 +3153,12 @@ message header has been omitted.) #### Signing Sessions {% include helpers/subhead-links.md %} +The following network messages enable the long living masternode quorum (LLMQ) +message signing sessions described in [DIP7](https://github.com/dashpay/dips/blob/master/dip-0007.md). + +With the exception of the `qsendrecsigs` message and the `qsigrec` message, +these messages are for intra-quorum communication only and are not +propagated on the Dash network. ##### qbsigs {% include helpers/subhead-links.md %} @@ -3124,24 +3179,59 @@ Note: The number of messages that can be sent in a batch is limited to 400 | Bytes | Name | Data type | Description | | --- | --- | --- | --- | -| Varies | msgs | CBatchedSigShares | Batches of signature shares +| Varies | batchCount | compactSize uint | Number of batched signature shares | +| Varies | msgs | CBatchedSigShares | Batches of signature shares | CBatchedSigShares: | Bytes | Name | Data type | Description | | --- | --- | --- | --- | -| 4 | sessionId | uint32_t | Signing session ID -| | sigShares | | +| Varies | sessionId | varint | Signing session ID | +| Varies | shareCount | compactSize uint | Number of shares | +| shareCount * 98 | sigShares | | Index (2 bytes) and BLS Signature share (96 bytes) | - +{% highlight text %} +02 ......................................... Number of signature share batches: 2 + +Signature Share Batch 1 +| 84d843 ................................... Session ID +| +| 01 ....................................... Share count: 1 +| +| Share +| | 2100 ................................... Index +| +| | 0fbd0c0981b79544c3e80d1a2eed13fe +| | f08c731b0156654675209812f9b2b8f3 +| | ec23868d26890a0e85e5cec4ad0e2d46 +| | 01293cf7e41841fda5865063e7354f36 +| | e8a5c13d2c2d265a778f41e807b3cc63 +| | 81e202ecf923c62bbb69ecc713bdf86d ....... BLS Signature share + +Signature Share Batch 2 +| 84d844 ................................... Session ID +| +| 01 ....................................... Share Count: 1 +| +| Share +| | 2100 ................................... Index +| | +| | 9570d97e41b78045b51fba3d4f1ea38d +| | 7a0e007535ce6beb1e03eff163b421fd +| | b8125142a12f92aa82770de7bb038207 +| | 13ccc72dd6d9bf91ecc2835da54a0afb +| | 0c0fa5d7a214a020ca650ca202ddff29 +| | c3cac4033098297d2aaee098db5bfe2f ....... BLS Signature share {% endhighlight %} ---> {% endautocrossref %} @@ -3164,19 +3254,29 @@ Note: The number of inventories in a `qgetsigs` message is limited to 200 | Bytes | Name | Data type | Description | | --- | --- | --- | --- | -| 4 | sessionId | uint32_t | Signing session ID -| 1-9 | invSize | compactSize uint | Number of inventory -| * `invSize` | inv | | Signing shares +| Varies | count | compactSize uint | Number of signature shares requested | +| Varies | sessionId | varint | Signing session ID +| Varies | inv | | Quorum signature inventory | - +{% highlight text %} +02 ......................................... Count: 2 + +Signature share request 1 +| 80db21 ................................... Session ID +| 32012900 ................................. Inventory + +Signature share request 2 +| 80db22 ................................... Session ID +| 32012900 ................................. Inventory {% endhighlight %} ---> {% endautocrossref %} @@ -3199,15 +3299,13 @@ in the higher level messages. | --- | --- | --- | --- | | 1 | fSendRecSigs | bool | 0 - Notify peer to not send plain LLMQ recovered signatures
1 - Notify peer to send plain LLMQ recovered signatures (default for Dash Core nodes) - {% endautocrossref %} @@ -3231,15 +3329,33 @@ details to nodes that have requested this information via the `qsendrecsigs` mes More information can be found in the [Recovered threshold signatures section of DIP7](https://github.com/dashpay/dips/blob/master/dip-0007.md#recovered-threshold-signatures). - {% endautocrossref %} @@ -3263,21 +3379,53 @@ Note: The maximum number of announcements in a `qsigsesann` message is limited t | Bytes | Name | Data type | Description | | --- | --- | --- | --- | -| 4 | sessionId | uint32_t | Signing session ID (must be less than the maximum uint32_t value) +| Varies | count | compactSize uint | Number of session announcements | +| Varies | sessionId | varint | Signing session ID (must be less than the maximum uint32_t value) | 1 | llmqType | uint8_t | The LLMQ type | 32 | quorumHash | uint256 | The quorum identifier | 32 | id | uint256 | The signing request id | 32 | msgHash | uint256 | The message hash - +{% highlight text %} +02 ......................................... Count: 2 + +Session Announcement 1 +| 84d843 ................................... Session ID +| +| 01 ....................................... LLMQ Type: 1 (LLMQ_50_60) +| +| a34d3ae6b33cb1199c3e5e1cb5a2a55c +| 91e69bb5df2bf80ba1cb0a0d00000000 ......... Quorum Hash +| +| 89bbc2e5741a9f706e8d33dee4132037 +| 8c33511768c5e3d6cdb2a1b7b731360b ......... Signing request ID +| +| d2b41a19237e370b4b091545b203bc0c +| 02ca7e0d5daebf12bb24b13064ed4149 ......... Message Hash + +Session Announcement 2 +| 84d844 ................................... Session ID +| +| 01 ....................................... LLMQ Type: 1 (LLMQ_50_60) +| +| a34d3ae6b33cb1199c3e5e1cb5a2a55c +| 91e69bb5df2bf80ba1cb0a0d00000000 ......... Quorum Hash +| +| 54f73deb42a8ed9b72b9c0535a72f54d +| 5789bbe0dbea2e184c3089f9e8f65c3e ......... Signing request ID +| +| af2e5d730cd37cd911b92db117b4ab99 +| 90a3c0300ce39177d0d31be5b47c2361 ......... Message Hash {% endhighlight %} ---> {% endautocrossref %} @@ -3298,21 +3446,32 @@ signature share inventories known by the transmitting peer. Note: The maximum number of inventories in a `qsigsinv` message is limited to 200 (as defined by `MAX_MSGS_CNT_QSIGSHARESINV`). + + | Bytes | Name | Data type | Description | | --- | --- | --- | --- | -| 4 | sessionId | uint32_t | Signing session ID (must be less than the maximum uint32_t value) -| 8 | invSize | uint64_t | -| | inv | | +| Varies | count | compactSize uint | Number of session announcements | +| Varies | sessionId | varint | Signing session ID (must be less than the maximum uint32_t value) | +| Varies | inv | | Quorum signature inventory | - +{% highlight text %} +02 ......................................... Count: 2 + +84d844 ..................................... Session ID +32011a040200 ............................... Inventory + +84d843 ..................................... Session ID +32011a0700 ................................. Inventory {% endhighlight %} ---> {% endautocrossref %}