V0.14.0 New P2P msgs (initial) (#113)

* P2P - Add placeholders for new messages

 - Misc: senddsq, clsig, islock, mnauth
 - Quorum: qsendrecsigs, qcomplaint, qjustify, qpcommit, qwatch, 
qdebugstatus, qsigsesann, qsigsinv, qgetsigs, qbsigs, qsigrec

* P2P - Add new inventory types

* P2P - Add new messages to cross-ref and search (incomplete)

Some new messages don't have descriptions yet

* P2P - Indicate quorum-related msgs that are not broadcast network wide

These msgs are for intra-quorum comm

* P2P - Sort quorum msgs to alphabetical order

* P2P - Add details to SendDsq

* P2P - Add field details to some new quorum msgs
 - qbsigs, qsigsesann, and qsigsinv

* P2P - Add partial details to ClSig msg

* P2P - Add partial details to qcomplaint and qcontrib

* P2P - Add DIP8 links

* P2P - Fix some field sizes

* P2P - Add partial details to justification and premature commitment

* P2P - Add qwatch details

* P2P - Add partial qdebugstatus details

* P2P - Formatting update

* P2P - Add details to ISLock and MNAuth

* Formatting and typo corrections

* P2P - Add partiall details to qsendrecsigs and qsigrec messages

* Formatting - organize Quorum messages into sub-catergories
 - Debugging, Distributed Key Generateion, and Signing Sessions

* Formatting - Fix link issue

* P2P - Add missing qcontrib info

* P2P - Partial detail for qsigsesann and qgetsigs

* P2P - More partial details for quorum signing messages
This commit is contained in:
thephez 2019-03-27 12:59:33 -04:00 committed by GitHub
parent c7f3356cfd
commit 7fd1d94b37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 673 additions and 12 deletions

View file

@ -24,6 +24,8 @@ bitcoinj:
'`blocktxn` messages': blocktxn message '`blocktxn` messages': blocktxn message
'CbTx': coinbase special tx 'CbTx': coinbase special tx
certificate chain: certificate chain:
'`clsig` message': clsig message
'`clsig` messages': clsig message
'`cmpctblock` message': cmpctblock message '`cmpctblock` message': cmpctblock message
'`cmpctblock` messages': cmpctblock message '`cmpctblock` messages': cmpctblock message
DER: DER:
@ -86,6 +88,8 @@ intermediate certificate:
intermediate certificates: intermediate certificate intermediate certificates: intermediate certificate
'`inv` message': inv message '`inv` message': inv message
'`inv` messages': inv message '`inv` messages': inv message
'`islock` message': islock message
'`islock` messages': islock message
'`ix` message': ix message '`ix` message': ix message
'`ix` messages': ix message '`ix` messages': ix message
IP address: DO NOT AUTOCROSSREF IP address: DO NOT AUTOCROSSREF
@ -113,6 +117,8 @@ merge:
Merge avoidance: DO NOT AUTOCROSSREF Merge avoidance: DO NOT AUTOCROSSREF
micropayment channel: micropayment channel:
micropayment channels: micropayment channel micropayment channels: micropayment channel
'`mnauth` message': mnauth message
'`mnauth` messages': mnauth message
'`mnb` message': mnb message '`mnb` message': mnb message
'`mnb` messages': mnb message '`mnb` messages': mnb message
'`mnget` message': mnget message '`mnget` message': mnget message
@ -176,8 +182,30 @@ protocol version 70013: section protocol versions
protocol version 70014: section protocol versions protocol version 70014: section protocol versions
public key infrastructure: pki public key infrastructure: pki
'QcTx': quorum commitment special tx 'QcTx': quorum commitment special tx
'`qbsigs` message': qbsigs message
'`qbsigs` messages': qbsigs message
'`qcomplaint` message': qcomplaint message
'`qcomplaint` messages': qcomplaint message
'`qcontrib` message': qcontrib message
'`qcontrib` messages': qcontrib message
'`qdebugstatus` message': qdebugstatus message
'`qdebugstatus` messages': qdebugstatus message
'`qfcommit` message': qfcommit message '`qfcommit` message': qfcommit message
'`qfcommit` messages': qfcommit message '`qfcommit` messages': qfcommit message
'`qgetsigs` message': qgetsigs message
'`qgetsigs` messages': qgetsigs message
'`qjustify` message': qjustify message
'`qjustify` messages': qjustify message
'`qpcommit` message': qpcommit message
'`qpcommit` messages': qpcommit message
'`qsigrec` message': qsigrec message
'`qsigrec` messages': qsigrec message
'`qsigsesann` message': qsigsesann message
'`qsigsesann` messages': qsigsesann message
'`qsigsinv` message': qsigsinv message
'`qsigsinv` messages': qsigsinv message
'`qwatch` message': qwatch message
'`qwatch` messages': qwatch message
'`r`': r '`r`': r
receipt: DO NOT AUTOCROSSREF receipt: DO NOT AUTOCROSSREF
recurrent rebilling: recurrent rebilling:
@ -192,6 +220,8 @@ RPCs: rpc
secp256k1: secp256k1:
'`sendcmpct` message': sendcmpct message '`sendcmpct` message': sendcmpct message
'`sendcmpct` messages': sendcmpct message '`sendcmpct` messages': sendcmpct message
'`senddsq` message': senddsq message
'`senddsq` messages': senddsq message
'`spork` message': spork message '`spork` message': spork message
'`spork` messages': spork message '`spork` messages': spork message
'`ssc` message': ssc message '`ssc` message': ssc message

View file

@ -544,6 +544,7 @@ devsearches:
- "pong": "/en/developer-reference#pong" - "pong": "/en/developer-reference#pong"
- "reject": "/en/developer-reference#reject" - "reject": "/en/developer-reference#reject"
- "sendcmpct": "/en/developer-reference#sendcmpct" - "sendcmpct": "/en/developer-reference#sendcmpct"
- "senddsq": "/en/developer-reference#senddsq"
- "tx": "/en/developer-reference#tx" - "tx": "/en/developer-reference#tx"
- "verack": "/en/developer-reference#verack" - "verack": "/en/developer-reference#verack"
- "version": "/en/developer-reference#version" - "version": "/en/developer-reference#version"
@ -553,6 +554,8 @@ devsearches:
- "spork": "/en/developer-reference#spork" - "spork": "/en/developer-reference#spork"
# Dash - instantsend # Dash - instantsend
- "clsig": "/en/developer-reference#clsig"
- "islock": "/en/developer-reference#islock"
- "ix": "/en/developer-reference#ix" - "ix": "/en/developer-reference#ix"
- "txlvote": "/en/developer-reference#txlvote" - "txlvote": "/en/developer-reference#txlvote"
@ -567,6 +570,29 @@ devsearches:
- "dstx": "/en/developer-reference#dstx" - "dstx": "/en/developer-reference#dstx"
# Dash - masternode # Dash - masternode
- "ssc": "/en/developer-reference#ssc"
- "mnauth": "/en/developer-reference#mnauth"
# Dash - quorums
- "qbsigs": "/en/developer-reference#qbsigs"
- "qcomplaint": "/en/developer-reference#qcomplaint"
- "qcontrib": "/en/developer-reference#qcontrib"
- "qdebugstatus": "/en/developer-reference#qdebugstatus"
- "qfcommit": "/en/developer-reference#qfcommit"
- "qgetsigs": "/en/developer-reference#qgetsigs"
- "qjustify": "/en/developer-reference#qjustify"
- "qpcommit": "/en/developer-reference#qpcommit"
- "qsigrec": "/en/developer-reference#qsigrec"
- "qsigsesann": "/en/developer-reference#qsigsesann"
- "qsigsinv": "/en/developer-reference#qsigsinv"
- "qwatch": "/en/developer-reference#qwatch"
# Dash - governance
- "govobj": "/en/developer-reference#govobj"
- "govobjvote": "/en/developer-reference#govobjvote"
- "govsync": "/en/developer-reference#govsync"
# Dash - deprecated
- "dseg": "/en/developer-reference#dseg" - "dseg": "/en/developer-reference#dseg"
- "mnb": "/en/developer-reference#mnb" - "mnb": "/en/developer-reference#mnb"
- "mnget": "/en/developer-reference#mnget" - "mnget": "/en/developer-reference#mnget"
@ -574,13 +600,6 @@ devsearches:
- "mnv": "/en/developer-reference#mnv" - "mnv": "/en/developer-reference#mnv"
- "mnw": "/en/developer-reference#mnw" - "mnw": "/en/developer-reference#mnw"
- "mnwb": "/en/developer-reference#mnwb" - "mnwb": "/en/developer-reference#mnwb"
- "ssc": "/en/developer-reference#ssc"
- "qfcommit": "/en/developer-reference#qfcommit"
# Dash - governance
- "govobj": "/en/developer-reference#govobj"
- "govobjvote": "/en/developer-reference#govobjvote"
- "govsync": "/en/developer-reference#govsync"
donation_banner: donation_banner:
address: 1GwV7fPX97hmavc6iNrUZUogmjpLPrPFoE address: 1GwV7fPX97hmavc6iNrUZUogmjpLPrPFoE

View file

@ -165,7 +165,15 @@ The currently-available type identifiers are:
| 17 | [`MSG_GOVERNANCE_OBJECT`][msg_governance_object]{:#term-msg_governance_object}{:.term} | The hash is a Governance Object. | 17 | [`MSG_GOVERNANCE_OBJECT`][msg_governance_object]{:#term-msg_governance_object}{:.term} | The hash is a Governance Object.
| 18 | [`MSG_GOVERNANCE_OBJECT_VOTE`][msg_governance_object_vote]{:#term-msg_governance_object_vote}{:.term} | The hash is a Governance Object Vote. | 18 | [`MSG_GOVERNANCE_OBJECT_VOTE`][msg_governance_object_vote]{:#term-msg_governance_object_vote}{:.term} | The hash is a Governance Object Vote.
| 20 | [`MSG_CMPCT_BLOCK`][msg_cmpct_block]{:#term-msg_cmpct_block}{:.term} | The hash is of a block header; identical to `MSG_BLOCK`. When used in a `getdata` message, this indicates the response should be a `cmpctblock` message. **Only for use in `getdata` messages.** | 20 | [`MSG_CMPCT_BLOCK`][msg_cmpct_block]{:#term-msg_cmpct_block}{:.term} | The hash is of a block header; identical to `MSG_BLOCK`. When used in a `getdata` message, this indicates the response should be a `cmpctblock` message. **Only for use in `getdata` messages.**
| 21 | [`MSG_QUORUM_FINAL_COMMITMENT`][msg_quorum_final_commitment]{:#term-msg_quorum_final_commitment}{:.term} | The hash is a long-living masternode quorum final commitment. | 21 | [`MSG_QUORUM_FINAL_COMMITMENT`][msg_quorum_final_commitment]{:#term-msg_quorum_final_commitment}{:.term} | The hash is a long-living masternode quorum final commitment.<br>_Added in 0.13.0_
| 23 | [`MSG_QUORUM_CONTRIB`][msg_quorum_contrib]{:#term-msg_quorum_contrib}{:.term} | The hash is a long-living masternode quorum contribution.<br>_Added in 0.14.0_
| 24 | [`MSG_QUORUM_COMPLAINT`][msg_quorum_complaint]{:#term-msg_quorum_complaint}{:.term} | The hash is a long-living masternode quorum complaint.<br>_Added in 0.14.0_
| 25 | [`MSG_QUORUM_JUSTIFICATION`][msg_quorum_justification]{:#term-msg_quorum_justification}{:.term} | The hash is a long-living masternode quorum justification.<br>_Added in 0.14.0_
| 26 | [`MSG_QUORUM_PREMATURE_COMMITMENT`][msg_quorum_premature_commitment]{:#term-msg_quorum_premature_commitment}{:.term} | The hash is a long-living masternode quorum premature commitment.<br>_Added in 0.14.0_
| 27 | [`MSG_QUORUM_DEBUG_STATUS`][msg_quorum_debug_status]{:#term-msg_quorum_debug_status}{:.term} | The hash is a long-living masternode quorum debug status.<br>_Added in 0.14.0_
| 28 | [`MSG_QUORUM_RECOVERED_SIG`][msg_quorum_recovered_sig]{:#term-msg_quorum_recovered_sig}{:.term} | The hash is a long-living masternode quorum recovered signature.<br>_Added in 0.14.0_
| 29 | [`MSG_CLSIG`][msg_clsig]{:#term-msg_clsig}{:.term} | The hash is a ChainLock signature.<br>_Added in 0.14.0_
| 30 | [`MSG_ISLOCK`][msg_islock]{:#term-msg_islock}{:.term} | The hash is an LLMQ-based InstantSend lock.<br>_Added in 0.14.0_
The deprecated type identifiers are: The deprecated type identifiers are:
@ -182,6 +190,7 @@ The deprecated type identifiers are:
| 14 | [`MSG_MASTERNODE_ANNOUNCE`][msg_masternode_announce]{:#term-msg_masternode_announce}{:.term} | **Deprecated in 0.14.0**<br><br>The hash is a Masternode Broadcast. | 14 | [`MSG_MASTERNODE_ANNOUNCE`][msg_masternode_announce]{:#term-msg_masternode_announce}{:.term} | **Deprecated in 0.14.0**<br><br>The hash is a Masternode Broadcast.
| 15 | [`MSG_MASTERNODE_PING`][msg_masternode_ping]{:#term-msg_masternode_ping}{:.term} | **Deprecated in 0.14.0**<br><br>The hash is a Masternode Ping. | 15 | [`MSG_MASTERNODE_PING`][msg_masternode_ping]{:#term-msg_masternode_ping}{:.term} | **Deprecated in 0.14.0**<br><br>The hash is a Masternode Ping.
| 19 | [`MSG_MASTERNODE_VERIFY`][msg_masternode_verify]{:#term-msg_masternode_verify}{:.term} | **Deprecated in 0.14.0**<br><br>The hash is a Masternode Verify. | 19 | [`MSG_MASTERNODE_VERIFY`][msg_masternode_verify]{:#term-msg_masternode_verify}{:.term} | **Deprecated in 0.14.0**<br><br>The hash is a Masternode Verify.
| 22 | `MSG_QUORUM_DUMMY_COMMITMENT` | **Deprecated in 0.14.0**<br><br>Temporarily used on Testnet only.
Type identifier zero and type identifiers greater than twenty are reserved Type identifier zero and type identifiers greater than twenty are reserved
for future implementations. Dash Core ignores all inventories with for future implementations. Dash Core ignores all inventories with
@ -1726,6 +1735,34 @@ header has been omitted.)
{% endautocrossref %} {% endautocrossref %}
#### SendDsq
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
The `senddsq` message is used to notify a peer whether or not to send `dsq` messages.
This allows clients that are not interested in PrivateSend mixing (e.g. mobile
wallet) to minimize data usage.
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 1 | fSendDSQueue | bool | 0 - Notify peer to not send any `dsq` messages<br>1 - Notify peer to send all `dsq` messages
<!--
The following annotated hexdump shows a `senddsq` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
#### SendHeaders #### SendHeaders
{% include helpers/subhead-links.md %} {% include helpers/subhead-links.md %}
@ -1916,6 +1953,59 @@ the Developer Guide [InstantSend section](developer-guide#instantsend<!--noref--
{% endautocrossref %} {% endautocrossref %}
#### clsig
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
The `clsig` message is used to...
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 4 | nHeight | int32_t | Block height
| 32 | blockHash | uint256 | Block hash
| 96 | sig | CBLSSignature | LLMQ BLS signature
<!--
The following annotated hexdump shows a `clsig` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
#### islock
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
The `islock` message is used to...
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 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 |
<!--
The following annotated hexdump shows a `islock` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
#### ix #### ix
{% include helpers/subhead-links.md %} {% include helpers/subhead-links.md %}
@ -2683,7 +2773,288 @@ bf110000 ................................... Count: 4543
{% endautocrossref %} {% endautocrossref %}
#### qfcommit #### mnauth
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
The `mnauth` message is sent by a masternode immediately after sending a
`verack` message to authenticate that the sender is a masternode. It is only
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
if the connection is inbound or outbound.
This is primarily used as a DoS protection mechanism to allow persistent
connections between masternodes to remain open even if inbound connection limits
are reached.
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 2 | proRegTxHash | uint256 | Version of the message
| 96 | sig | byte[] | BLS signature, signed with the operator key of the masternode
<!--
The following annotated hexdump shows a `mnauth` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
### Quorum Messages
{% include helpers/subhead-links.md %}
{% autocrossref %}
The following network messages enable the long-living masternode quorum (LLMQ)
features built in to Dash.
{% endautocrossref %}
#### Debugging
{% include helpers/subhead-links.md %}
##### qdebugstatus
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
The `qdebugstatus` message is used to...
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 32 | proTxHash | uint256 | The ProRegTx hash
| 8 | nTime | int64_t |
| 1-9 | sessionsSize | compactSize uint |
| `sessionsSize` * <> | sessions | <uint8_t, CDKGDebugSessionStatus> |
| 96 | sig | byte[] | BLS signature
`CDKGDebugSessionStatus`:
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 1 | llmqType | uint8_t | The type of LLMQ
| 32 | quorumHash | uint256 | The quorum identifier
| 4 | quorumHeight | uint32_t | The quorum height
| 1 | phase | uint8_t | The DKG phase of the quorum
| 1-9 | membersSize | compactSize uint |
| `membersSize` * <> | members | CDKGDebugMemberStatus |
`CDKGDebugMemberStatus`:
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 1 | statusBitset | uint8_t |
| 32 * <> | complaintsFromMembers | uint16_t |
<!--
The following annotated hexdump shows a `qdebugstatus` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
##### qwatch
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
The `qwatch` message tells the receiving peer to relay LLMQ messages
(`qcontrib` messages, `qcomplaint` messages, `qjustify` messages, and
`qpcommit` messages).
There is no payload in a `qwatch` message. See the [message header
section][section message header] for an example of a message without a payload.
{% endautocrossref %}
#### Distributed Key Generation
{% include helpers/subhead-links.md %}
##### qcontrib
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
![Warning icon](/img/icons/icon_warning.svg) Note: This message is used for
intra-quorum communication and is only sent to the masternodes in the LLMQ and
nodes that are monitoring in Watch Mode for auditing/debugging purposes.
The `qcontrib` message is used by each member of the DKG process to send key
contributions to all other members.
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 1 | llmqType | uint8_t | The type of LLMQ
| 32 | quorumHash | uint256 | The quorum identifier
| 32 | proTxHash | uint256 | The ProRegTx hash of the complaining member
| 1-9 | vvecSize | compactSize uint | The size of the verification vector
| 48 * `vvecSize` | vvec | BLSPubKey[] | The verification vector
| 1-9 | skCount | compactSize uint | Number of encrypted secret key contributions
| 32 * `skCount` | skContributions | byte[] | Secret key contributions encrypted to recipient masternodes BLS public operator key
| 96 | sig | byte[] | BLS signature, signed with the operator key of the contributing masternode
More information can be found in the [Contribution phase section of DIP6](https://github.com/dashpay/dips/blob/master/dip-0006.md#2-contribution-phase).
<!--
The following annotated hexdump shows a `qcontrib` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
##### qcomplaint
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
![Warning icon](/img/icons/icon_warning.svg) Note: This message is used for
intra-quorum communication and is only sent to the masternodes in the LLMQ and
nodes that are monitoring in Watch Mode for auditing/debugging purposes.
The `qcomplaint` message is used to notify other members of the DKG process of
any members that provided an invalid secret key contribution.
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 1 | llmqType | uint8_t | The type of LLMQ
| 32 | quorumHash | uint256 | The quorum identifier
| 32 | proTxHash | uint256 | The ProRegTx hash of the complaining member
| 1-9 | badBitSize | compactSize uint | Number of bits in the bad members bitvector
| (`badBitSize` + 7) / 8 | badMembers | byte[] | The bad members bitvector
| 1-9 | complaintsBitSize | compactSize uint | Number of bits in the complaints bitvector
| (`complaints`<br>`BitSize` + 7) / 8 | complaints | byte[] | The complaints bitvector
| 96 | sig | byte[] | BLS signature, signed with the operator key of the contributing masternode
More information can be found in the [Complaining phase section of DIP6](https://github.com/dashpay/dips/blob/master/dip-0006.md#3-complaining-phase).
<!--
The following annotated hexdump shows a `qcomplaint` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
##### qjustify
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
![Warning icon](/img/icons/icon_warning.svg) Note: This message is used for
intra-quorum communication and is only sent to the masternodes in the LLMQ and
nodes that are monitoring in Watch Mode for auditing/debugging purposes.
The `qjustify` message is used to...
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 1 | llmqType | uint8_t | The type of LLMQ
| 32 | quorumHash | uint256 | The quorum identifier
| 32 | proTxHash | uint256 | The ProRegTx hash of the complaining member
| 1-9 | skContributions<br>Count | compactSize uint | Number of unencrypted secret key contributions
| 36 * `skContributions`<br>`Count` | skContribution | SKContribution | Member index and secret key contribution for members justifying complaints
| 96 | sig | byte[] | BLS signature, signed with the operator key of the contributing masternode
An `SKContribution` consists of:
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 4 | skContributionMember | uint32_t | Index of the member for which justification is provided
| 32 | skContributions | byte[] | Unencrypted secret key contribution for the member contained in skContributionMember
More information can be found in the [Justification phase section of DIP6](https://github.com/dashpay/dips/blob/master/dip-0006.md#4-justification-phase).
<!--
The following annotated hexdump shows a `qjustify` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
##### qpcommit
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
![Warning icon](/img/icons/icon_warning.svg) Note: This message is used for
intra-quorum communication and is only sent to the masternodes in the LLMQ and
nodes that are monitoring in Watch Mode for auditing/debugging purposes.
The `qpcommit` message is used to exchange premature commitment messages for
verification and selection of the final commitment.
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 1 | llmqType | uint8_t | The type of LLMQ
| 32 | quorumHash | uint256 | The quorum identifier
| 32 | proTxHash | uint256 | The ProRegTx hash of the complaining member
| 1-9 | validMembersSize | compactSize uint | Bit size of the `validMembers` bitvector
| (`valid`<br>`MembersSize` + 7) / 8 | validMembers | byte[] | Bitset of valid members in this commitment
| 48 | quorumPublicKey | uint256 | The quorum public key
| (`complaints`<br>`BitSize` + 7) / 8 | quorumVvecHash | byte[] | The complaints bitvector
| 96 | quorumSig | BLSSig | Threshold signature, signed with the threshold signature share of the committing member
| 96 | sig | byte[] | BLS signature, signed with the operator key of the contributing masternode
More information can be found in the [Commitment phase section of DIP6](https://github.com/dashpay/dips/blob/master/dip-0006.md#5-commitment-phase).
<!--
The following annotated hexdump shows a `qpcommit` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
##### qfcommit
{% include helpers/subhead-links.md %} {% include helpers/subhead-links.md %}
{% autocrossref %} {% autocrossref %}
@ -2713,8 +3084,10 @@ valid final commitment.
| (bitSize + 7) / 8 | validMembers | byte[] | Bitset of valid members in this commitment | (bitSize + 7) / 8 | validMembers | byte[] | Bitset of valid members in this commitment
| 48 | quorumPublicKey | BLSPubKey | The quorum public key | 48 | quorumPublicKey | BLSPubKey | The quorum public key
| 32 | quorumVvecHash | uint256 | The hash of the quorum verification vector | 32 | quorumVvecHash | uint256 | The hash of the quorum verification vector
| 96 | quorumSig | BLSSig | Recovered threshold signature | 96 | quorumSig | byte[] | Recovered threshold signature
| 96 | sig | BLSSig | Aggregated BLS signatures from all included commitments | 96 | sig | byte[] | Aggregated BLS signatures from all included commitments
More information can be found in the [Finalization phase section of DIP6](https://github.com/dashpay/dips/blob/master/dip-0006.md#6-finalization-phase).
<!-- <!--
The following annotated hexdump shows a `qfcommit` message. (The The following annotated hexdump shows a `qfcommit` message. (The
@ -2727,6 +3100,222 @@ message header has been omitted.)
--> -->
{% endautocrossref %} {% endautocrossref %}
#### Signing Sessions
{% include helpers/subhead-links.md %}
##### qbsigs
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
![Warning icon](/img/icons/icon_warning.svg) Note: This message is used for
intra-quorum communication and is only sent to the masternodes in the LLMQ and
nodes that are monitoring in Watch Mode for auditing/debugging purposes.
The `qbsigs` message is used to send batched signature shares in response to a
`qgetsigs` message.
Note: The number of messages that can be sent in a batch is limited to 400
(as defined by `MAX_MSGS_TOTAL_BATCHED_SIGS`).
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| Varies | msgs | CBatchedSigShares | Batches of signature shares
CBatchedSigShares:
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 4 | sessionId | uint32_t | Signing session ID
| | sigShares | <uint16_t, CBLSLazySignature> |
<!--
The following annotated hexdump shows a `qbsigs` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
##### qgetsigs
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
![Warning icon](/img/icons/icon_warning.svg) Note: This message is used for
intra-quorum communication and is only sent to the masternodes in the LLMQ and
nodes that are monitoring in Watch Mode for auditing/debugging purposes.
The `qgetsigs` message is used to request signature shares. The response to a
`qgetsigs` message is a `qbsigs` message.
Note: The number of inventories in a `qgetsigs` message is limited to 200
(as defined by `MAX_MSGS_CNT_QGETSIGSHARES`).
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 4 | sessionId | uint32_t | Signing session ID
| 1-9 | invSize | compactSize uint | Number of inventory
| * `invSize` | inv | | Signing shares
<!--
The following annotated hexdump shows a `qgetsigs` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
##### qsendrecsigs
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
The `qsendrecsigs` message is used to notify a peer to send plain LLMQ recovered
signatures (inventory type `MSG_QUORUM_RECOVERED_SIG`). Otherwise the peer would
only announce/send the higher level messages produced when a recovered signature
is found (e.g. InstantSend `islock` messages or ChainLock `clsig` messages).
Note: SPV nodes should not send this message as they are usually only interested
in the higher level messages.
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 1 | fSendRecSigs | bool | 0 - Notify peer to not send plain LLMQ recovered signatures<br>1 - Notify peer to send plain LLMQ recovered signatures (default for Dash Core nodes)
<!--
The following annotated hexdump shows a `qsendrecsigs` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
##### qsigrec
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
The `qsigrec` message is used to provide recovered signatures and related quorum
details to nodes that have requested this information via the `qsendrecsigs` message.
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 1 | llmqType | uint8_t | The type of LLMQ
| 32 | quorumHash | uint256 | The quorum hash
| 32 | id | uint256 | The signing request id
| 32 | msgHash | uint256 | The message hash
| 96 | sig | byte[] | The final recovered BLS threshold signature
More information can be found in the [Recovered threshold signatures<!--noref--> section of DIP7](https://github.com/dashpay/dips/blob/master/dip-0007.md#recovered-threshold-signatures<!--noref-->).
<!--
The following annotated hexdump shows a `qsigrec` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
##### qsigsesann
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
![Warning icon](/img/icons/icon_warning.svg) Note: This message is used for
intra-quorum communication and is only sent to the masternodes in the LLMQ and
nodes that are monitoring in Watch Mode for auditing/debugging purposes.
The `qsigsesann` message is used to announce the sessionId for a signing
session. The sessionId will be used for all P2P messages related to that
session.
Note: The maximum number of announcements in a `qsigsesann` message is limited to
100 (as defined by `MAX_MSGS_CNT_QSIGSESANN`).
| Bytes | Name | Data type | Description |
| --- | --- | --- | --- |
| 4 | sessionId | uint32_t | 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
<!--
The following annotated hexdump shows a `qsigsesann` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
##### qsigsinv
{% include helpers/subhead-links.md %}
{% autocrossref %}
*Added in protocol version 70214 of Dash Core*
![Warning icon](/img/icons/icon_warning.svg) Note: This message is used for
intra-quorum communication and is only sent to the masternodes in the LLMQ and
nodes that are monitoring in Watch Mode for auditing/debugging purposes.
The `qsigsinv` message (quorum signature inventory) announces one or more quorum
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 | |
<!--
The following annotated hexdump shows a `qsigsinv` message. (The
message header has been omitted.)
{% highlight text %}
{% endhighlight %}
-->
{% endautocrossref %}
### Governance Messages ### Governance Messages
{% include helpers/subhead-links.md %} {% include helpers/subhead-links.md %}

View file

@ -16,6 +16,8 @@ http://opensource.org/licenses/MIT.
[msg_block]: /en/developer-reference#term-msg_block "The block header hash data type identifier of an inventory on the P2P network" [msg_block]: /en/developer-reference#term-msg_block "The block header hash data type identifier of an inventory on the P2P network"
[msg_filtered_block]: /en/developer-reference#term-msg_block "An alternative to the block header hash data type identifier of an inventory on the P2P network used to request a merkle block" [msg_filtered_block]: /en/developer-reference#term-msg_block "An alternative to the block header hash data type identifier of an inventory on the P2P network used to request a merkle block"
<!-- Inventory Messages: Dash Specific --> <!-- Inventory Messages: Dash Specific -->
[msg_clsig]: /en/developer-reference#term-msg_clsig "The ChainLock Signature data type identifier of an inventory on the P2P network"
[msg_islock]: /en/developer-reference#term-msg_islock "The LLMQ-based InstantSend Lock data type identifier of an inventory on the P2P network"
[msg_txlock_request]: /en/developer-reference#term-msg_txlock_request "The InstantSend TX Lock request data type identifier of an inventory on the P2P network" [msg_txlock_request]: /en/developer-reference#term-msg_txlock_request "The InstantSend TX Lock request data type identifier of an inventory on the P2P network"
[msg_txlock_vote]: /en/developer-reference#term-msg_txlock_vote "The InstantSend TX Lock vote data type identifier of an inventory on the P2P network" [msg_txlock_vote]: /en/developer-reference#term-msg_txlock_vote "The InstantSend TX Lock vote data type identifier of an inventory on the P2P network"
[msg_spork]: /en/developer-reference#term-msg_spork "The Spork ID data type identifier of an inventory on the P2P network" [msg_spork]: /en/developer-reference#term-msg_spork "The Spork ID data type identifier of an inventory on the P2P network"
@ -33,7 +35,13 @@ http://opensource.org/licenses/MIT.
[msg_governance_object_vote]: /en/developer-reference#term-msg_governance_object_vote "Governance object vote data type identifier of an inventory on the P2P network" [msg_governance_object_vote]: /en/developer-reference#term-msg_governance_object_vote "Governance object vote data type identifier of an inventory on the P2P network"
[msg_masternode_verify]: /en/developer-reference#term-msg_masternode_verify "Masternode Verify data type identifier of an inventory on the P2P network" [msg_masternode_verify]: /en/developer-reference#term-msg_masternode_verify "Masternode Verify data type identifier of an inventory on the P2P network"
[msg_cmpct_block]: /en/developer-reference#term-msg_cmpct_block "An alternative to the block header hash data type identifier of an inventory on the P2P network used to request a compact block" [msg_cmpct_block]: /en/developer-reference#term-msg_cmpct_block "An alternative to the block header hash data type identifier of an inventory on the P2P network used to request a compact block"
[msg_quorum_complaint]: /en/developer-reference#term-msg_quorum_complaint "The Long-Living Masternode Quorum Complaint data type identifier of an inventory on the P2P network"
[msg_quorum_contrib]: /en/developer-reference#term-msg_quorum_contrib "The Long-Living Masternode Quorum Contribution data type identifier of an inventory on the P2P network"
[msg_quorum_debug_status]: /en/developer-reference#term-msg_quorum_debug_status "The Long-Living Masternode Quorum Debug Status data type identifier of an inventory on the P2P network"
[msg_quorum_justification]: /en/developer-reference#term-msg_quorum_justification "The Long-Living Masternode Quorum Justification data type identifier of an inventory on the P2P network"
[msg_quorum_final_commitment]: /en/developer-reference#term-msg_quorum_final_commitment "The Long-Living Masternode Quorum Final Commitment data type identifier of an inventory on the P2P network" [msg_quorum_final_commitment]: /en/developer-reference#term-msg_quorum_final_commitment "The Long-Living Masternode Quorum Final Commitment data type identifier of an inventory on the P2P network"
[msg_quorum_premature_commitment]: /en/developer-reference#term-msg_quorum_premature_commitment "The Long-Living Masternode Quorum Premature Commitment data type identifier of an inventory on the P2P network"
[msg_quorum_recovered_sig]: /en/developer-reference#term-msg_quorum_recovered_sig "The Long-Living Masternode Quorum Recovered Signature data type identifier of an inventory on the P2P network"
[network]: /en/developer-guide#term-network "The Dash P2P network which broadcasts transactions and blocks" [network]: /en/developer-guide#term-network "The Dash P2P network which broadcasts transactions and blocks"
[op_checkmultisig]: /en/developer-reference#term-op-checkmultisig "Opcode which returns true if one or more provided signatures (m) sign the correct parts of a transaction and match one or more provided public keys (n)" [op_checkmultisig]: /en/developer-reference#term-op-checkmultisig "Opcode which returns true if one or more provided signatures (m) sign the correct parts of a transaction and match one or more provided public keys (n)"
[op_checksig]: /en/developer-reference#term-op-checksig "Opcode which returns true if a signature signs the correct parts of a transaction and matches a provided public key" [op_checksig]: /en/developer-reference#term-op-checksig "Opcode which returns true if a signature signs the correct parts of a transaction and matches a provided public key"
@ -217,6 +225,7 @@ http://opensource.org/licenses/MIT.
[block message]: /en/developer-reference#block "The P2P network message which sends a serialized block" [block message]: /en/developer-reference#block "The P2P network message which sends a serialized block"
[blocktxn message]: /en/developer-reference#blocktxn "The P2P network message which sends a list of requested transactions from a compact block" [blocktxn message]: /en/developer-reference#blocktxn "The P2P network message which sends a list of requested transactions from a compact block"
[cmpctblock message]: /en/developer-reference#cmpctblock "The P2P network message which sends a serialized compact block" [cmpctblock message]: /en/developer-reference#cmpctblock "The P2P network message which sends a serialized compact block"
[clsig message]: /en/developer-reference#clsig "The P2P network message which sends a ChainLock signature"
[dsa message]: /en/developer-reference#dsa "A P2P network message used to join a mixing pool" [dsa message]: /en/developer-reference#dsa "A P2P network message used to join a mixing pool"
[dsc message]: /en/developer-reference#dsc "A P2P network message used to indicates a PrivateSend mixing session is complete" [dsc message]: /en/developer-reference#dsc "A P2P network message used to indicates a PrivateSend mixing session is complete"
[dsf message]: /en/developer-reference#dsf "A P2P network message sent as the final mixing transaction in a session asking users to sign the final mixing TX messages" [dsf message]: /en/developer-reference#dsf "A P2P network message sent as the final mixing transaction in a session asking users to sign the final mixing TX messages"
@ -242,9 +251,11 @@ http://opensource.org/licenses/MIT.
[govsync message]: /en/developer-reference#govsync "A P2P network message used to synchronize governance objects" [govsync message]: /en/developer-reference#govsync "A P2P network message used to synchronize governance objects"
[headers message]: /en/developer-reference#headers "A P2P protocol message containing one or more block headers" [headers message]: /en/developer-reference#headers "A P2P protocol message containing one or more block headers"
[inv message]: /en/developer-reference#inv "A P2P protocol message used to send inventories of transactions and blocks known to the transmitting peer" [inv message]: /en/developer-reference#inv "A P2P protocol message used to send inventories of transactions and blocks known to the transmitting peer"
[islock message]: /en/developer-reference#islock "A P2P protocol message which sends a LLQM-based InstantSend lock"
[ix message]: /en/developer-reference#ix "A P2P protocol message which sends a single serialized transaction via InstantSend" [ix message]: /en/developer-reference#ix "A P2P protocol message which sends a single serialized transaction via InstantSend"
[mempool message]: /en/developer-reference#mempool "A P2P protocol message used to request one or more inv messages with currently-unconfirmed transactions" [mempool message]: /en/developer-reference#mempool "A P2P protocol message used to request one or more inv messages with currently-unconfirmed transactions"
[merkleblock message]: /en/developer-reference#merkleblock "A P2P protocol message used to request a filtered block useful for SPV proofs" [merkleblock message]: /en/developer-reference#merkleblock "A P2P protocol message used to request a filtered block useful for SPV proofs"
[mnauth message]: /en/developer-reference#mnauth "A P2P protocol message used to authenticate connections between masternodes"
[mnb message]: /en/developer-reference#mnb "A P2P protocol message used to describe the masternode entry and how to validate messages from it" [mnb message]: /en/developer-reference#mnb "A P2P protocol message used to describe the masternode entry and how to validate messages from it"
[mnget message]: /en/developer-reference#mnget "A P2P protocol message that requests masternode payment sync" [mnget message]: /en/developer-reference#mnget "A P2P protocol message that requests masternode payment sync"
[mnlistdiff message]: /en/developer-reference#mnlistdiff "A P2P protocol message used to send a diff of simplified masternode list entries between two blocks" [mnlistdiff message]: /en/developer-reference#mnlistdiff "A P2P protocol message used to send a diff of simplified masternode list entries between two blocks"
@ -254,9 +265,21 @@ http://opensource.org/licenses/MIT.
[notfound message]: /en/developer-reference#notfound "A P2P protocol message sent to indicate that the requested data was not available" [notfound message]: /en/developer-reference#notfound "A P2P protocol message sent to indicate that the requested data was not available"
[ping message]: /en/developer-reference#ping "A P2P network message used to see if the remote host is still connected" [ping message]: /en/developer-reference#ping "A P2P network message used to see if the remote host is still connected"
[pong message]: /en/developer-reference#pong "A P2P network message used to reply to a P2P network ping message" [pong message]: /en/developer-reference#pong "A P2P network message used to reply to a P2P network ping message"
[qbsigs message]: /en/developer-reference#qbsigs "A P2P network message used to ..."
[qcomplaint message]: /en/developer-reference#qcomplaint "A P2P network message used to ..."
[qcontrib message]: /en/developer-reference#qcontrib "A P2P network message used to ..."
[qdebugstatus message]: /en/developer-reference#qdebugstatus "A P2P network message used to ..."
[qfcommit message]: /en/developer-reference#qfcommit "A P2P network message used to finalize the members of a long-living masternode quorum (LLMQ)" [qfcommit message]: /en/developer-reference#qfcommit "A P2P network message used to finalize the members of a long-living masternode quorum (LLMQ)"
[qgetsigs message]: /en/developer-reference#qgetsigs "A P2P network message used to ..."
[qjustify message]: /en/developer-reference#qjustify "A P2P network message used to ..."
[qpcommit message]: /en/developer-reference#qpcommit "A P2P network message used to ..."
[qsigrec message]: /en/developer-reference#qsigrec "A P2P network message used to ..."
[qsigsesann message]: /en/developer-reference#qsigsesann "A P2P network message used to ..."
[qsigsinv message]: /en/developer-reference#qsigsinv "A P2P network message used to ..."
[qwatch message]: /en/developer-reference#qwatch "A P2P network message used to ..."
[reject message]: /en/developer-reference#reject "A P2P network message used to indicate a previously-received message was rejected for some reason" [reject message]: /en/developer-reference#reject "A P2P network message used to indicate a previously-received message was rejected for some reason"
[sendcmpct message]: /en/developer-reference#sendcmpct "A P2P network message used to request new blocks be announced as compact blocks" [sendcmpct message]: /en/developer-reference#sendcmpct "A P2P network message used to request new blocks be announced as compact blocks"
[senddsq message]: /en/developer-reference#senddsq "A P2P network message used to request that DSQ mixing messages be provided"
[sendheaders message]: /en/developer-reference#sendheaders "A P2P network message used to request new blocks be announced through headers messages rather than inv messages" [sendheaders message]: /en/developer-reference#sendheaders "A P2P network message used to request new blocks be announced through headers messages rather than inv messages"
[spork message]: /en/developer-reference#spork "A P2P network message used to send the activation status of a spork" [spork message]: /en/developer-reference#spork "A P2P network message used to send the activation status of a spork"
[ssc message]: /en/developer-reference#ssc "A P2P network message used to track the sync status of masternode objects ()" [ssc message]: /en/developer-reference#ssc "A P2P network message used to track the sync status of masternode objects ()"