From e34770682a68f602422a6b582d0673280524bbb9 Mon Sep 17 00:00:00 2001
From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com>
Date: Wed, 15 Jan 2025 10:02:06 +0000
Subject: [PATCH 1/8] docs(dip3): list "Masternode Types" as Appendix B
---
dip-0003.md | 5 +++++
dip-0003/masternode-types.md | 10 +++++-----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/dip-0003.md b/dip-0003.md
index 2359537e..7e2aec0f 100644
--- a/dip-0003.md
+++ b/dip-0003.md
@@ -22,6 +22,7 @@
1. [Masternode Rewards](#masternode-rewards)
1. [Selecting Quorums](#selecting-quorums)
1. [Appendix A: Reasons for Self Revocation of Operators](#appendix-a-reasons-for-self-revocation-of-operators)
+1. [Appendix B: Masternode Types](#appendix-b-masternode-types)
1. [Copyright](#copyright)
## Special Mention
@@ -365,6 +366,10 @@ The individual quorum types present in Dash are not subject to this DIP and shou
| 2 | Compromised Keys |
| 3 | Change of Keys (Not compromised) |
+## Appendix B: Masternode Types
+
+See [masternode types table](dip-0003/masternode-types.md)
+
## Copyright
Copyright (c) 2018 Dash Core Group, Inc. [Licensed under the MIT License](https://opensource.org/licenses/MIT)
diff --git a/dip-0003/masternode-types.md b/dip-0003/masternode-types.md
index 722dd328..be2675de 100644
--- a/dip-0003/masternode-types.md
+++ b/dip-0003/masternode-types.md
@@ -1,6 +1,6 @@
-# Masternode Types
+# Appendix B: Masternode Types
-| Masternode Type | Description |
-| --- | --- |
-| 0 | Default (1000 DASH collateral) |
-| 1 | Evolution masternode (evonode) (4000 DASH collateral) |
+| Masternode Type | Description | Collateral |
+| --------------- | ------------------------------ | ---------- |
+| 0 | Default | 1000 DASH |
+| 1 | Evolution masternode (evonode) | 4000 DASH |
From 28aac0a089b608cb326836b0abde1daa1ba627b1 Mon Sep 17 00:00:00 2001
From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com>
Date: Wed, 15 Jan 2025 10:09:25 +0000
Subject: [PATCH 2/8] docs: refer to type 0 masternodes as "regular"
Type 0 masternodes are referred to as "default" and "regular" in
different documents, let's harmonize them.
---
dip-0003.md | 2 +-
dip-0003/masternode-types.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dip-0003.md b/dip-0003.md
index 7e2aec0f..0b5ea930 100644
--- a/dip-0003.md
+++ b/dip-0003.md
@@ -102,7 +102,7 @@ payloadSig must be empty.
The ProRegTx might have the IP address and port fields set to zero. This will result in the masternode being added to the masternode list in the PoSe-banned state and require the operator to issue a ProUpServTx. This is needed in case the owner wants to delegate the operator role to a hosting service without knowing the IP Address and port in advance.
-The ProRegTx also defines the masternode's type and mode. Default masternodes are of type 0, and future types will be defined in an [annex document](dip-0003/masternode-types.md). Different types would introduce additional or different consensus rules towards the masternodes based on future Dash improvement proposals. Masternode types are not updatable, however each type can have multiple operation modes. The operation modes are updatable.
+The ProRegTx also defines the masternode's type and mode. Regular masternodes are of type 0, and future types will be defined in an [annex document](dip-0003/masternode-types.md). Different types would introduce additional or different consensus rules towards the masternodes based on future Dash improvement proposals. Masternode types are not updatable, however each type can have multiple operation modes. The operation modes are updatable.
The ProRegTx also specifies the reward for the operator. The percentage of the masternode reward paid to the operator is calculated by dividing the operatorReward field by 100. When the field is set to zero, the owner will get the full reward for every block. If set to a non-zero value, the masternode operator may specify his operator reward payee script in a ProUpServTx. If he does not do so, the full reward goes to the masternode owner.
diff --git a/dip-0003/masternode-types.md b/dip-0003/masternode-types.md
index be2675de..2683a57e 100644
--- a/dip-0003/masternode-types.md
+++ b/dip-0003/masternode-types.md
@@ -2,5 +2,5 @@
| Masternode Type | Description | Collateral |
| --------------- | ------------------------------ | ---------- |
-| 0 | Default | 1000 DASH |
+| 0 | Regular | 1000 DASH |
| 1 | Evolution masternode (evonode) | 4000 DASH |
From 9cc8bf125b08e4a98bb658af7f60ce79193e2fb4 Mon Sep 17 00:00:00 2001
From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com>
Date: Tue, 13 May 2025 11:41:27 +0000
Subject: [PATCH 3/8] docs(dip3): move Pro*Tx network information fields to
Appendix C
---
dip-0003.md | 47 ++++++++++++++++++++--------------------
dip-0003/network-info.md | 22 +++++++++++++++++++
dip-0028.md | 2 +-
3 files changed, 46 insertions(+), 25 deletions(-)
create mode 100644 dip-0003/network-info.md
diff --git a/dip-0003.md b/dip-0003.md
index 0b5ea930..b9618ee9 100644
--- a/dip-0003.md
+++ b/dip-0003.md
@@ -23,6 +23,7 @@
1. [Selecting Quorums](#selecting-quorums)
1. [Appendix A: Reasons for Self Revocation of Operators](#appendix-a-reasons-for-self-revocation-of-operators)
1. [Appendix B: Masternode Types](#appendix-b-masternode-types)
+1. [Appendix C: Network Information](#appendix-c-network-information)
1. [Copyright](#copyright)
## Special Mention
@@ -100,7 +101,7 @@ This signature is only required for external collaterals. If collateralOutpoint
the fact that the ProRegTx was able to move the collateral acts as an implicit proof of ownership. In this case the
payloadSig must be empty.
-The ProRegTx might have the IP address and port fields set to zero. This will result in the masternode being added to the masternode list in the PoSe-banned state and require the operator to issue a ProUpServTx. This is needed in case the owner wants to delegate the operator role to a hosting service without knowing the IP Address and port in advance.
+The ProRegTx might have the masternode addresses field empty. This will result in the masternode being added to the masternode list in the PoSe-banned state and require the operator to issue a ProUpServTx. This is needed in case the owner wants to delegate the operator role to a hosting service without knowing the IP Address and port in advance.
The ProRegTx also defines the masternode's type and mode. Regular masternodes are of type 0, and future types will be defined in an [annex document](dip-0003/masternode-types.md). Different types would introduce additional or different consensus rules towards the masternodes based on future Dash improvement proposals. Masternode types are not updatable, however each type can have multiple operation modes. The operation modes are updatable.
@@ -118,8 +119,7 @@ The transaction consists of the following data in the payload area:
| type | uint_16 | 2 | Masternode type. Default set to 0. |
| mode | uint_16 | 2 | Masternode mode. Default set to 0. |
| collateralOutpoint | COutpoint | 36 | The collateral outpoint. |
-| ipAddress | byte[] | 16 | IPv6 address in network byte order. Only IPv4 mapped addresses are allowed (to be extended in the future) |
-| port | uint_16 | 2 | Port (network byte order) |
+| networkInfo | byte[] | variable | Masternode addresses (see [appendix](#appendix-c-network-information)) |
| KeyIdOwner | CKeyID | 20 | The public key hash used for owner related signing (ProTx updates, governance voting) |
| PubKeyOperator | BLSPubKey | 48 | The public key used for operational related signing (network messages, ProTx updates) |
| KeyIdVoting | CKeyID | 20 | The public key hash used for voting. |
@@ -146,7 +146,7 @@ There are multiple ways to update masternodes. The table below details the data
| Update Type | Transaction | Issued by | Data updated |
| ----------- | ----------- | --------- | ------------ |
-| Service | ProUpServTx | Operator Only | IP Address / Port |
+| Service | ProUpServTx | Operator Only | Masternode addresses |
| Registration | ProUpRegTx | Owner Only | Mode / Payout Script / Voting Key / Operator Key |
| Operator Revocation | ProUpRevTx | Operator Only | \* No data updated / * Only used to signal the owner that a new ProUpRegTx is required |
@@ -154,7 +154,7 @@ There are multiple ways to update masternodes. The table below details the data
To service update a masternode, the masternode operator must submit another special transaction (DIP2) to the network. This special transaction is called a Provider Update Service Transaction and is abbreviated as ProUpServTx. It can only be done by the operator.
-An operator can update the IP address and port fields of a masternode entry. If a non-zero operatorReward was set in the initial ProRegTx, the operator may also set the scriptOperatorPayout field in the ProUpServTx. If scriptOperatorPayout is not set and operatorReward is non-zero, the owner gets the full masternode reward.
+An operator can update the masternode addresses of a masternode entry. If a non-zero operatorReward was set in the initial ProRegTx, the operator may also set the scriptOperatorPayout field in the ProUpServTx. If scriptOperatorPayout is not set and operatorReward is non-zero, the owner gets the full masternode reward.
A ProUpServTx is only valid for masternodes in the registered masternodes subset. When processed, it updates the metadata of the masternode entry and revives the masternode if it was previously marked as PoSe-banned.
@@ -167,8 +167,7 @@ The transaction consists of the following data in the payload area:
| version | uint_16 | 2 | ProUpServTx version number. Set to 2 once v19 fork activates |
| type | uint_16 | 0 or 2 | Masternode type. Only present for version 2. |
| proTXHash | uint256 | 32 | The hash of the initial ProRegTx |
-| ipAddress | byte[] | 16 | IPv6 address in network byte order. Only IPv4 mapped addresses are allowed (to be extended in the future) |
-| port | uint_16 | 2 | Port (network byte order) |
+| networkInfo | byte[] | variable | Masternode addresses (see [appendix](#appendix-c-network-information)) |
| scriptOperatorPayoutSize | compactSize uint | 1-9 | Size of the Payee Script. |
| scriptOperatorPayout | Script | Variable | Payee script (p2pkh/p2sh) |
| inputsHash | uint256 | 32 | The SHA256 hash of all the outpoints of the transaction inputs |
@@ -247,7 +246,7 @@ Updating is done on the so called chain-tips list, which is the list valid at th
The chain-tips list is updated for every new block that is processed. The rules to update the list are the following:
- 1. If a valid ProRegTx is encountered, a masternode entry (identified by the hash of the ProRegTx) is added to the registered set. The entry also contains metadata (IP address, public keys, etc.) found in the ProTx.
+ 1. If a valid ProRegTx is encountered, a masternode entry (identified by the hash of the ProRegTx) is added to the registered set. The entry also contains metadata (masternode addresses, public keys, etc.) found in the ProTx.
2. If any transaction in the block spends the collateral of an existing entry in the registered masternode set, the corresponding masternode is removed from the list
3. PoSe verification is performed for all masternodes in the valid subset. If the verification for a masternode fails, it is marked as PoSe-banned and thus will be excluded from the valid masternode subset. PoSe verification is defined by DIP 006 and only relies on data available on-chain up to the current chain-tip.
4. If a ProUpServTx is found in the block and the referenced masternode is not marked as PoSe-banned, its metadata is updated.
@@ -281,14 +280,12 @@ Applicable to any type:
2. KeyIdOwner or PubKeyOperator was already used by any entry in the registered masternodes set
3. scriptPayout is not a P2PKH or P2SH script
4. When scriptPayout is P2PKH script and the public key hash equals any of KeyIdOwner or KeyIdVoting
- 5. ipAddress is set and port is not set to the default mainnet port
- 6. ipAddress is set and not routable or not an IPv4 mapped address
- 7. ipAddress is set and already used in the registered masternodes set
- 8. operatorReward > 10000
- 9. The inputsHash does not match the calculated hash
- 10. collateralOutpoint `hash` is null and payloadSig is not empty (zero size)
- 11. collateralOutpoint `hash` is not null and payloadSig is not a valid signature signed with the collateral key
- 12. collateralOutpoint `hash` is not null and the referenced collateral is not a P2PKH output
+ 5. networkInfo fails validation [(see rules)](dip-0003/network-info.md#mninfo_rules)
+ 6. operatorReward > 10000
+ 7. The inputsHash does not match the calculated hash
+ 8. collateralOutpoint `hash` is null and payloadSig is not empty (zero size)
+ 9. collateralOutpoint `hash` is not null and payloadSig is not a valid signature signed with the collateral key
+ 10. collateralOutpoint `hash` is not null and the referenced collateral is not a P2PKH output
Please note that while deploying DIP3, additional and temporary validation rules will apply. The details of these temporary rules will be described in the deployment plan.
@@ -297,13 +294,11 @@ Please note that while deploying DIP3, additional and temporary validation rules
A ProUpServTx is invalid if any of these conditions are true:
1. proTxHash can not be found in the registered masternode set
- 2. ipAddress is set and port is not set to the default mainnet port
- 3. ipAddress is set and not routable or not an IPv4 mapped address
- 4. ipAddress is set and already used in another masternode from the registered masternodes set
- 5. scriptOperatorPayout is set and operatorReward of the masternode is 0
- 6. scriptOperatorPayout is set and not a P2PKH or P2SH script
- 7. The inputsHash does not match the calculated hash
- 8. payloadSig is invalid
+ 2. networkInfo fails validation [(see rules)](dip-0003/network-info.md#mninfo_rules)
+ 3. scriptOperatorPayout is set and operatorReward of the masternode is 0
+ 4. scriptOperatorPayout is set and not a P2PKH or P2SH script
+ 5. The inputsHash does not match the calculated hash
+ 6. payloadSig is invalid
Please note that while deploying DIP3, additional and temporary validation rules will apply. The details of these temporary rules will be described in the deployment plan.
@@ -311,7 +306,7 @@ Please note that while deploying DIP3, additional and temporary validation rules
A ProRegTx or ProUpServTx is invalid if any of these conditions are true (applicable only when type is 1):
- 1. platformP2PPort, platformHTTPPort and port from ipAddress are not distinct.
+ 1. platformP2PPort, platformHTTPPort and networkInfo entries are not distinct.
2. platformNodeID is null or is a non-hex string.
3. platformNodeID is not unique in the network.
@@ -370,6 +365,10 @@ The individual quorum types present in Dash are not subject to this DIP and shou
See [masternode types table](dip-0003/masternode-types.md)
+## Appendix C: Network Information
+
+Masternode network information is defined in the [appendix](dip-0003/network-info.md)
+
## Copyright
Copyright (c) 2018 Dash Core Group, Inc. [Licensed under the MIT License](https://opensource.org/licenses/MIT)
diff --git a/dip-0003/network-info.md b/dip-0003/network-info.md
new file mode 100644
index 00000000..2f32af19
--- /dev/null
+++ b/dip-0003/network-info.md
@@ -0,0 +1,22 @@
+# Appendix C: Network Information
+
+## Masternode Information
+
+The fields below are represented as `networkInfo` and are applicable to all masternodes types as defined in
+[Appendix B](masternode-types.md)
+
+| Field | Type | Size | Description |
+| --------- | ------- | ---- | -------------------------------------------------------------------------- |
+| ipAddress | byte[] | 16 | IPv6 address in network byte order. Only IPv4 mapped addresses are allowed |
+| port | uint_16 | 2 | Port (network byte order) |
+
+### Validation Rules
+
+* `ipAddress` MUST be a valid IPv4 address that is routable on the global internet
+* `ipAddress` MUST NOT be already used in the registered masternodes set
+* `port` MUST be within the valid port range [1, 65535]
+* On mainnet, `port` MUST be set to the following value
+
+ | Field | Value |
+ | -------| ------ |
+ | port | 9999 |
diff --git a/dip-0028.md b/dip-0028.md
index c4a6d1b2..3d286c6c 100644
--- a/dip-0028.md
+++ b/dip-0028.md
@@ -271,7 +271,7 @@ The following new rules are added for both ProRegTx and ProUpServTx and are only
type is 1:
* `platformP2PPort` and `platformHTTPPort` MUST be valid port values [1, 65535]
-* `platformP2PPort`, `platformHTTPPort`, and port from ipAddress MUST be distinct
+* `platformP2PPort`, `platformHTTPPort`, and `port` from `networkInfo` MUST be distinct
* For mainnet evonodes, `platformP2PPort` and `platformHTTPPort` MUST be set to the default values
* Default Platform P2P port: 26656
* Default Platform HTTP port: 443
From 7f9d1943280189a6f3f988d74edcf13d73a2e6d0 Mon Sep 17 00:00:00 2001
From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com>
Date: Tue, 13 May 2025 11:42:06 +0000
Subject: [PATCH 4/8] docs(dip4): use DIP3's "Appendix C" for SML network
information
---
dip-0004.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dip-0004.md b/dip-0004.md
index 568b69be..bee0de3e 100644
--- a/dip-0004.md
+++ b/dip-0004.md
@@ -100,8 +100,7 @@ A SML entry consists of the following fields:
| --- | --- | --- | --- |
| proRegTxHash | uint256 | 32 | The hash of the ProRegTx that identifies the masternode |
| confirmedHash | uint256 | 32 | The hash of the block at which the masternode got confirmed |
-| ipAddress | byte[] | 16 | IPv6 address in network byte order. Only IPv4 mapped addresses are allowed (to be extended in the future) |
-| port | uint_16 | 2 | Port (network byte order) |
+| networkInfo | byte[] | variable | Masternode addresses (see [appendix](dip-0003.md#appendix-c-network-information)) |
| pubKeyOperator | BLSPubKey | 48 | The operators public key |
| keyIDVoting | CKeyID | 20 | The public key hash used for voting. |
| isValid | bool | 1 | True if a masternode is not PoSe-banned |
From 53815dd4a81d007a1b8b13ada7411dc47b72727c Mon Sep 17 00:00:00 2001
From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com>
Date: Tue, 13 May 2025 11:33:46 +0000
Subject: [PATCH 5/8] docs(dip3): move platform*Port network information fields
to Appendix C
---
dip-0003.md | 12 +++++-------
dip-0003/network-info.md | 21 +++++++++++++++++++++
2 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/dip-0003.md b/dip-0003.md
index b9618ee9..6816fc90 100644
--- a/dip-0003.md
+++ b/dip-0003.md
@@ -101,7 +101,7 @@ This signature is only required for external collaterals. If collateralOutpoint
the fact that the ProRegTx was able to move the collateral acts as an implicit proof of ownership. In this case the
payloadSig must be empty.
-The ProRegTx might have the masternode addresses field empty. This will result in the masternode being added to the masternode list in the PoSe-banned state and require the operator to issue a ProUpServTx. This is needed in case the owner wants to delegate the operator role to a hosting service without knowing the IP Address and port in advance.
+The ProRegTx might have an empty masternode addresses field. This will result in the masternode being added to the masternode list in the PoSe-banned state and require the operator to issue a ProUpServTx. This is needed in case the owner wants to delegate the operator role to a hosting service without knowing the IP Address and port in advance.
The ProRegTx also defines the masternode's type and mode. Regular masternodes are of type 0, and future types will be defined in an [annex document](dip-0003/masternode-types.md). Different types would introduce additional or different consensus rules towards the masternodes based on future Dash improvement proposals. Masternode types are not updatable, however each type can have multiple operation modes. The operation modes are updatable.
@@ -128,8 +128,7 @@ The transaction consists of the following data in the payload area:
| scriptPayout | Script | Variable | Payee script (p2pkh/p2sh) |
| inputsHash | uint256 | 32 | The SHA256 hash of all the outpoints of the transaction inputs |
| platformNodeID | byte[] | 0 or 20 | Dash Platform P2P node ID, derived from P2P public key. Only present for masternode type 1. |
-| platformP2PPort | uint_16 | 0 or 2 | TCP port of Dash Platform peer-to-peer communication between nodes (network byte order). Only present for masternode type 1. |
-| platformHTTPPort | uint_16 | 0 or 2 | TCP port of Platform HTTP/API interface (network byte order). Only present for masternode type 1. |
+| platformNetInfo | byte[] | variable | Platform addresses (see [appendix](#appendix-c-network-information)) |
| payloadSigSize | compactSize uint | 1-9 | Size of the Signature |
| payloadSig | unsigned char[] | Variable | Signature of the hash of the ProTx fields. Signed with the key corresponding to the collateral outpoint in case the collateral is not part of the ProRegTx itself, empty otherwise. |
@@ -172,8 +171,7 @@ The transaction consists of the following data in the payload area:
| scriptOperatorPayout | Script | Variable | Payee script (p2pkh/p2sh) |
| inputsHash | uint256 | 32 | The SHA256 hash of all the outpoints of the transaction inputs |
| platformNodeID | byte[] | 0 or 20 | Dash Platform P2P node ID, derived from P2P public key. Only present for masternode type 1. |
-| platformP2PPort | uint_16 | 0 or 2 | TCP port of Dash Platform peer-to-peer communication between nodes (network byte order). Only present for masternode type 1. |
-| platformHTTPPort | uint_16 | 0 or 2 | TCP port of Platform HTTP/API interface (network byte order). Only present for masternode type 1. |
+| platformNetInfo | byte[] | variable | Platform addresses (see [appendix](#appendix-c-network-information)) |
| payloadSig | BLSSig | 96 | Signature of the hash of the ProUpServTx fields. Signed by the Operator. |
The different versions are:
@@ -306,7 +304,7 @@ Please note that while deploying DIP3, additional and temporary validation rules
A ProRegTx or ProUpServTx is invalid if any of these conditions are true (applicable only when type is 1):
- 1. platformP2PPort, platformHTTPPort and networkInfo entries are not distinct.
+ 1. platformNetInfo fails validation [(see rules)](dip-0003/network-info.md#plinfo_rules).
2. platformNodeID is null or is a non-hex string.
3. platformNodeID is not unique in the network.
@@ -367,7 +365,7 @@ See [masternode types table](dip-0003/masternode-types.md)
## Appendix C: Network Information
-Masternode network information is defined in the [appendix](dip-0003/network-info.md)
+Masternode and Platform network information are defined in the [appendix](dip-0003/network-info.md)
## Copyright
diff --git a/dip-0003/network-info.md b/dip-0003/network-info.md
index 2f32af19..88819d69 100644
--- a/dip-0003/network-info.md
+++ b/dip-0003/network-info.md
@@ -20,3 +20,24 @@ The fields below are represented as `networkInfo` and are applicable to all mast
| Field | Value |
| -------| ------ |
| port | 9999 |
+
+## Platform Information
+
+The fields below are represented as `platformNetInfo` and are only applicable for evonodes as defined in
+[Appendix B](masternode-types.md)
+
+| Field | Type | Size | Description |
+| ---------------- | ------- | ------ | ---------------------------------------------------------------------------------------- |
+| platformP2PPort | uint_16 | 0 or 2 | TCP port of Dash Platform peer-to-peer communication between nodes (network byte order). |
+| platformHTTPPort | uint_16 | 0 or 2 | TCP port of Platform HTTP/API interface (network byte order). |
+
+### Validation Rules
+
+* `platformP2PPort` and `platformHTTPPort` MUST be within the valid port range [1, 65535]
+* `platformP2PPort`, `platformHTTPPort`, and [`port`](#masternode-information) from `networkInfo` MUST be distinct
+* On mainnet, `platformP2PPort` and `platformHTTPPort` MUST be set to the following values
+
+ | Field | Value |
+ | ------------------ | ------ |
+ | platformP2PPort | 26656 |
+ | platformHTTPPort | 443 |
From e742046d0799cf0fd578ad209db40d6ce9fa6ee3 Mon Sep 17 00:00:00 2001
From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com>
Date: Tue, 13 May 2025 11:42:58 +0000
Subject: [PATCH 6/8] docs(dip28): use DIP3's "Appendix C" for ProTx changelog
---
dip-0028.md | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/dip-0028.md b/dip-0028.md
index 3d286c6c..38a3107b 100644
--- a/dip-0028.md
+++ b/dip-0028.md
@@ -231,15 +231,13 @@ type 1 requires a 4000 DASH collateral.
A ProRegTx with masternode type 1 indicates registration of a 4000 DASH collateral evonode.
-If the `version` is 2 and the `type` is 1, then the `platformNodeID`, `platformP2PPort`, and
-`platformHTTPPort` fields are serialized in that order between the `inputsHash` and `payloadSigSize`
-fields.
+If the `version` is 2 and the `type` is 1, then the `platformNodeID` and `platformNetInfo`
+fields are serialized in that order between the `inputsHash` and `payloadSigSize` fields.
| Field | Type | Size | Description | Serialized |
| --- | --- | --- | --- | --- |
| platformNodeID | byte[] | 0 or 20 bytes | Dash Platform node ID, derived from P2P public key. Only present for masternode type 1. | Only when `version` is 2 and `type` is 1. |
-| platformP2PPort | uint_16 | 0 or 2 bytes | TCP port of Dash Platform peer-to-peer communication between nodes (network byte order). Only present for masternode type 1. | Only when `version` is 2 and `type` is 1. |
-| platformHTTPPort | uint_16 | 0 or 2 bytes | TCP port of Platform HTTP/API interface (network byte order). Only present for masternode type 1. | Only when `version` is 2 and `type` is 1. |
+| platformNetInfo | byte[] | variable | Platform addresses (see [appendix](dip-0003.md#appendix-c-network-information)). Only present for masternode type 1. | Only when `version` is 2 and `type` is 1. |
#### Changes in ProUpServTx
@@ -247,16 +245,14 @@ Since the ProUpServTx does not currently include the `type` field, version 2 of
it and serializes it right after the `version` field. A ProUpServTx of masternode type 1 indicates
an update registrar of a 4000 Dash collateral evonode.
-Also, if the `version` is 2 and the `type` is 1, then the `platformNodeID`, `platformP2PPort`, and
-`platformHTTPPort` fields are serialized in that order between the `inputsHash` and `payloadSig`
-fields.
+Also, if the `version` is 2 and the `type` is 1, then the `platformNodeID` and `platformNetInfo`
+fields are serialized in that order between the `inputsHash` and `payloadSig` fields.
| Field | Type | Size | Description | Serialized |
| --- | --- | --- | --- | --- |
| type | uint_16 | 0 or 2 bytes | Masternode type. 0 for regular masternode, 1 for evonode. | Only when `version` is 2. |
| platformNodeID | byte[] | 0 or 20 bytes | Dash Platform node ID, derived from P2P public key. Only present for masternode type 1. | Only when `version` is 2 and `type` is 1. |
-| platformP2PPort | uint_16 | 0 or 2 bytes | TCP port of Dash Platform peer-to-peer communication between nodes (network byte order). Only present for masternode type 1. | Only when `version` is 2 and `type` is 1. |
-| platformHTTPPort | uint_16 | 0 or 2 bytes | TCP port of Platform HTTP/API interface (network byte order). Only present for masternode type 1. | Only when `version` is 2 and `type` is 1. |
+| platformNetInfo | byte[] | variable | Platform addresses (see [appendix](dip-0003.md#appendix-c-network-information)). Only present for masternode type 1. | Only when `version` is 2 and `type` is 1. |
#### Added validation rules
@@ -270,11 +266,7 @@ The following new ProRegTx rules are added and are only applicable when `type` i
The following new rules are added for both ProRegTx and ProUpServTx and are only applicable when
type is 1:
-* `platformP2PPort` and `platformHTTPPort` MUST be valid port values [1, 65535]
-* `platformP2PPort`, `platformHTTPPort`, and `port` from `networkInfo` MUST be distinct
-* For mainnet evonodes, `platformP2PPort` and `platformHTTPPort` MUST be set to the default values
- * Default Platform P2P port: 26656
- * Default Platform HTTP port: 443
+* `platformNetInfo` MUST pass validation [(see rules)](dip-0003/network-info.md#plinfo_rules).
* `platformNodeID` MUST be a non-empty Hex string
* `platformNodeID` MUST be unique network-wide
From 6bbdfc823e5d1be326f79da02cd24dd35e0dcffc Mon Sep 17 00:00:00 2001
From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com>
Date: Thu, 1 May 2025 21:47:10 +0000
Subject: [PATCH 7/8] fix: drop "network byte order" from
`platform{HTTP,P2P}Port` description
---
dip-0003/network-info.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dip-0003/network-info.md b/dip-0003/network-info.md
index 88819d69..67ebac2d 100644
--- a/dip-0003/network-info.md
+++ b/dip-0003/network-info.md
@@ -26,10 +26,10 @@ The fields below are represented as `networkInfo` and are applicable to all mast
The fields below are represented as `platformNetInfo` and are only applicable for evonodes as defined in
[Appendix B](masternode-types.md)
-| Field | Type | Size | Description |
-| ---------------- | ------- | ------ | ---------------------------------------------------------------------------------------- |
-| platformP2PPort | uint_16 | 0 or 2 | TCP port of Dash Platform peer-to-peer communication between nodes (network byte order). |
-| platformHTTPPort | uint_16 | 0 or 2 | TCP port of Platform HTTP/API interface (network byte order). |
+| Field | Type | Size | Description |
+| ---------------- | ------- | ------ | ------------------------------------------------------------------- |
+| platformP2PPort | uint_16 | 0 or 2 | TCP port of Dash Platform peer-to-peer communication between nodes. |
+| platformHTTPPort | uint_16 | 0 or 2 | TCP port of Platform HTTP/API interface. |
### Validation Rules
From 735f4c4c34d37f4365e976144164295d3130e90b Mon Sep 17 00:00:00 2001
From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com>
Date: Wed, 7 May 2025 15:26:33 +0000
Subject: [PATCH 8/8] docs(dip4): consolidate SML entry structure by addition
conditions col
---
dip-0004.md | 41 ++++++++++++++---------------------------
1 file changed, 14 insertions(+), 27 deletions(-)
diff --git a/dip-0004.md b/dip-0004.md
index bee0de3e..99c7c517 100644
--- a/dip-0004.md
+++ b/dip-0004.md
@@ -96,39 +96,26 @@ A SML entry is used to calculate the hashes for the merkleRootMNList. It is also
A SML entry consists of the following fields:
-| Field | Type | Size | Description |
-| --- | --- | --- | --- |
-| proRegTxHash | uint256 | 32 | The hash of the ProRegTx that identifies the masternode |
-| confirmedHash | uint256 | 32 | The hash of the block at which the masternode got confirmed |
-| networkInfo | byte[] | variable | Masternode addresses (see [appendix](dip-0003.md#appendix-c-network-information)) |
-| pubKeyOperator | BLSPubKey | 48 | The operators public key |
-| keyIDVoting | CKeyID | 20 | The public key hash used for voting. |
-| isValid | bool | 1 | True if a masternode is not PoSe-banned |
-
-Clients with protocol version greater than or equal to 70227 will receive the following fields just after `isValid`.
-
-| Field | Type | Size | Description |
-|---------------------| ---- | ---- |-----------------------------------|
-| type | uint_16 | 0 or 2 | Masternode type. 0 for regular masternode, 1 for evonode. |
-| platformHTTPPort | uint_16 | 0 or 2 | TCP port of Platform HTTP/API interface (network byte order). Only present for masternode type 1. |
-| platformNodeID | byte[] | 0 or 20 | Dash Platform P2P node ID, derived from P2P public key. Only present for masternode type 1. |
-
-The new `type`, `platformHTTPPort` and `platformNodeID` fields will be serialised only when v19 activates and only for entries with `nVersion` equals to 2.
-
-Clients with protocol version greater than or equal to 70228 will receive the following field just before `proRegTxHash`.
-
-| Field | Type | Size | Description |
-|---------------------| -------- | ---- |-----------------------------------|
-| nVersion | uint16_t | 2 | Version of the SML entry |
+| Field | Type | Size | Description | Presence condition |
+| ---------------- | --------- | -------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
+| nVersion | uint16_t | 2 | Version of the SML entry | `PROTOCOL_VERSION` >= `70228` |
+| proRegTxHash | uint256 | 32 | The hash of the ProRegTx that identifies the masternode | _Always present_ |
+| confirmedHash | uint256 | 32 | The hash of the block at which the masternode got confirmed | _Always present_ |
+| networkInfo | byte[] | variable | Masternode addresses (see [appendix](dip-0003.md#appendix-c-network-information)) | _Always present_ |
+| pubKeyOperator | BLSPubKey | 48 | The operators public key | _Always present_ |
+| keyIDVoting | CKeyID | 20 | The public key hash used for voting. | _Always present_ |
+| isValid | bool | 1 | True if a masternode is not PoSe-banned | _Always present_ |
+| type | uint_16 | 0 or 2 | Masternode type. 0 for regular masternode, 1 for evonode. | `PROTOCOL_VERSION` >= `70227` and `nVersion` == 2 |
+| platformHTTPPort | uint_16 | 0 or 2 | TCP port of Platform HTTP/API interface (network byte order). Only present for masternode type 1. | `PROTOCOL_VERSION` >= `70227` and `nVersion` == 2 |
+| platformNodeID | byte[] | 0 or 20 | Dash Platform P2P node ID, derived from P2P public key. Only present for masternode type 1. | `PROTOCOL_VERSION` >= `70227` and `nVersion` == 2 |
The `nVersion` field indicates which BLS scheme is used to serialise each SML entries' `pubKeyOperator` field.
-| Version | Value Description |
-|---------|-----------------------------------------------------------|
+| Version | Value Description |
+| ------- | --------------------------------------------------------- |
| 1 | Serialisation of `pubKeyOperator` using legacy BLS scheme |
| 2 | Serialisation of `pubKeyOperator` using basic BLS scheme |
-
### Calculating the merkle root of the active LLMQs
The CbTx contains the “merkleRootQuorums” field. This is the merkle root of all the hashes of the final quorum commitments