Skip to content
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

docs(rpc): v22 rpc updates, 2 #123

Merged
merged 8 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 55 additions & 51 deletions docs/api/remote-procedure-call-quick-reference.md

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions docs/api/remote-procedure-calls-dash.md
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,44 @@ dash-cli -testnet gobject vote-many \

The [`masternode` RPC](#masternode) provides a set of commands for managing masternodes and displaying information about them.

### Masternode Connect

The [`masternode connect` RPC](#masternode-connect) initiates a connection to a specified masternode address, with optional support for the BIP324 v2 transport protocol.

_Parameter #1---the address of the masternode_

| Name | Type | Presence | Description |
| --------- | ------ | ----------------------- | ----------- |
| address | string | Required<br>(exactly 1) | The IP address and port of the masternode to connect to (e.g., `192.168.1.100:19999`) |

_Parameter #2---transport protocol options_

| Name | Type | Presence | Description |
| ------------ | ------- | -------------------- | ----------- |
| v2transport | bool | Optional<br>(0 or 1) | Set to `true` to attempt connection using the BIP324 v2 transport protocol. Defaults to `false`. |

_Result---connection status_

| Name | Type | Presence | Description |
| ------------ | ------- | ----------------------- | ----------- |
| `result` | string | Required<br>(exactly 1) | Command return status |

*Example from Dash Core 22.0.0*

Connect to a masternode at address `192.168.1.100` using the default transport protocol:

```bash
dash-cli masternode connect "192.168.1.100:19999"
```

Result:

```text
successfully connected
```

*See also: none*

### Masternode Count

The `masternode count` RPC prints the number of all known masternodes.
Expand Down
82 changes: 58 additions & 24 deletions docs/api/remote-procedure-calls-evo.md
Original file line number Diff line number Diff line change
Expand Up @@ -1401,12 +1401,6 @@ ec66f97568727a9e5188acb3ccf680086ae11217236efcccd67b0b72e83c79a043d6c6d064378fdd
47d9401e0a569a5488728e09542d0545ab56f8249a4b21e03445fa411e
```

### ProTx Register HPMN

:::{deprecated} 20.0.0
The `protx *_hpmn` RPC commands were renamed in Dash Core 20.0.0 and can now be accessed as `protx *_evo` (e.g. `protx register_hpmn` is now `protx register_evo`).
:::

### ProTx Register Fund Evo

The `protx register_fund_evo` RPC creates, funds, and sends a ProTx to the network. The resulting transaction will move 4000 Dash to the address specified by `collateralAddress` and will then function as the collateral of your evonode. A few of the limitations you see in the arguments are temporary and might be lifted after DIP3 is fully deployed. Requires the wallet passphrase to be provide with the [`walletpassphrase` RPC](../api/remote-procedure-calls-wallet.md#walletpassphrase) if the wallet is encrypted.
Expand Down Expand Up @@ -1536,12 +1530,6 @@ c207ebd525793ccb43f60ce34a5cd5f4011976a9145a375814e9caf5b8575a8221be246457e5c5c2
8d88ac45084a0f63d6f06767c941ffd5af4ed17ea0e28afa481e46b2bdbadbd8446c8c00\
```

### ProTx Register Fund HPMN

:::{deprecated} 20.0.0
The `protx *_hpmn` RPC commands were renamed in Dash Core 20.0.0 and can now be accessed as `protx *_evo` (e.g. `protx register_hpmn` is now `protx register_evo`).
:::

### ProTx Register Prepare Evo

The `protx register_prepare_evo` RPC creates an unsigned ProTx and a message that must be signed externally with the private key that corresponds to `collateralAddress` to prove collateral ownership. The prepared transaction will also contain inputs and outputs to cover fees.
Expand Down Expand Up @@ -1648,12 +1636,6 @@ Result:
}
```

### ProTx Register Prepare HPMN

:::{deprecated} 20.0.0
The `protx *_hpmn` RPC commands were renamed in Dash Core 20.0.0 and can now be accessed as `protx *_evo` (e.g. `protx register_hpmn` is now `protx register_evo`).
:::

### ProTx Update Service Evo

The `protx update_service_evo` RPC creates and sends a ProUpServTx to the network. This will update the IP address and the Platform fields of an evonode. If this is done for an evonode that was PoSe-banned, the ProUpServTx will also revive this evonode.
Expand Down Expand Up @@ -1728,12 +1710,6 @@ Result:
5b6cfa1bdd3c8b7e0b9550b9c4e809381f81a410bc7f241d3879dd736fd51270
```

### ProTx Update Service HPMN

:::{deprecated} 20.0.0
The `protx *_hpmn` RPC commands were renamed in Dash Core 20.0.0 and can now be accessed as `protx *_evo` (e.g. `protx register_hpmn` is now `protx register_evo`).
:::

### ProTx Register Submit

The `protx register_submit` RPC combines the unsigned ProTx and a signature of the signMessage, signs all inputs which were added to cover fees and submits the resulting transaction to the network. Note: See [`protx register_prepare`](#protx-register-prepare) for more info about creating a ProTx and a message to sign.
Expand Down Expand Up @@ -2949,6 +2925,64 @@ Result:
}
```

### Quorum GetData

The [`quorum getdata` RPC](#quorum-getdata) sends a [`qgetdata` message](../reference/p2p-network-quorum-messages.md#qgetdata) to a specified peer, requesting specific quorum-related data from that peer.

_Parameter #1---the internal node ID_

| Name | Type | Presence | Description |
|----------|--------|-------------------------|-------------|
| `nodeId` | number | Required<br>(exactly 1) | The internal nodeId of the peer from which quorum data is requested |

_Parameter #2---the LLMQ type_

| Name | Type | Presence | Description |
|-----------|--------|-------------------------|-------------|
| `llmqType`| number | Required<br>(exactly 1) | The LLMQ type associated with the quorum data being requested |

_Parameter #3---the quorum hash_

| Name | Type | Presence | Description |
|--------------|--------|-------------------------|-------------|
| `quorumHash` | string | Required<br>(exactly 1) | The quorum hash for the quorum data being requested |

_Parameter #4---the data mask_

| Name | Type | Presence | Description |
|-------------|--------|-------------------------|-------------|
| `dataMask` | number | Required<br>(exactly 1) | Specifies the type of data requested. Possible values are:<br>`1` - Quorum verification vector<br>`2` - Encrypted contributions for member specified by `proTxHash` (`proTxHash` must be specified if this option is used)<br>`3` - Both (1 and 2) |

_Parameter #5---the ProTxHash_

| Name | Type | Presence | Description |
|------------|--------|---------------------------|-------------|
| `proTxHash`| string | Optional<br>(default="") | The ProTxHash for the contributions requested. Must be a member of the specified LLMQ. Cannot be specified if `dataMask` is set to `1`. Required if `dataMask` is set to `2`. |

_Result---execution result_

| Name | Type | Presence | Description |
|---------------------|-----------------|-------------------------|-------------|
| `success` | bool | Required<br>(exactly 1) | Displays `true` if the data request was successful or `false` if it failed |

_Example from Dash Core 22.0.0_

Requesting the quorum verification vector from a peer with node ID `12` for a quorum of type `2`:

```bash
dash-cli quorum getdata 1 2 "000000822d2b1b311af360750b6448917f10d8b92d2ea2a7bbae221e859354f9" 1
```

Result:

```text
true
```

_See also_

* [Quorum List](#quorum-list): displays a list of on-chain quorums.

### Quorum GetRecSig

The `quorum getrecsig` RPC gets the recovered signature for a previous threshold-signing message request.
Expand Down
42 changes: 26 additions & 16 deletions docs/api/remote-procedure-calls-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,26 @@ The [`addnode` RPC](../api/remote-procedure-calls-network.md#addnode) attempts t

*Parameter #1---hostname/IP address and port of node to add or remove*

| Name | Type | Presence | Description |
| ------ | ------ | ----------------------- | ----------------------------------------------------------------- |
| Name | Type | Presence | Description |
| ------ | ------ | ----------------------- | ----------- |
| `node` | string | Required<br>(exactly 1) | The node to add as a string in the form of `<IP address>:<port>`. |

*Parameter #2---whether to add or remove the node, or to try only once to connect*

| Name | Type | Presence | Description |
| --------- | ------ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Presence | Description |
| --------- | ------ | ----------------------- | ----------- |
| `command` | string | Required<br>(exactly 1) | What to do with the IP address above. Options are:<br>• `add` to add a node to the addnode list. Up to 8 nodes can be added additional to the default 8 nodes. Not limited by `-maxconnections`<br>• `remove` to remove a node from the list. If currently connected, this will disconnect immediately<br>• `onetry` to immediately attempt connection to the node even if the outgoing connection slots are full; this will only attempt the connection once |

*Parameter #3---v2 transport*

| Name | Type | Presence | Description |
| ------ | ------ | ----------------------- | ----------- |
| `v2transport` | bool | Optional<br>(0 or1) | Attempt to connect using BIP324 v2 transport protocol (ignored for `remove` command). Default=set by `-v2transport` option. |

_Result---`null` plus error on failed remove_

| Name | Type | Presence | Description |
| -------- | ---- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Presence | Description |
| -------- | ---- | ----------------------- | ----------- |
| `result` | null | Required<br>(exactly 1) | Always JSON `null` whether the node was added, removed, tried-and-connected, or tried-and-not-connected. The JSON-RPC error field will be set only if you try adding a node that was already added or removing a node that is not on the addnodes list |

*Example from Dash Core 0.12.2*
Expand Down Expand Up @@ -564,8 +570,10 @@ The [`getpeerinfo` RPC](../api/remote-procedure-calls-network.md#getpeerinfo) re
| → →<br>`bytesrecv_per_msg` | string : <br>object | Required<br>(exactly 1) | *Added in Bitcoin Core 0.13.0*<br><br>Information about total received bytes aggregated by message type |
| → → →<br>Message Type | number (int) | Required<br>(1 or more) | Total received bytes aggregated by message type. One field for every used message type |
| `connection_type` | string | Required<br>(exactly 1) | **Added in Dash Core 20.1.0**<br>Type of connection:<br>outbound-full-relay, block-relay-only, inbound, manual, addr-fetch, feeler.<br>Describes how the connection was established. Set to `true` if this node was added via the [`addnode` RPC](../api/remote-procedure-calls-network.md#addnode).<br>**Note: This output is subject to change in future releases as connection behaviors are refined.** |
| `transport_protocol_type`| string | Optional<br>(0 or 1) | **Added in Dash Core 22.0.0**<br>The transport protocol type:<br>`detecting` - peer could be v1 or v2<br>`v1` - plaintext transport protocol<br>`v2` - BIP324 encrypted transport protocol |
| `session_id` | string | Optional<br>(0 or 1) | **Added in Dash Core 22.0.0**<br>The session ID for this connection, or "" if there is none ("v2" transport protocol only). |

*Example from Dash Core 21.0.0*
*Example from Dash Core 22.0.0*

```bash
dash-cli -testnet getpeerinfo
Expand Down Expand Up @@ -599,20 +607,20 @@ Result (edited to show only a single entry, with IP addresses changed to
"timeoffset": 0,
"pingtime": 0.105995,
"minping": 0.095181,
"version": 70232,
"subver": "/Dash Core:21.0.0(dcg-masternode-7)/",
"version": 70233,
"subver": "/Dash Core:21.1.0(dcg-masternode-7)/",
"inbound": false,
"bip152_hb_to": false,
"bip152_hb_from": false,
"masternode": false,
"startingheight": 1022323,
"synced_headers": 1022323,
"synced_blocks": 1022323,
"startingheight": 1131692,
"synced_headers": 1131804,
"synced_blocks": 1131804,
"inflight": [
],
"relaytxes": false,
"addr_relay_enabled": false,
"addr_processed": 0,
"relaytxes": true,
"addr_relay_enabled": true,
"addr_processed": 519,
"addr_rate_limited": 0,
"permissions": [
],
Expand Down Expand Up @@ -651,7 +659,9 @@ Result (edited to show only a single entry, with IP addresses changed to
"verack": 24,
"version": 180
},
"connection_type": "block-relay-only"
"connection_type": "outbound-full-relay",
"transport_protocol_type": "v1",
"session_id": ""
}
]
```
Expand Down
42 changes: 42 additions & 0 deletions docs/api/remote-procedure-calls-removed.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,45 @@ dash-cli -testnet gobject vote-conf \
}
}
```

## Protx

### ProTx Register HPMN

:::{attention}
Removed in Dash Core 22.0.0
:::

The `protx *_hpmn` RPC commands were renamed and deprecated in Dash Core 20.0.0. They can now be accessed as `protx *_evo` (e.g., `protx register_hpmn` is now [`protx register_evo`](../api/remote-procedure-calls-evo.md#protx-register-evo)).

**All `protx *_hpmn` RPC commands were removed in Dash Core 22.0.0.**

### ProTx Register Fund HPMN

:::{attention}
Removed in Dash Core 22.0.0
:::

The `protx *_hpmn` RPC commands were renamed and deprecated in Dash Core 20.0.0. They can now be accessed as `protx *_evo` (e.g., `protx register_hpmn` is now [`protx register_evo`](../api/remote-procedure-calls-evo.md#protx-register-evo)).

**All `protx *_hpmn` RPC commands were removed in Dash Core 22.0.0.**

### ProTx Register Prepare HPMN

:::{attention}
Removed in Dash Core 22.0.0
:::

The `protx *_hpmn` RPC commands were renamed and deprecated in Dash Core 20.0.0. They can now be accessed as `protx *_evo` (e.g., `protx register_hpmn` is now [`protx register_evo`](../api/remote-procedure-calls-evo.md#protx-register-evo)).

**All `protx *_hpmn` RPC commands were removed in Dash Core 22.0.0.**

### ProTx Update Service HPMN

:::{attention}
Removed in Dash Core 22.0.0
:::

The `protx *_hpmn` RPC commands were renamed and deprecated in Dash Core 20.0.0. They can now be accessed as `protx *_evo` (e.g., `protx register_hpmn` is now [`protx register_evo`](../api/remote-procedure-calls-evo.md#protx-register-evo)).

**All `protx *_hpmn` RPC commands were removed in Dash Core 22.0.0.**
32 changes: 25 additions & 7 deletions docs/api/remote-procedure-calls-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -2781,7 +2781,13 @@ _Parameter #3---estimate_mode_
| -------------- | ------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| estimate_mode | string | Optional<br>(0 or 1) | The fee estimate mode. Must be one of: `unset`, `economical`, `conservative`, `DASH/kB`, `duff/B`. Default is `unset`. |

_Parameter #4---Options_
_Parameter #4---Fee rate_

| Name | Type | Presence | Description |
| -------- | ------- | ----------------------- | ----------- |
| fee_rate | number or string | Optional<br>(0 or 1) | **Added in Dash Core 22.0.0**<br>Specify a fee rate in duffs/B (default=not set, fall back to wallet fee estimation). |

_Parameter #5---Options_

| Name | Type | Presence | Description |
| --------------------------- | ------------------ | ----------------------- | --------------------------------------------------- |
Expand Down Expand Up @@ -2901,10 +2907,16 @@ _Parameter #10---fee estimate mode_
| ---- | ---- | -------- | ----------- |
| `estimate_mode` | string | Optional<br>(0 or 1) | The fee estimate mode, must be one of:<br>`unset`<br>`economical`<br>`conservative`<br>`DASH/kB`<br>`duff/B` |

_Parameter #11---verbose_
_Parameter #11---fee rate_

| Name | Type | Presence | Description |
| -------- | ------- | ----------------------- | ----------- |
| `fee_rate` | number or string | Optional<br>(0 or 1) | **Added in Dash Core 22.0.0**<br>Specify a fee rate in duffs/B (default=not set, fall back to wallet fee estimation). |

| Name | Type | Presence | Description |
| ------- | ------- | ----------------------- | ---------------------------------------------------------- |
_Parameter #12---verbose_

| Name | Type | Presence | Description |
| ------- | ------- | ----------------------- | ----------- |
| verbose | boolean | Optional<br>(0 or 1) | If `true`, return extra information about the transaction. Default is `false` |

_Result---execution result_
Expand Down Expand Up @@ -3047,10 +3059,16 @@ _Parameter #10---avoids partial respends_
| ------------- | ------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `avoid_reuse` | boolean | Optional<br>(0 or 1) | Avoid spending from dirty addresses; addresses are considered dirty if they have previously been used in a transaction. |

_Parameter #11---verbose_
_Parameter #11---fee rate_

| Name | Type | Presence | Description |
| -------- | ------- | ----------------------- | ----------- |
| `fee_rate` | number or string | Optional<br>(0 or 1) | **Added in Dash Core 22.0.0**<br>Specify a fee rate in duffs/B (default=not set, fall back to wallet fee estimation). |

_Parameter #12---verbose_

| Name | Type | Presence | Description |
| ------- | ------- | ----------------------- | ---------------------------------------------------------- |
| Name | Type | Presence | Description |
| ------- | ------- | ----------------------- | ----------- |
| verbose | boolean | Optional<br>(0 or 1) | If `true`, return extra information about the transaction. Default is `false` |

_Result---execution result_
Expand Down