Commit 2e6d8f2
committed
Merge #6872: docs(rpc): introduce
56514c7 chore: move RpcResult map outside `GetRpcResult()` (Kittywhiskers Van Gogh)
f01930b chore: remove redundant `[[nodiscard]]` attributions in source file (Kittywhiskers Van Gogh)
b7eb196 rpc: `GetJsonHelp()` defs for `DeterministicMN{,State{,{Diff}}}` (Kittywhiskers Van Gogh)
1be2226 rpc: `GetJsonHelp()` defs for `Quorum{Rotation,Snapshot}`,`RecoveredSig` (Kittywhiskers Van Gogh)
ae4e05c rpc: `GetJsonHelp()` defs for `MNHFTx`, `CAsset{Un,}lock` (Kittywhiskers Van Gogh)
ddc698b refactor: move pending `evo/`-specific definitions to `core_write.cpp` (Kittywhiskers Van Gogh)
73da03e refactor: move LLMQ-specific `ToJson()` definitions to separate file (Kittywhiskers Van Gogh)
7219a29 rpc: `GetJsonHelp()` defs for `CbTx`, `SimplifiedMNList`, final commitm. (Kittywhiskers Van Gogh)
9de8c9c trivial: add missing headers (Kittywhiskers Van Gogh)
a9218b1 rpc: introduce `GetJsonHelp()` to provide help text for Dash RPC objects (Kittywhiskers Van Gogh)
Pull request description:
## Motivation
When working on extended addresses, we deprecated `service`, `platformHTTPPort` and `platformP2PPort` and had the _method_ of deprecation changed for `service` due to feedback. During that process, it was apparent that there wasn't a way to convey deprecation status outside of release notes as we didn't generate RPC help text for objects that feature the affected fields.
Currently, the authoritative source of documentation is Dash Core developer documentation ([source](https://docs.dash.org/en/stable/docs/core/)) and it has been used as a source for the description of various fields described in the PR _but_ changes, reorganizations and deprecations are not reflected in real time when they are done in-source, they need to feature in a release in order for the corresponding documentation to reflect it.
This makes development on nightlies relatively painful and makes decisions like deprecations noted in release notes with little to show for it in-source. This pull request aims to take the first step to remedying that.
## Additional Information
* The description of a `GetJsonHelp()`'s `RPCResult` is suppressed if the `key` is blank, this is because if the object is part of an array, the description should be set in the higher level entity.
* `clang-format` suggestions have been intentionally ignored in the interest of legibility, the extent of nesting and construction in this PR requires us to make an exception to standard linting practices. This is a general pain point in RPC code but is mentioned here for posterity.
* This pull request is **not** exhaustive, the scope of this pull request is to define the help text for _objects_ and integrate them where convenient, if there are RPCs that have more complex structures, they will not benefit from this PR as no existing structure is present for `GetJsonHelp()` to slot into. Work on this can be addressed in future pull requests.
* We have used `const std::string&` instead of `std::string_view` due to limitations in `RPCResult` and the UniValue API. If these limitations have been resolved, we can switch over to it trivially. This will **not** help make `RPCRESULT_MAP` `constexpr` as `std::map`s cannot be standalone `constexpr` objects even in C++26 ([source](https://en.cppreference.com/w/cpp/container/map.html)).
## Breaking Changes
None expected.
## Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)**
- [x] I have made corresponding changes to the documentation **(note: N/A)**
- [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
PastaPastaPasta:
utACK 56514c7
UdjinM6:
utACK 56514c7
Tree-SHA512: 2371163ad4f845aa896887373f982ffe30a232aff3332b01b38902b30023455c0b6319f9935ca5609ebcdb6fef6177e7692a9f060b9e2bdf8888ad104f76ace1GetJsonHelp() to complement ToJson() for Dash-specific objects to aid generating RPC help textFile tree
23 files changed
+687
-228
lines changed- src
- evo
- llmq
- rpc
23 files changed
+687
-228
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
906 | 906 | | |
907 | 907 | | |
908 | 908 | | |
| 909 | + | |
909 | 910 | | |
910 | 911 | | |
911 | 912 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 18 | | |
22 | | - | |
| 19 | + | |
| 20 | + | |
23 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| 64 | + | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| |||
0 commit comments