Skip to content

Commit 2686b3f

Browse files
committed
docs(dip4): consolidate SML entry structure by addition conditions col
1 parent 6be7048 commit 2686b3f

1 file changed

Lines changed: 14 additions & 26 deletions

File tree

dip-0004.md

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -96,39 +96,27 @@ A SML entry is used to calculate the hashes for the merkleRootMNList. It is also
9696

9797
A SML entry consists of the following fields:
9898

99-
| Field | Type | Size | Description |
100-
| --- | --- | --- | --- |
101-
| proRegTxHash | uint256 | 32 | The hash of the ProRegTx that identifies the masternode |
102-
| confirmedHash | uint256 | 32 | The hash of the block at which the masternode got confirmed |
103-
| networkInfo | byte[] | variable | Masternode network information (see [appendix](dip-0003.md#appendix-c-network-information)) |
104-
| pubKeyOperator | BLSPubKey | 48 | The operators public key |
105-
| keyIDVoting | CKeyID | 20 | The public key hash used for voting. |
106-
| isValid | bool | 1 | True if a masternode is not PoSe-banned |
107-
108-
Clients with protocol version greater than or equal to 70227 will receive the following fields just after `isValid`.
109-
110-
| Field | Type | Size | Description |
111-
|---------------------| ---- | ---- |-----------------------------------|
112-
| type | uint_16 | 0 or 2 | Masternode type. 0 for regular masternode, 1 for EvoNode. |
113-
| platformHTTPPort | uint_16 | 0 or 2 | TCP port of Platform HTTP/API interface (network byte order). Only present for masternode type 1. |
114-
| platformNodeID | byte[] | 0 or 20 | Dash Platform P2P node ID, derived from P2P public key. Only present for masternode type 1. |
99+
| Field | Type | Size | Description | Presence condition |
100+
| ---------------- | --------- | -------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
101+
| nVersion | uint16_t | 2 | Version of the SML entry | `PROTOCOL_VERSION` >= `70228` |
102+
| proRegTxHash | uint256 | 32 | The hash of the ProRegTx that identifies the masternode | _Not applicable_ |
103+
| confirmedHash | uint256 | 32 | The hash of the block at which the masternode got confirmed | _Not applicable_ |
104+
| networkInfo | byte[] | variable | Masternode network information (see [appendix](dip-0003.md#appendix-c-network-information)) | _Not applicable_ |
105+
| pubKeyOperator | BLSPubKey | 48 | The operators public key | _Not applicable_ |
106+
| keyIDVoting | CKeyID | 20 | The public key hash used for voting. | _Not applicable_ |
107+
| isValid | bool | 1 | True if a masternode is not PoSe-banned | _Not applicable_ |
108+
| type | uint_16 | 0 or 2 | Masternode type. 0 for regular masternode, 1 for EvoNode. | `PROTOCOL_VERSION` >= `70227` and `nVersion` == 2 |
109+
| 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 |
110+
| 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 |
115111

116-
The new `type`, `platformHTTPPort` and `platformNodeID` fields will be serialised only when v19 activates and only for entries with `nVersion` equals to 2.
117-
118-
Clients with protocol version greater than or equal to 70228 will receive the following field just before `proRegTxHash`.
119-
120-
| Field | Type | Size | Description |
121-
|---------------------| -------- | ---- |-----------------------------------|
122-
| nVersion | uint16_t | 2 | Version of the SML entry |
123112

124113
The `nVersion` field indicates which BLS scheme is used to serialise each SML entries' `pubKeyOperator` field.
125114

126-
| Version | Value Description |
127-
|---------|-----------------------------------------------------------|
115+
| Version | Value Description |
116+
| ------- | --------------------------------------------------------- |
128117
| 1 | Serialisation of `pubKeyOperator` using legacy BLS scheme |
129118
| 2 | Serialisation of `pubKeyOperator` using basic BLS scheme |
130119

131-
132120
### Calculating the merkle root of the active LLMQs
133121

134122
The CbTx contains the “merkleRootQuorums” field. This is the merkle root of all the hashes of the final quorum commitments

0 commit comments

Comments
 (0)