forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: introduce basic extended addresses implementation, stop using platform{HTTP,P2P}Port
#6666
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
50cdc84
fix: don't return invalid values with empty `MnNetInfo`
kwvg ef2fb7b
evo: drop `std::reference_wrapper` usage, make copies instead
kwvg e9cac47
evo: introduce barebones extended addresses (`ExtNetInfo`) impl
kwvg 56b1bb6
evo: introduce versioning for `ExtNetInfo`
kwvg a35d9c6
evo: prohibit entries with duplicate addresses in `ExtNetInfo`
kwvg 4ca6542
evo: introduce the ability to store multiple lists of addresses
kwvg 53f993c
evo: allow address entries to be differentiated by port
kwvg bfbfe3c
evo: allow storing platform P2P and HTTPS addresses in `ExtNetInfo`
kwvg e155529
evo: stop using `platform{HTTP,P2P}Port` fields if using extended addrs
kwvg 7664ecf
refactor: consolidate input processing in ProcessNetInfo*, update errs
kwvg 1d36005
rpc: set `platform{HTTP,P2P}Port` with `netInfo`, allow addr:port str
kwvg 01ee293
rpc: make setting `platform{HTTP,P2P}Port` optional if using `netInfo`
kwvg d519eea
rpc: allow multiple entries in `platform{HTTP,P2P}Port`
kwvg f59f9f5
refactor(rpc): `platform{HTTP,P2P}Port` > `platform{HTTPS,P2P}Addrs`
kwvg f04ed99
refactor(test): `platform_{http,p2p}_port` > `addrs_platform_{https,p…
kwvg 8efbad8
refactor(test): `coreP2PAddrs` > `addrs_core_p2p`
kwvg 17d17af
rpc: allow `addresses` to report data from legacy platform port fields
kwvg 245a6ee
rpc: implement special platform port shim for `CDeterministicMNStateD…
kwvg b69ca87
rpc: allow `platform{P2P,HTTP}Port` to return port of first address
kwvg 885e223
test: allow passing empty `coreP2PAddrs` to `MasternodeInfo` helpers
kwvg 30500f7
refactor(test): deduplicate common input validation in `MasternodeInfo`
kwvg fef8332
refactor(test): remove non-EvoNode paths from `rpc_netinfo`, cleanup
kwvg 8843fc2
test: activate v23 fork and test post-fork input validation rules
kwvg 5317eef
test: validate post-fork shim behavior
kwvg e97a650
test: validate address reporting behavior for empty address ProRegTxes
kwvg 5b1b168
rpc: don't report Platform-specific fields in CoinJoin RPCs
kwvg 90713a2
doc: add release notes for base extended addresses and shims
kwvg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| Notable Changes | ||
| --------------- | ||
|
|
||
| * Dash Core has added support for the ability to register multiple addr:port pairs to a masternode and for specifying | ||
| distinct addresses for platform P2P and platform HTTPS endpoints. The consensus and format changes needed to enable | ||
| this capability is referred to as "extended addresses" and is enabled by the deployment of the v23 fork, affecting | ||
| new masternode registrations and service updates to basic BLS masternodes. | ||
| * Operators must upgrade from legacy BLS scheme to basic BLS scheme before utilizing extended address capabilities | ||
|
|
||
| Additional Notes | ||
| ---------------- | ||
|
|
||
| * While the field `service` is deprecated (see dash#6665), its effective value can be obtained by querying | ||
| `addresses['core_p2p'][0]`. | ||
|
|
||
| * If the masternode is eligible for extended addresses, operators may register non-IPv4 addresses, subject to validation | ||
| and consensus rules. | ||
|
|
||
| Updated RPCs | ||
| ------------ | ||
|
|
||
| * The input field `platformP2PPort` has been renamed to `platformP2PAddrs`. In addition to numeric inputs (i.e. ports), | ||
| the field can now accept a string (i.e. an addr:port pair) and arrays of strings (i.e. multiple addr:port pairs), | ||
| subject to validation rules. | ||
|
|
||
| * The input field `platformHTTPPort` has been renamed to `platformHTTPSAddrs`. In addition to numeric inputs (i.e. ports), | ||
| the field can now accept a string (i.e. an addr:port pair) and arrays of strings (i.e. multiple addr:port pairs), | ||
| subject to validation rules. | ||
|
|
||
| * The field `addresses` will now also report on platform P2P and platform HTTPS endpoints as `addresses['platform_p2p']` | ||
| and `addresses['platform_https']` respectively. | ||
| * On payloads before extended addresses, if a masternode update affects `platformP2PPort` and/or `platformHTTPPort` | ||
| but does not affect `netInfo`, `protx listdiff` does not contain enough information to report on the masternode's | ||
| address and will report the changed port paired with the dummy address `255.255.255.255`. | ||
|
|
||
| This does not affect `protx listdiff` queries where `netInfo` was updated or diffs relating to masternodes that | ||
| have upgraded to extended addresses. | ||
|
|
||
| * If the masternode is eligible for extended addresses, `protx register{,_evo}` and `register_fund{,_evo}` will continue | ||
| allowing `coreP2PAddrs` to be left blank, as long as `platformP2PAddrs` and `platformHTTPSAddrs` are _also_ left blank. | ||
| * Attempting to populate any three address fields will make populating all fields mandatory. | ||
| * This does not affect nodes ineligible for extended addresses (i.e. all nodes before fork activation or legacy BLS nodes) | ||
| and they will have to continue specifying `platformP2PAddrs` and `platformHTTPSAddrs` even if they wish to keep | ||
| `coreP2PAddrs` blank. | ||
|
|
||
| * If the masternode is eligible for extended addresses, `protx register{,_evo}` and `register_fund{,_evo}` will no longer | ||
| default to the core P2P port if a port is not specified in the addr:port pair. All ports must be specified explicitly. | ||
| * This does not affect nodes ineligible for extended addresses, continuing to default to the core P2P port if provided an | ||
| addr without a port. | ||
|
|
||
| * `protx register{,_evo}` and `register_fund{,_evo}` will continue to allow specifying only the port number for `platformP2PAddrs` | ||
| and `platformHTTPSAddrs`, pairing it with the address from the first `coreP2PAddrs` entry. This mirrors existing behavior. | ||
| * This method of entry may not be available in future releases of Dash Core and operators are recommended to switch over to | ||
| explicitly specifying (arrays of) addr:port strings for all address fields. | ||
|
|
||
| * When reporting on extended address payloads, `platformP2PPort` and `platformHTTPPort` will read the port value from | ||
| `netInfo[PLATFORM_P2P][0]` and `netInfo[PLATFORM_HTTPS][0]` respectively as both fields are subsumed into `netInfo`. | ||
| * If `netInfo` is blank (which is allowed by ProRegTx), `platformP2PPort` and `platformHTTPPort` will report `-1` to indicate | ||
| that the port number cannot be determined. | ||
| * `protx listdiff` will not report `platformP2PPort` or `platformHTTPPort` if the legacy fields were not updated (i.e. | ||
| changes to `netInfo` will not translate into reporting). This is because `platformP2PPort` or `platformHTTPPort` have | ||
| dedicated diff flags and post-consolidation, all changes are now affected by `netInfo`'s diff flag. | ||
|
|
||
| To avoid the perception of changes to fields that not serialized by extended address payloads, data from `netInfo` will | ||
| not be translated for this RPC call. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Fix subject-verb agreement and wording (“changes … are referred to … are enabled …”).
The sentence mixes plural “changes” with singular verbs. Tighten wording for clarity.
Apply this diff:
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[grammar] ~7-~7: There might be a mistake here.
Context: ...ervice updates to basic BLS masternodes. * Operators must upgrade from legacy BLS s...
(QB_NEW_EN)
🤖 Prompt for AI Agents