mirror of
https://github.com/seigler/dash-docs
synced 2025-07-28 18:26:13 +00:00
Governance updates / MN sync
- Correct some reference links - Add MN sync info to guide - Update dseg, mnget, ssc, and govsync messages to include more detail
This commit is contained in:
parent
9aaf29fb05
commit
3a3778e6a9
3 changed files with 65 additions and 7 deletions
|
@ -589,6 +589,40 @@ Earlier versions of Bitcoin Core allowed developers and trusted community member
|
||||||
{% endautocrossref %}
|
{% endautocrossref %}
|
||||||
|
|
||||||
|
|
||||||
|
### Masternode Sync
|
||||||
|
|
||||||
|
{% include helpers/subhead-links.md %}
|
||||||
|
|
||||||
|
{% autocrossref %}
|
||||||
|
|
||||||
|
Dash Core performs masternode synchronization as required, but it can be started
|
||||||
|
manually by issuing the `mnsync reset` RPC command.
|
||||||
|
|
||||||
|
*Masternode Sync Data Flow*
|
||||||
|
|
||||||
|
| **Syncing Node Message** | **Direction** | **Masternode Response** | **Description** |
|
||||||
|
| **1. Sporks** | | | |
|
||||||
|
| `getsporks` message | → | | Syncing node requests sporks
|
||||||
|
| | ← | `spork` message(s) |
|
||||||
|
| **2. Masternode List** | | | Sync Masternode list from other connected clients |
|
||||||
|
| `dseg` message | → | | Syncing node requests masternode list
|
||||||
|
| | ← | `ssc` message | Number of entries in masternode list (MASTERNODE_SYNC_LIST)<br><br>Only sent if requesting entire list
|
||||||
|
| | ← | `inv` message(s) (mnb) | MSG_MASTERNODE_ANNOUNCE
|
||||||
|
| | ← | `inv` message(s) (mnp) | MSG_MASTERNODE_PING
|
||||||
|
| `getdata` message(s) (mnb) | → | | (Optional)
|
||||||
|
| `getdata` message(s) (mnp) | → | | (Optional)
|
||||||
|
| | ← | `mnb` message(s) | (If requested) Masternode announce message
|
||||||
|
| | ← | `mnp` message(s) | (If requested) Masternode ping message
|
||||||
|
| **3. Masternode payments** | | | Ask node for all payment votes it has (new nodes will only return votes for future payments) |
|
||||||
|
| `mnget` message | → | | Syncing node requests masternode payment sync
|
||||||
|
| | ← | `ssc` message | Number of entries in masternode payment list
|
||||||
|
| | ← | `inv` message(s) (mnw) | MSG_MASTERNODE_PAYMENT_VOTE
|
||||||
|
| `getdata` message(s) (mnw) | → | | (Optional)
|
||||||
|
| | ← | `mnw` message(s) | (If requested) Masternode payment vote message
|
||||||
|
| **4. Governance** | | | See [Governance sync](#governance) |
|
||||||
|
|
||||||
|
{% endautocrossref %}
|
||||||
|
|
||||||
|
|
||||||
### Governance
|
### Governance
|
||||||
|
|
||||||
|
|
|
@ -1855,8 +1855,9 @@ entry. To request the list of all masternodes, use an empty txIn (TXID of all
|
||||||
zeros and an index of 0xFFFFFFFF). To request information about a specific
|
zeros and an index of 0xFFFFFFFF). To request information about a specific
|
||||||
masternode, use the unspent output associated with that masternode.
|
masternode, use the unspent output associated with that masternode.
|
||||||
|
|
||||||
The response to a `dseg` message is an `mnb` message and an `mnp` message from
|
The response to a `dseg` message is an `mnb` message inventory and an
|
||||||
the masternode(s) requested.
|
`mnp` message inventory for each requested masternode. Masternodes ignore this
|
||||||
|
request if they are not fully synced.
|
||||||
|
|
||||||
| Bytes | Name | Data type | Required | Description |
|
| Bytes | Name | Data type | Required | Description |
|
||||||
| ---------- | ----------- | --------- | -------- | -------- |
|
| ---------- | ----------- | --------- | -------- | -------- |
|
||||||
|
@ -1997,11 +1998,18 @@ Masternode Ping Message
|
||||||
|
|
||||||
{% autocrossref %}
|
{% autocrossref %}
|
||||||
|
|
||||||
The `mnget` message requests masternode payment sync.
|
The `mnget` message requests masternode payment sync. The response to an
|
||||||
|
`mnget` message is an `mnb` message inventory and an `mnp` message inventory for
|
||||||
|
each requested masternode. Masternodes ignore this request if they are not fully synced.
|
||||||
|
|
||||||
| Bytes | Name | Data type | Required | Description |
|
| Bytes | Name | Data type | Required | Description |
|
||||||
| ---------- | ----------- | --------- | -------- | -------- |
|
| ---------- | ----------- | --------- | -------- | -------- |
|
||||||
| 4 | nMnCount | int | Required |
|
| 4 | nMnCount | int | Required | Number of masternode payment votes to request
|
||||||
|
|
||||||
|
{% highlight text %}
|
||||||
|
Note: Dash Core limits how frequently a masternode payment sync can be
|
||||||
|
requested. Frequent requests will result in the node being banned.
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
The following annotated hexdump shows a `mnget` message. (The
|
The following annotated hexdump shows a `mnget` message. (The
|
||||||
message header has been omitted.)
|
message header has been omitted.)
|
||||||
|
@ -2156,7 +2164,10 @@ dd6cc6c11211793b239c2e311f1496e2
|
||||||
|
|
||||||
{% autocrossref %}
|
{% autocrossref %}
|
||||||
|
|
||||||
The `ssc` message is used to track the sync status of masternode objects.
|
The `ssc` message is used to track the sync status of masternode objects. This
|
||||||
|
message is sent in response to sync requests for masternode payments
|
||||||
|
(`mnw` message), masternode list (`mnget` message),
|
||||||
|
governance objects (`govsync` message), and governance object votes (`govsync` message).
|
||||||
|
|
||||||
| Bytes | Name | Data type | Required | Description |
|
| Bytes | Name | Data type | Required | Description |
|
||||||
| ---------- | ----------- | --------- | -------- | -------- |
|
| ---------- | ----------- | --------- | -------- | -------- |
|
||||||
|
@ -2371,6 +2382,19 @@ dc45e9c09ee0427223e332b52e8d709e
|
||||||
The `govsync` message is used to request syncing of governance objects
|
The `govsync` message is used to request syncing of governance objects
|
||||||
(`govobj` message and `govobjvote` message) with peers.
|
(`govobj` message and `govobjvote` message) with peers.
|
||||||
|
|
||||||
|
This message responds in two ways depending on the request:
|
||||||
|
|
||||||
|
1. When a masternode receives a `govsync` message with a hash of all zeros, it
|
||||||
|
responds with a `govobj` inventory message (MSG_GOVERNANCE_OBJECT - 0x17) for
|
||||||
|
all valid governance objects. Governance object votes are excluded in this type
|
||||||
|
of response.
|
||||||
|
|
||||||
|
2. When a masternode receives a `govsync` message with a specific hash, it
|
||||||
|
responds with both a `govobj` inventory message (MSG_GOVERNANCE_OBJECT - 0x17)
|
||||||
|
and a `govobjvote` inventory message (MSG_GOVERNANCE_OBJECT_VOTE - 0x18) for
|
||||||
|
the single goverance object requested.
|
||||||
|
|
||||||
|
|
||||||
| Bytes | Name | Data type | Required | Description |
|
| Bytes | Name | Data type | Required | Description |
|
||||||
| ---------- | ----------- | --------- | -------- | -------- |
|
| ---------- | ----------- | --------- | -------- | -------- |
|
||||||
| 32 | nHash | uint256 | Required |
|
| 32 | nHash | uint256 | Required |
|
||||||
|
|
|
@ -242,8 +242,8 @@ http://opensource.org/licenses/MIT.
|
||||||
[getheaders message]: /en/developer-reference#getheaders "A P2P protocol message used to request a range of block headers"
|
[getheaders message]: /en/developer-reference#getheaders "A P2P protocol message used to request a range of block headers"
|
||||||
[getsporks message]: /en/developer-reference#getsporks "A P2P network message used to request the status of sporks"
|
[getsporks message]: /en/developer-reference#getsporks "A P2P network message used to request the status of sporks"
|
||||||
[govobj message]: /en/developer-reference#govobj "A P2P network message used to send governance objects"
|
[govobj message]: /en/developer-reference#govobj "A P2P network message used to send governance objects"
|
||||||
[govobjvote message]: /en/developer-reference#govobj "A P2P network message used to send governance object votes"
|
[govobjvote message]: /en/developer-reference#govobjvote "A P2P network message used to send governance object votes"
|
||||||
[govsync message]: /en/developer-reference#govobj "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"
|
||||||
[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"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue