[Content] - P2P - Update PrivateSend messages to include input counts (#73)

- Updated `dsa` and `dsq` messages with nInputCount field
 - Updated notes in Guide

Closes #70
This commit is contained in:
thephez 2018-06-28 12:58:23 -04:00 committed by GitHub
parent 3085440f48
commit 44c55257a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -203,10 +203,12 @@ mixing pool.
* The `dsa` message contains a collateral transaction
* This transaction uses a collateral input created in the [Wallet Preparation](#privatesend<!--noref-->-wallet<!--noref-->-preparation) phase
* The collateral is a signed transaction that pays the collateral back to a client address minus a fee of 0.001 DASH
* As of protocol version 70209, the `dsa` message indicates how many inputs will be provided to the pool when Spork 6 is active
_**Step 3 - Queue**_
* A masternode broadcasts `dsq` messages when it starts a new queue. These message are relayed by all peers.
* As of protocol version 70209, when Spork 6 is active the `dsq` message indicates how many inputs must be provided to participate in the pool.
* Once the masternode has received valid `dsa` messages from 3 clients (`nPoolMaxTransactions`), it sends a `dsq` message with the ready bit set ([Dash Core Reference](https://github.com/dashpay/dash/blob/e596762ca22d703a79c6880a9d3edb1c7c972fd3/src/chainparams.cpp#L173))
* Clients must respond to the Queue ready within 30 seconds or risk forfeiting the collateral they provided in the `dsa` message (Step 1) ([Dash Core Reference](https://github.com/dashpay/dash/blob/e596762ca22d703a79c6880a9d3edb1c7c972fd3/src/privatesend<!--noref-->.h#L22))

View file

@ -1819,14 +1819,18 @@ queue the remainder of the time.
| Bytes | Name | Data type | Required | Description |
| ---------- | ----------- | --------- | -------- | -------- |
| 4 | nDenom | int | Required | Denomination that will be exclusively used when submitting inputs into the pool
| 4 | nInputCount | int | Required | *Added in protocol version 70209. Only present when Spork 6 is active.* <br><br>Number of inputs required to join the queue
| 216+ | txCollateral | `tx` message | Required | Collateral TX that will be charged if this client acts maliciously
The following annotated hexdump shows a `dsa` message. (The message header has
been omitted.)
been omitted.) Note that the 'Required inputs' bytes will only be preset if
Spork 6 is active and protocol version => 70209.
{% highlight text %}
02000000 ................................... Denomination: 1 Dash (2)
03000000 ................................... Inputs required: 3
Collateral Transaction
| Previous Output
| |
@ -2148,6 +2152,7 @@ message.
| Bytes | Name | Data type | Required | Description |
| ---------- | ----------- | --------- | -------- | -------- |
| 4 | nDenom | int | Required | Denomination allowed in this mixing session
| 4 | nInputCount | int | Required | *Added in protocol version 70209. Only present when Spork 6 is active.* <br><br>Number of inputs required to participate in this mixing session
| 36 | masternodeOutPoint | outPoint | Required | The unspent outpoint of the masternode (holding 1000 DASH) which is hosting this session
| 8 | nTime | int64_t | Required | Time this `dsq` message was created
| 1 | fReady | bool | Required | Indicates if the mixing pool is ready to be executed
@ -2163,11 +2168,14 @@ Denominations (per [`src/privatesend.cpp`][privatesend denominations])
| 8 | 0.01 Dash
The following annotated hexdump shows a `dsq` message. (The
message header has been omitted.)
message header has been omitted.) Note that the 'Required inputs' bytes will only
be preset if Spork 6 is active and protocol version => 70209.
{% highlight text %}
08000000 ............................. Denomination: 0.01 Dash (8)
03000000 ............................. Required input(s): 3
Masternode Outpoint
| aeed0e77c6db30a616507a37a129bc88
| 1811f08afc51dd485d5322f36c1f04c5 ... Outpoint TXID