From 121989d06d99c88b902843b0f9f2cdd0029506c3 Mon Sep 17 00:00:00 2001 From: thephez Date: Mon, 12 Jun 2023 10:27:13 -0400 Subject: [PATCH 1/7] docs: integrate spork 6 info into paragraph --- docs/reference/p2p-network-control-messages.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/reference/p2p-network-control-messages.md b/docs/reference/p2p-network-control-messages.md index 13e7f842..e8cc218a 100644 --- a/docs/reference/p2p-network-control-messages.md +++ b/docs/reference/p2p-network-control-messages.md @@ -403,9 +403,7 @@ The [`spork` message](../reference/p2p-network-control-messages.md#spork) tells **Removed Sporks** The following sporks were used in the past but are no longer necessary and have been removed recently. To see sporks removed longer ago, please see the [previous version of documentation](https://dashcore.readme.io/v0.16.0/docs/core-ref-p2p-network-control-messages#spork). -> 📘 Spork 6 -> -> Since spork 6 was never enabled on mainnet, it was removed in Dash Core 0.16.0. The associated logic was hardened in [PR 3662](https://github.com/dashpay/dash/pull/3662) to support testnet (where it is enabled). If testnet is reset at some point in the future, the remaining logic will be removed. +Note that spork 6 was never enabled on mainnet and was removed in Dash Core 0.16.0. The associated logic was hardened in [PR 3662](https://github.com/dashpay/dash/pull/3662) to support testnet (where it is enabled). If testnet is reset at some point in the future, the remaining logic will be removed. | Spork ID | Num. | Name | Description | | :----------: | :----------: | ----------- | ----------- | From b7115923a6c35bfc6725353de05c51189f5ff745 Mon Sep 17 00:00:00 2001 From: thephez Date: Mon, 12 Jun 2023 10:28:35 -0400 Subject: [PATCH 2/7] docs: add updated info about spork 19 and refactor spork values info --- .../reference/p2p-network-control-messages.md | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/docs/reference/p2p-network-control-messages.md b/docs/reference/p2p-network-control-messages.md index e8cc218a..8fbbdb33 100644 --- a/docs/reference/p2p-network-control-messages.md +++ b/docs/reference/p2p-network-control-messages.md @@ -378,27 +378,36 @@ The [`spork` message](../reference/p2p-network-control-messages.md#spork) tells | 10002 | 3 | `INSTANTSEND_BLOCK_`
`FILTERING` | Turns on and off InstantSend block filtering | 10008 | 9 | `SUPERBLOCKS_ENABLED` | Superblocks are enabled (10% of the block reward allocated to fund the dash treasury for funding approved proposals) | 10016 | 17 | `SPORK_17_QUORUM_DKG_`
`ENABLED` | Enable long-living masternode quorum (LLMQ) distributed key generation (DKG). When enabled, simple PoSe scoring and banning is active as well. -| 10018 | 19 | `SPORK_19_CHAINLOCKS_`
`ENABLED` | Enable LLMQ-based ChainLocks. -| 10020 | 21 | `SPORK_21_QUORUM_ALL_`
`CONNECTED` | ***Added in Dash Core 0.16.0***
Enable connections between all masternodes in a quorum to optimize the signature recovery process.
Note: Prior to Dash Core 0.17.0 this spork also enforced [PoSe requirements](../guide/dash-features-proof-of-service.md#distributed-key-generation-participation-requirements) for masternodes to support a minimum protocol version and maintain open ports. -| 10022 | 23 | `SPORK_23_QUORUM_POSE`
`CONNECTED` | **Added in Dash Core 0.17.0**
Enforce [PoSe requirements](../guide/dash-features-proof-of-service.md#distributed-key-generation-participation-requirements) for masternodes to support a minimum protocol version and maintain open ports. +| 10018 | 19 | `SPORK_19_CHAINLOCKS_`
`ENABLED` | ***Updated in Dash Core 19.2.0***
Enable LLMQ-based ChainLocks. +| 10020 | 21 | `SPORK_21_QUORUM_ALL_`
`CONNECTED` | *Added in Dash Core 0.16.0*
Enable connections between all masternodes in a quorum to optimize the signature recovery process.
Note: Prior to Dash Core 0.17.0 this spork also enforced [PoSe requirements](../guide/dash-features-proof-of-service.md#distributed-key-generation-participation-requirements) for masternodes to support a minimum protocol version and maintain open ports. +| 10022 | 23 | `SPORK_23_QUORUM_POSE`
`CONNECTED` | *Added in Dash Core 0.17.0*
Enforce [PoSe requirements](../guide/dash-features-proof-of-service.md#distributed-key-generation-participation-requirements) for masternodes to support a minimum protocol version and maintain open ports. -> 📘 Spork 2 Values -> -> As of Dash Core 0.17.0, spork 2 supports two different enabled values: -> -> * `0` - Masternodes create locks for all transactions -> * `1` - Masternodes only create locks for transactions included in a block. Transactions in the mempool are not locked. -> ->Mode 1 is only for use in the event of a sustained overload of InstantSend to ensure that ChainLocks can remain operational. See [PR 4024](https://github.com/dashpay/dash/pull/4024) for details. +**Spork 2 values** -> 📘 Spork 21 and 23 Values -> -> Spork 21 and 23 support two different enabled values: -> -> * `0` - The spork is active for all quorums regardless of quorum size. -> * `1` - The spork is active only for quorums which have a member size less than 100. -> -> Mode 1 is only for use in the event of a sustained overload of InstantSend to ensure that ChainLocks can remain operational. See [PR 4024](https://github.com/dashpay/dash/pull/4024) for details. +As of Dash Core 0.17.0, spork 2 supports two different enabled values: + +* `0` - Masternodes create InstantSend locks for all transactions +* `1` - Masternodes only create InstantSend locks for transactions included in a block. Transactions + in the mempool are not locked. + +Mode 1 is only for use in the event of a sustained overload of InstantSend to ensure that ChainLocks +can remain operational. See [PR 4024](https://github.com/dashpay/dash/pull/4024) for details. + +**Spork 19 values** + +As of Dash Core 19.2.0, spork 19 supports two different enable values: + +* `0` - Masternodes create ChainLocks for all blocks +* `1` - Masternodes retain existing ChainLocks, but do not sign new ones + +See [PR 5398](https://github.com/dashpay/dash/pull/5398) for implementation details. + +**Spork 21 and 23 values** + + Spork 21 and 23 support two different enabled values: + +* `0` - The spork is active for all quorums regardless of quorum size. +* `1` - The spork is active only for quorums which have a member size less than 100. **Removed Sporks** The following sporks were used in the past but are no longer necessary and have been removed recently. To see sporks removed longer ago, please see the [previous version of documentation](https://dashcore.readme.io/v0.16.0/docs/core-ref-p2p-network-control-messages#spork). From 7299d08e63c5073a3beda5562000a651add432cf Mon Sep 17 00:00:00 2001 From: thephez Date: Mon, 12 Jun 2023 10:28:51 -0400 Subject: [PATCH 3/7] chore: update url and formatting --- docs/reference/p2p-network-control-messages.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/p2p-network-control-messages.md b/docs/reference/p2p-network-control-messages.md index 8fbbdb33..9a59b1f3 100644 --- a/docs/reference/p2p-network-control-messages.md +++ b/docs/reference/p2p-network-control-messages.md @@ -370,11 +370,11 @@ The [`spork` message](../reference/p2p-network-control-messages.md#spork) tells | 8 | nTimeSigned | int64_t | Required | Time the spork value was signed | 66 | vchSig | char[] | Required | Length (1 byte) + Signature (65 bytes) -**Active Sporks (per [`src/spork.h`](https://github.com/dashpay/dash/blob/v0.17.x/src/spork.h#L24))** +**Active Sporks (per [`src/spork.h`](https://github.com/dashpay/dash/blob/v19.x/src/spork.h#L34))** | Spork ID | Num. | Name | Description | | :----------: | :----------: | ----------- | ----------- | -| 10001 | 2 | `INSTANTSEND_ENABLED` | ***Updated in Dash Core 0.17.0***
Turns InstantSend on and off network wide. Also determines if new mempool transactions should be locked or not. +| 10001 | 2 | `INSTANTSEND_ENABLED` | *Updated in Dash Core 0.17.0*
Turns InstantSend on and off network wide. Also determines if new mempool transactions should be locked or not. | 10002 | 3 | `INSTANTSEND_BLOCK_`
`FILTERING` | Turns on and off InstantSend block filtering | 10008 | 9 | `SUPERBLOCKS_ENABLED` | Superblocks are enabled (10% of the block reward allocated to fund the dash treasury for funding approved proposals) | 10016 | 17 | `SPORK_17_QUORUM_DKG_`
`ENABLED` | Enable long-living masternode quorum (LLMQ) distributed key generation (DKG). When enabled, simple PoSe scoring and banning is active as well. From 5ed6b2a374d2e3759f6042860d678763feb1a963 Mon Sep 17 00:00:00 2001 From: thephez Date: Mon, 12 Jun 2023 10:31:00 -0400 Subject: [PATCH 4/7] chore: remove sporks deprecated more than 4 versions ago --- docs/reference/p2p-network-control-messages.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/reference/p2p-network-control-messages.md b/docs/reference/p2p-network-control-messages.md index 9a59b1f3..cb860d46 100644 --- a/docs/reference/p2p-network-control-messages.md +++ b/docs/reference/p2p-network-control-messages.md @@ -416,9 +416,7 @@ Note that spork 6 was never enabled on mainnet and was removed in Dash Core 0.1 | Spork ID | Num. | Name | Description | | :----------: | :----------: | ----------- | ----------- | -| *10004* | *5* | `INSTANTSEND_MAX_VALUE` | _Removed in Dash Core 0.15.0.
Controls the max value for an InstantSend transaction (currently 2000 DASH)_ | *10005* | *6* | `NEW_SIGS` | _Removed in Dash Core 0.16.0.
Turns on and off new signature format for Dash-specific messages_ -| *10011* | *12* | `RECONSIDER_BLOCKS` | _Removed in Dash Core 0.15.0.
Forces reindex of a specified number of blocks to recover from unintentional network forks_ | *10014* | *15* | `DETERMINISTIC_MNS_`
`ENABLED` | _Removed in Dash Core 0.16.0.
Deterministic masternode lists are enabled_ | *10015* | *16* | `INSTANTSEND_AUTOLOCKS` | _Removed in Dash Core 0.16.0.
Automatic InstantSend for transactions with <=4 inputs (also eliminates the special InstantSend fee requirement for these transactions)_ | *10019* | *20* | `SPORK_20_INSTANTSEND_`
`LLMQ_BASED` | _Removed in Dash Core 0.16.0.
Enable LLMQ-based InstantSend._ From 1c3dc597df50a08f7aaeb53c0b605211e722da5e Mon Sep 17 00:00:00 2001 From: thephez Date: Mon, 12 Jun 2023 10:35:05 -0400 Subject: [PATCH 5/7] style: inconsistent list ending --- docs/reference/p2p-network-control-messages.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/p2p-network-control-messages.md b/docs/reference/p2p-network-control-messages.md index cb860d46..fd3d2bb8 100644 --- a/docs/reference/p2p-network-control-messages.md +++ b/docs/reference/p2p-network-control-messages.md @@ -386,7 +386,7 @@ The [`spork` message](../reference/p2p-network-control-messages.md#spork) tells As of Dash Core 0.17.0, spork 2 supports two different enabled values: -* `0` - Masternodes create InstantSend locks for all transactions +* `0` - Masternodes create InstantSend locks for all transactions. * `1` - Masternodes only create InstantSend locks for transactions included in a block. Transactions in the mempool are not locked. @@ -397,8 +397,8 @@ can remain operational. See [PR 4024](https://github.com/dashpay/dash/pull/4024) As of Dash Core 19.2.0, spork 19 supports two different enable values: -* `0` - Masternodes create ChainLocks for all blocks -* `1` - Masternodes retain existing ChainLocks, but do not sign new ones +* `0` - Masternodes create ChainLocks for all blocks. +* `1` - Masternodes retain existing ChainLocks, but do not sign new ones. See [PR 5398](https://github.com/dashpay/dash/pull/5398) for implementation details. From e17f49efd3beb736843f18cca27d91980f454ba2 Mon Sep 17 00:00:00 2001 From: thephez Date: Mon, 12 Jun 2023 10:52:32 -0400 Subject: [PATCH 6/7] refactor: relocate hexdump to better location and add subheadings --- .../reference/p2p-network-control-messages.md | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/docs/reference/p2p-network-control-messages.md b/docs/reference/p2p-network-control-messages.md index fd3d2bb8..531e2aeb 100644 --- a/docs/reference/p2p-network-control-messages.md +++ b/docs/reference/p2p-network-control-messages.md @@ -370,7 +370,27 @@ The [`spork` message](../reference/p2p-network-control-messages.md#spork) tells | 8 | nTimeSigned | int64_t | Required | Time the spork value was signed | 66 | vchSig | char[] | Required | Length (1 byte) + Signature (65 bytes) -**Active Sporks (per [`src/spork.h`](https://github.com/dashpay/dash/blob/v19.x/src/spork.h#L34))** +The following annotated hexdump shows a [`spork` message](../reference/p2p-network-control-messages.md#spork). + +``` text +11270000 .................................... Spork ID: Spork 2 InstantSend enabled (10001) +0000000000000000 ............................ Value (0) +2478da5900000000 ............................ Epoch time: 2017-10-08 19:10:28 UTC (1507489828) + +41 .......................................... Signature length: 65 + +1b6762d3e70890b5cfaed5d1fd72121c +d32020c827a89f8128a00acd210f4ea4 +1b36c26c3767f8a24f48663e189865ed +403ed1e850cdb4207cdd466419d9d183 +45 .......................................... Masternode Signature +``` + +### Active sporks + +The list of all active sporks can be found in +[`src/spork.h`](https://github.com/dashpay/dash/blob/v19.x/src/spork.h#L34)). See the [removed +sporks section](#removed-sporks) for a list of previously removed sporks. | Spork ID | Num. | Name | Description | | :----------: | :----------: | ----------- | ----------- | @@ -409,7 +429,8 @@ See [PR 5398](https://github.com/dashpay/dash/pull/5398) for implementation deta * `0` - The spork is active for all quorums regardless of quorum size. * `1` - The spork is active only for quorums which have a member size less than 100. -**Removed Sporks** +### Removed sporks + The following sporks were used in the past but are no longer necessary and have been removed recently. To see sporks removed longer ago, please see the [previous version of documentation](https://dashcore.readme.io/v0.16.0/docs/core-ref-p2p-network-control-messages#spork). Note that spork 6 was never enabled on mainnet and was removed in Dash Core 0.16.0. The associated logic was hardened in [PR 3662](https://github.com/dashpay/dash/pull/3662) to support testnet (where it is enabled). If testnet is reset at some point in the future, the remaining logic will be removed. @@ -422,6 +443,8 @@ Note that spork 6 was never enabled on mainnet and was removed in Dash Core 0.1 | *10019* | *20* | `SPORK_20_INSTANTSEND_`
`LLMQ_BASED` | _Removed in Dash Core 0.16.0.
Enable LLMQ-based InstantSend._ | *10021* | *22* | `SPORK_22_PS_MORE_`
`PARTICIPANTS` | *Removed in Dash Core 0.17.0*
*Increase the maximum number of participants in CoinJoin sessions.* +### Spork verification + To verify `vchSig`, compare the hard-coded spork public key (`strSporkPubKey` from [`src/chainparams.cpp`](https://github.com/dashpay/dash/blob/eaf90b77177efbaf9cbed46e822f0d794f1a0ee5/src/chainparams.cpp#L158)) with the public key recovered from the [`spork` message](../reference/p2p-network-control-messages.md#spork)'s hash and `vchSig` value (implementation details for Dash Core can be found in `CPubKey::RecoverCompact`). The hash is a double SHA-256 hash of: * The spork magic message (`"DarkCoin Signed Message:\n"`) @@ -434,22 +457,6 @@ To verify `vchSig`, compare the hard-coded spork public key (`strSporkPubKey` fr | RegTest | Undefined | | Devnets | 046f78dcf911fbd61910136f7f0f8d90578f68d0b3ac973b5040fb7afb50
1b5939f39b108b0569dca71488f5bbf498d92e4d1194f6f941307ffd95f7
5e76869f0e | -The following annotated hexdump shows a [`spork` message](../reference/p2p-network-control-messages.md#spork). - -``` text -11270000 .................................... Spork ID: Spork 2 InstantSend enabled (10001) -0000000000000000 ............................ Value (0) -2478da5900000000 ............................ Epoch time: 2017-10-08 19:10:28 UTC (1507489828) - -41 .......................................... Signature length: 65 - -1b6762d3e70890b5cfaed5d1fd72121c -d32020c827a89f8128a00acd210f4ea4 -1b36c26c3767f8a24f48663e189865ed -403ed1e850cdb4207cdd466419d9d183 -45 .......................................... Masternode Signature -``` - ## verack The [`verack` message](../reference/p2p-network-control-messages.md#verack) acknowledges a previously-received [`version` message](../reference/p2p-network-control-messages.md#version), informing the connecting [node](../resources/glossary.md#node) that it can begin to send other messages. The [`verack` message](../reference/p2p-network-control-messages.md#verack) has no payload; for an example of a message with no payload, see the [message headers section](../reference/p2p-network-message-headers.md). From 6c7ae6c4c1e5326010b67e5a3ed0f4f64c469b61 Mon Sep 17 00:00:00 2001 From: thephez Date: Mon, 12 Jun 2023 11:28:30 -0400 Subject: [PATCH 7/7] fix: correct typo --- docs/reference/p2p-network-control-messages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/p2p-network-control-messages.md b/docs/reference/p2p-network-control-messages.md index 531e2aeb..b3397357 100644 --- a/docs/reference/p2p-network-control-messages.md +++ b/docs/reference/p2p-network-control-messages.md @@ -389,7 +389,7 @@ d32020c827a89f8128a00acd210f4ea4 ### Active sporks The list of all active sporks can be found in -[`src/spork.h`](https://github.com/dashpay/dash/blob/v19.x/src/spork.h#L34)). See the [removed +[`src/spork.h`](https://github.com/dashpay/dash/blob/v19.x/src/spork.h#L34). See the [removed sporks section](#removed-sporks) for a list of previously removed sporks. | Spork ID | Num. | Name | Description |