-
Notifications
You must be signed in to change notification settings - Fork 58
docs: move (platform) network information fields from DIP-00{03, 04, 28} to Appendix C of DIP-0003, minor cleanup #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
thephez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just a couple suggestions/questions to consider.
thephez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just waiting on #163 to be approved to handle those hpmn references.
|
#163 is merged now. I like the SML table consolidation btw. Simplifies the reading experience 👍 |
Type 0 masternodes are referred to as "default" and "regular" in different documents, let's harmonize them.
PastaPastaPasta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
thephez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| | 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 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I really dislike the extraneous space that ai adds to markdown tables
Motivation
As preparation for introduction of the extended addresses specification to DIP-0003, this pull request does the following:
Deduplicate references to
ipAddressandport(used to define the publicly advertised address of a masternode) to an appendix as they're present in both ProTx and SML structures and replacing it with a reference to an opaque fieldnetworkInfo.Deduplicate references to
platform{P2P,HTTP}Port(used to define the port used in combination withipAddressmentioned earlier to define publicly advertised addresses of a platform services) to the same appendix as they're present in ProTx structures and referenced in DIP-0028 and replacing it with a reference to an opaque fieldplatformNetInfo.platformHTTPPortAdditional Information
Dependency for docs: document the extended addresses format in Appendix C of DIP-0003, add new {ProTx, SML} version to support it, add deprecation notices #164
The "network byte order" description for
platform{P2P,HTTP}Porthas been dropped as this does not reflect the implementation as it stands. To illustrate, theportinnetworkInfois stored as aCServicein Dash Core and uses the following serialization (as of v22.1.2, source)Compared to how
platform{P2P,HTTP}Portis serialized inCProUpServTx(source)