diff --git a/_includes/devdoc/guide_dash_features.md b/_includes/devdoc/guide_dash_features.md index 0d02cb7f..55d2eb2e 100644 --- a/_includes/devdoc/guide_dash_features.md +++ b/_includes/devdoc/guide_dash_features.md @@ -348,16 +348,23 @@ several conditions that initiate a start/restart the sync process: * A failure occurred during the last sync attempt (after a 1 minute cooldown before sync restarts) * Issuing a `mnsync reset` RPC command +{% endautocrossref %} + #### Initial Masternode Sync {% include helpers/subhead-links.md %} +##### Before DIP3 Activation + + +{% autocrossref %} + This diagram shows the order in which P2P messages are sent to perform masternode synchronization initially after startup. ![Masternode Sync (Initial)](/img/dev/en-masternode-sync-initial.svg) The following table details the data flow of P2P messages exchanged during -initial masternode synchronization. +initial masternode synchronization before the activation of DIP3 and Spork 15. | **Syncing Node Message** | **Direction** | **Masternode Response** | **Description** | | **1. Sporks** | | | | @@ -380,6 +387,31 @@ initial masternode synchronization. | | ← | `mnw` message(s) | (If requested) Masternode payment vote message | **4. Governance** | | | See [Governance sync](#governance) | +{% endautocrossref %} + +##### After DIP3 Activation + + +{% autocrossref %} + +The deterministic masternode lists introduced by DIP3 make the masternode +list and masternode payments steps of the sync process obsolete. Since the +information is available on-chain, the P2P messages related to those steps +are no longer required. + +This diagram shows the order in which P2P messages are sent to perform +masternode synchronization initially after startup. + +![Masternode Sync (Initial)](/img/dev/en-masternode-sync-initial-dip3.svg) + +The following table details the data flow of P2P messages exchanged during +initial masternode synchronization after the activation of DIP3 and Spork 15. + +| **Syncing Node Message** | **Direction** | **Masternode Response** | **Description** | +| **1. Sporks** | | | | +| `getsporks` message | → | | Syncing node requests sporks +| | ← | `spork` message(s) | +| **2. Governance** | | | See [Governance sync](#governance) | *Masternode Sync Status* @@ -390,8 +422,8 @@ are used in both `ssc` messages and the `mnsync` RPC. | -1 | `MASTERNODE_SYNC_FAILED` | Synchronization failed | | 0 | `MASTERNODE_SYNC_INITIAL` | Synchronization just started, was reset recently, or is still in IBD | | 1 | `MASTERNODE_SYNC_WAITING` | Synchronization pending - waiting after initial to check for more headers/blocks | -| 2 | `MASTERNODE_SYNC_LIST` | Synchronizing masternode list | -| 3 | `MASTERNODE_SYNC_MNW` | Synchronizing masternode payments | +| 2 | `MASTERNODE_SYNC_LIST` | ![Warning icon](/img/icons/icon_warning.svg) _Deprecated following activation of DIP3 and Spork 15_

Synchronizing masternode list | +| 3 | `MASTERNODE_SYNC_MNW` | ![Warning icon](/img/icons/icon_warning.svg) _Deprecated following activation of DIP3 and Spork 15_

Synchronizing masternode payments | | 4 | `MASTERNODE_SYNC_GOVERNANCE` | Synchronizing governance objects | | 999 | `MASTERNODE_SYNC_FINISHED` | Synchronization finished | @@ -408,6 +440,9 @@ payments, and governance objects synchronized between masternodes. **Recurring Ping** +![Warning icon](/img/icons/icon_warning.svg) NOTE: This will be deprecated +following activation of DIP3 which implements deterministic masternode lists. + Each masternode issues a ping (`mnp` message) periodically to notify the network that it is still online. Masternodes that do not issue a ping for 3 hours will be put into the `MASTERNODE_NEW_START_REQUIRED` state and will need to issue a @@ -415,6 +450,9 @@ masternode announce (`mnb` message). **Masternode List** +![Warning icon](/img/icons/icon_warning.svg) NOTE: This will be deprecated +following activation of DIP3 which implements deterministic masternode lists. + After the initial masternode list has been received, it is kept current by a combination of the periodic `mnp` messages received from other masternodes, the `mnb` messages sent by masternodes as they come online, and `mnv` messages @@ -429,6 +467,9 @@ Unsynchronized peers may send a `dseg` message to request the entire masternode **Masternode Payment** +![Warning icon](/img/icons/icon_warning.svg) NOTE: This will be deprecated +following activation of DIP3 which implements deterministic masternode lists. + After the initial masternode payment synchronization, payment information is kept current via the `mnw` messages relayed on the network. Unsynchronized peers may send a `mnget` message to request masternode payment sync. @@ -453,14 +494,14 @@ scheduler section of `AppInitMain` in `src/init.cpp`. The following actions only run when the masternode sync is past `MASTERNODE_SYNC_WAITING` status. | **Period (seconds)** | **Action** | **Description** | -| 1 | MN Check | Check the state of each masternode that is still funded and not banned. The action occurs once per second, but individual masternodes are only checked at most every 5 seconds (only a subset of masternodes are checked each time it runs) (masternodeman.cpp) | +| 1 | MN Check | ![Warning icon](/img/icons/icon_warning.svg) _Deprecated following activation of DIP3 and Spork 15_

Check the state of each masternode that is still funded and not banned. The action occurs once per second, but individual masternodes are only checked at most every 5 seconds (only a subset of masternodes are checked each time it runs) (masternodeman.cpp) | | 60 | Process MN Connections | Disconnects some masternodes (masternodeman.cpp) | -| 60 | MN Check/Remove | Remove spent masternodes and check the state of inactive ones (masternodeman.cpp) | -| 60 | MN Payment Check/Remove | Remove old masternode payment votes/blocks (masternode-payments.cpp) | +| 60 | MN Check/Remove | ![Warning icon](/img/icons/icon_warning.svg) _Deprecated following activation of DIP3 and Spork 15_

Remove spent masternodes and check the state of inactive ones (masternodeman.cpp) | +| 60 | MN Payment Check/Remove | ![Warning icon](/img/icons/icon_warning.svg) _Deprecated following activation of DIP3 and Spork 15_

Remove old masternode payment votes/blocks (masternode-payments.cpp) | | 60 | InstantSend Check/Remove | Remove expired/orphaned/invalid InstantSend candidates and votes (instantx.cpp) | -| 300 | Full verification | Verify masternodes via direct requests (`mnv` messages - note time constraints in the Developer Reference section) (masternodeman.cpp) | +| 300 | Full verification | ![Warning icon](/img/icons/icon_warning.svg) _Deprecated following activation of DIP3 and Spork 15_

Verify masternodes via direct requests (`mnv` messages - note time constraints in the Developer Reference section) (masternodeman.cpp) | | 300 | Maintenance | Check/remove/reprocess governance objects (governance.cpp) | -| 600 | Manage State | Sends masternode pings (`mnp` message). Also sends initial masternode broadcast (`mnb` message) for local masternodes. (activemasternode.cpp) | +| 600 | Manage State | ![Warning icon](/img/icons/icon_warning.svg) _Deprecated following activation of DIP3 and Spork 15_

Sends masternode pings (`mnp` message). Also sends initial masternode broadcast (`mnb` message) for local masternodes. (activemasternode.cpp) | {% endautocrossref %} diff --git a/img/dev/en-masternode-sync-initial-dip3.png b/img/dev/en-masternode-sync-initial-dip3.png new file mode 100644 index 00000000..5a6f2bec Binary files /dev/null and b/img/dev/en-masternode-sync-initial-dip3.png differ diff --git a/img/dev/en-masternode-sync-initial-dip3.svg b/img/dev/en-masternode-sync-initial-dip3.svg new file mode 100644 index 00000000..c3bbb5a0 --- /dev/null +++ b/img/dev/en-masternode-sync-initial-dip3.svg @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sporks(getsporks) + + + + + + + + + + Governance Objects(govsync) + + + + + + + + + + + + + + + + + Governance Votes(govsync) + + + + + + + + + + + + + + Masternode Synchronization (Initial) + + + + + + + + \ No newline at end of file diff --git a/img/dev/en-masternode-sync-ongoing.png b/img/dev/en-masternode-sync-ongoing.png index 9a24933d..948e64a0 100644 Binary files a/img/dev/en-masternode-sync-ongoing.png and b/img/dev/en-masternode-sync-ongoing.png differ diff --git a/img/dev/en-masternode-sync-ongoing.svg b/img/dev/en-masternode-sync-ongoing.svg index 0d47c1b0..72e912e9 100644 --- a/img/dev/en-masternode-sync-ongoing.svg +++ b/img/dev/en-masternode-sync-ongoing.svg @@ -1,9 +1,9 @@ - + - + @@ -43,6 +43,7 @@ + @@ -53,7 +54,7 @@ - + @@ -324,20 +325,20 @@ - - - - MasternodePayments + + + + MasternodePayments - - - - MasternodeList + + + + MasternodeList @@ -353,251 +354,251 @@ - PaymentVotes + PaymentVotes - - - - - - - - - - - - - - - - - mnw + + + + + + + + + + + + + + + + + mnw - PaymentVotes + PaymentVotes - - - mnw + + + mnw - BroadcastsfromStarting MNs + BroadcastsfromStarting MNs - Recurring Ping(15 min) + Recurring Ping(15 min) - - - mnb + + + mnb - Relayed MNBroadcasts + Relayed MNBroadcasts - Relayed MNPings + Relayed MNPings - Relayed MNVerifications + Relayed MNVerifications - MN ListRequests + MN ListRequests - - - - dseg + + + + dseg - - - - - - - - - - - - - - - - - - - - - - - - - mnb + + + + + + + + + + + + + + + + + + + + + + + + + mnb - - - - - - - - - - - - - - mnp + + + + + + + + + + + + + + mnp - - - - - - - - - - - - - - - - - - - - - - - - mnp + + + + + + + + + + + + + + + + + + + + + + + + mnp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - mnv + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mnv - MN Pings + MN Pings - - - mnp + + + mnp - PaymentSync Request + PaymentSync Request - VerificationRequests + VerificationRequests - - - - mnv + + + + mnv - - - mnget + + + mnget @@ -757,6 +758,20 @@ + + + + + Deprecated by Deterministic Masternode Lists + + + + + + + + + diff --git a/img/dev/en-masternode-sync.odg b/img/dev/en-masternode-sync.odg index a3c285f0..9e65c5e9 100644 Binary files a/img/dev/en-masternode-sync.odg and b/img/dev/en-masternode-sync.odg differ