Merge pull request #806 from mDuo13/new_methods_manifest_validator_info

New methods: manifest, validator_info
This commit is contained in:
Rome Reginelli
2020-03-30 20:52:53 -07:00
committed by GitHub
5 changed files with 317 additions and 8 deletions

View File

@@ -95,6 +95,7 @@
"ledger_request", "ledger_request",
"log_level", "log_level",
"logrotate", "logrotate",
"manifest",
"noripple_check", "noripple_check",
"path_find", "path_find",
"peer_reservations_add", "peer_reservations_add",
@@ -119,6 +120,7 @@
"unsubscribe", "unsubscribe",
"validation_create", "validation_create",
"validation_seed", "validation_seed",
"validator_info",
"validator_list_sites", "validator_list_sites",
"validators", "validators",
"wallet_propose" "wallet_propose"

View File

@@ -2,14 +2,14 @@
Communicate directly with a `rippled` server using these admin API methods. Admin methods are meant only for trusted personnel in charge of keeping the server operational. Admin methods include commands for managing, monitoring, and debugging the server. Communicate directly with a `rippled` server using these admin API methods. Admin methods are meant only for trusted personnel in charge of keeping the server operational. Admin methods include commands for managing, monitoring, and debugging the server.
Admin commands are available only if you connect to `rippled` on a host and port that the `rippled.cfg` file identifies as admin. By default, the commandline client uses an admin connection. For more information on connecting to `rippled`, see [Getting Started with the rippled API](get-started-with-the-rippled-api.html). Admin commands are available only if you connect to `rippled` on a host and port that the `rippled.cfg` file identifies as admin. By default, the commandline client uses an admin connection. For more information on connecting to `rippled`, see [Getting Started with the `rippled` API](get-started-with-the-rippled-api.html).
## [Key Generation Methods](key-generation-methods.html) ## [Key Generation Methods](key-generation-methods.html)
Use these methods to generate and manage keys. Use these methods to generate and manage keys.
* **[`validation_create`](validation_create.html)** - Generate keys for a new rippled validator. * **[`validation_create`](validation_create.html)** - Generate formatted for `rippled` node key pair. (Validators should use [tokens](run-rippled-as-a-validator.html) instead of keys generated by this method.)
* **[`wallet_propose`](wallet_propose.html)** - Generate keys for a new account. * **[`wallet_propose`](wallet_propose.html)** - Generate keys for a new account.
@@ -27,13 +27,20 @@ Use these methods to manage log levels and other data, such as ledgers.
## [Server Control Methods](server-control-methods.html) ## [Server Control Methods](server-control-methods.html)
Use these methods to manage the rippled server. Use these methods to manage the `rippled` server.
* **[`connect`](connect.html)** - Force the rippled server to connect to a specific peer.
* **[`ledger_accept`](ledger_accept.html)** - Close and advance the ledger in stand-alone mode. * **[`ledger_accept`](ledger_accept.html)** - Close and advance the ledger in stand-alone mode.
* **[`stop`](stop.html)** - Shut down the rippled server. * **[`stop`](stop.html)** - Shut down the `rippled` server.
* **[`validation_seed`](validation_seed.html)** - Temporarily set key to be used for validating.
## [Peer Management Methods](peer-management-methods.html)
Use these methods to manage the server's connections in the peer-to-peer XRP Ledger network.
* **[`connect`](connect.html)** - Force the `rippled` server to connect to a specific peer.
* **[`peer_reservations_add`](peer_reservations_add.html)** - Add or update a reserved slot for a specific peer.
* **[`peer_reservations_del`](peer_reservations_del.html)** - Remove a reserved slot for a specific peer.
* **[`peer_reservations_list`](peer_reservations_list.html)** - List reserved slots for specific peers.
* **[`peers`](peers.html)** - Get information about the peer servers connected.
## [Status and Debugging Methods](status-and-debugging-methods.html) ## [Status and Debugging Methods](status-and-debugging-methods.html)
@@ -43,10 +50,11 @@ Use these methods to check the status of the network and server.
* **[`feature`](feature.html)** - Get information about protocol amendments. * **[`feature`](feature.html)** - Get information about protocol amendments.
* **[`fetch_info`](fetch_info.html)** - Get information about the server's sync with the network. * **[`fetch_info`](fetch_info.html)** - Get information about the server's sync with the network.
* **[`get_counts`](get_counts.html)** - Get statistics about the server's internals and memory usage. * **[`get_counts`](get_counts.html)** - Get statistics about the server's internals and memory usage.
* **[`peers`](peers.html)** - Get information about the peer servers connected. * **[`manifest`](manifest.html)** - Get the latest public key information about a known validator.
* **[`print`](print.html)** - Get information about internal subsystems. * **[`print`](print.html)** - Get information about internal subsystems.
* **[`validators`](validators.html)** - Get information about the current validators. * **[`validator_info`](validator_info.html)** - Get information about the server's validator settings, if configured as a validator.
* **[`validator_list_sites`](validator_list_sites.html)** - Get information about sites that publish validator lists. * **[`validator_list_sites`](validator_list_sites.html)** - Get information about sites that publish validator lists.
* **[`validators`](validators.html)** - Get information about the current validators.
## Deprecated Methods ## Deprecated Methods
@@ -57,6 +65,8 @@ The following admin commands are deprecated and may be removed without further n
* `unl_add`, `unl_delete`, `unl_list`, `unl_load`, `unl_network`, `unl_reset`, `unl_score` - Use the `validators.txt` config file for UNL management instead. * `unl_add`, `unl_delete`, `unl_list`, `unl_load`, `unl_network`, `unl_reset`, `unl_score` - Use the `validators.txt` config file for UNL management instead.
* `wallet_seed` - Use the [wallet_propose method][] instead. * `wallet_seed` - Use the [wallet_propose method][] instead.
The [validation_seed method][] has been removed since `rippled` v0.29.1.
<!--{# common link defs #}--> <!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %} {% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,150 @@
# manifest
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Manifest.cpp "Source")
The `{{currentpage.name}}` method reports the current "manifest" information for a given validator public key. The "manifest" is the public portion of that validator's configured token.
_The `{{currentpage.name}}` method is an [admin method](admin-rippled-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "{{currentpage.name}}",
"public_key": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}",
"params": [{
"public_key":"nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p"
}]
}
```
*Commandline*
```sh
#Syntax: {{currentpage.name}} public_key
rippled {{currentpage.name}} nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:-------------|:-------|:-----------------------------------|
| `public_key` | String | The [base58][]-encoded public key of the validator to look up. This can be the master public key or ephemeral public key. |
**Note:** The commandline format for this method does not work in rippled v1.5.0. See [issue #3317](https://github.com/ripple/rippled/issues/3317) for details.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"result": {
"details": {
"domain": "",
"ephemeral_key": "n9J67zk4B7GpbQV5jRQntbgdKf7TW6894QuG7qq1rE5gvjCu6snA",
"master_key": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"seq": 1
},
"manifest": "JAAAAAFxIe3AkJgOyqs3y+UuiAI27Ff3Mrfbt8e7mjdo06bnGEp5XnMhAhRmvCZmWZXlwShVE9qXs2AVCvhVuA/WGYkTX/vVGBGwdkYwRAIgGnYpIGufURojN2cTXakAM7Vwa0GR7o3osdVlZShroXQCIH9R/Lx1v9rdb4YY2n5nrxdnhSSof3U6V/wIHJmeao5ucBJA9D1iAMo7YFCpb245N3Czc0L1R2Xac0YwQ6XdGT+cZ7yw2n8JbdC3hH8Xu9OUqc867Ee6JmlXtyDHzBdY/hdJCQ==",
"requested": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p"
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"details": {
"domain": "",
"ephemeral_key": "n9J67zk4B7GpbQV5jRQntbgdKf7TW6894QuG7qq1rE5gvjCu6snA",
"master_key": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"seq": 1
},
"manifest": "JAAAAAFxIe3AkJgOyqs3y+UuiAI27Ff3Mrfbt8e7mjdo06bnGEp5XnMhAhRmvCZmWZXlwShVE9qXs2AVCvhVuA/WGYkTX/vVGBGwdkYwRAIgGnYpIGufURojN2cTXakAM7Vwa0GR7o3osdVlZShroXQCIH9R/Lx1v9rdb4YY2n5nrxdnhSSof3U6V/wIHJmeao5ucBJA9D1iAMo7YFCpb245N3Czc0L1R2Xac0YwQ6XdGT+cZ7yw2n8JbdC3hH8Xu9OUqc867Ee6JmlXtyDHzBdY/hdJCQ==",
"requested": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"status": "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"details": {
"domain": "",
"ephemeral_key": "n9J67zk4B7GpbQV5jRQntbgdKf7TW6894QuG7qq1rE5gvjCu6snA",
"master_key": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"seq": 1
},
"manifest": "JAAAAAFxIe3AkJgOyqs3y+UuiAI27Ff3Mrfbt8e7mjdo06bnGEp5XnMhAhRmvCZmWZXlwShVE9qXs2AVCvhVuA/WGYkTX/vVGBGwdkYwRAIgGnYpIGufURojN2cTXakAM7Vwa0GR7o3osdVlZShroXQCIH9R/Lx1v9rdb4YY2n5nrxdnhSSof3U6V/wIHJmeao5ucBJA9D1iAMo7YFCpb245N3Czc0L1R2Xac0YwQ6XdGT+cZ7yw2n8JbdC3hH8Xu9OUqc867Ee6JmlXtyDHzBdY/hdJCQ==",
"requested": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
<!-- Note, the CLI response above is mocked up to compensate for https://github.com/ripple/rippled/issues/3317 -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:------------|:-------|:------------------------------------------------------|
| `details` | Object | _(May be omitted)_ The data contained in this manifest. Omitted if the server does not have a manifest for the `public_key` from the request. See **Details Object** below for a full description of its contents. |
| `manifest` | String | _(May be omitted)_ The full manifest data in base64 format. This data is [serialized](serialization.html) to binary before being base64-encoded. Omitted if the server does not have a manifest for the `public_key` from the request. |
| `requested` | String | The `public_key` from the request. |
#### Details Object
If provided, the `details` object contains the following fields:
| `Field` | Type | Description |
|:----------------|:-------|:--------------------------------------------------|
| `domain` | String | The domain name this validator claims to be associated with. If the manifest does not contain a domain, this is an empty string. |
| `ephemeral_key` | String | The ephemeral public key for this validator, in [base58][]. |
| `master_key` | String | The master public key for this validator, in [base58][]. |
| `seq` | Number | The sequence number of this manifest. This number increases whenever the validator operator updates the validator's token to rotate ephemeral keys or change settings. |
### Possible Errors
- Any of the [universal error types][].
- `invalidParams` - The `public_key` field was missing or specified incorrectly.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,123 @@
# validator_info
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/ValidatorInfo.cpp "Source")
The `{{currentpage.name}}` method returns the current validator settings of the server, if it is configured as a validator.
_The `{{currentpage.name}}` method is an [admin method](admin-rippled-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "{{currentpage.name}}"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}"
}
```
*Commandline*
```sh
#Syntax: {{currentpage.name}}
rippled {{currentpage.name}}
```
<!-- MULTICODE_BLOCK_END -->
The request does not accept any parameters.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"result": {
"domain": "mduo13.com",
"ephemeral_key": "n9KnrcCmL5psyKtk2KWP6jy14Hj4EXuZDg7XMdQJ9cSDoFSp53hu",
"manifest": "JAAAAAFxIe002KClGBUlRA7h5J2Y5B7Xdlxn1Z5OxY7ZC2UmqUIikHMhAkVIeB7McBf4NFsBceQQlScTVUWMdpYzwmvs115SUGDKdkcwRQIhAJnKfYWnPsBsATIIRfgkAAK+HE4zp8G8AmOPrHmLZpZAAiANiNECVQTKktoD7BEoEmS8jaFBNMgRdcG0dttPurCAGXcKbWR1bzEzLmNvbXASQPjO6wxOfhtWsJ6oMWBg8Rs5STAGvQV2ArI5MG3KbpFrNSMxbx630Ars9d9j1ORsUS5v1biZRShZfg9180JuZAo=",
"master_key": "nHBk5DPexBjinXV8qHn7SEKzoxh2W92FxSbNTPgGtQYBzEF4msn9",
"seq": 1
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"domain": "mduo13.com",
"ephemeral_key": "n9KnrcCmL5psyKtk2KWP6jy14Hj4EXuZDg7XMdQJ9cSDoFSp53hu",
"manifest": "JAAAAAFxIe002KClGBUlRA7h5J2Y5B7Xdlxn1Z5OxY7ZC2UmqUIikHMhAkVIeB7McBf4NFsBceQQlScTVUWMdpYzwmvs115SUGDKdkcwRQIhAJnKfYWnPsBsATIIRfgkAAK+HE4zp8G8AmOPrHmLZpZAAiANiNECVQTKktoD7BEoEmS8jaFBNMgRdcG0dttPurCAGXcKbWR1bzEzLmNvbXASQPjO6wxOfhtWsJ6oMWBg8Rs5STAGvQV2ArI5MG3KbpFrNSMxbx630Ars9d9j1ORsUS5v1biZRShZfg9180JuZAo=",
"master_key": "nHBk5DPexBjinXV8qHn7SEKzoxh2W92FxSbNTPgGtQYBzEF4msn9",
"seq": 1,
"status": "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"domain" : "mduo13.com",
"ephemeral_key" : "n9KnrcCmL5psyKtk2KWP6jy14Hj4EXuZDg7XMdQJ9cSDoFSp53hu",
"manifest" : "JAAAAAFxIe002KClGBUlRA7h5J2Y5B7Xdlxn1Z5OxY7ZC2UmqUIikHMhAkVIeB7McBf4NFsBceQQlScTVUWMdpYzwmvs115SUGDKdkcwRQIhAJnKfYWnPsBsATIIRfgkAAK+HE4zp8G8AmOPrHmLZpZAAiANiNECVQTKktoD7BEoEmS8jaFBNMgRdcG0dttPurCAGXcKbWR1bzEzLmNvbXASQPjO6wxOfhtWsJ6oMWBg8Rs5STAGvQV2ArI5MG3KbpFrNSMxbx630Ars9d9j1ORsUS5v1biZRShZfg9180JuZAo=",
"master_key" : "nHBk5DPexBjinXV8qHn7SEKzoxh2W92FxSbNTPgGtQYBzEF4msn9",
"seq" : 1,
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `domain` | String | _(May be omitted)_ The domain name associated with this validator, if one has been configured.
| `ephemeral_key` | String | _(May be omitted)_ The public key of the ephemeral key pair this server uses to sign validation messages, in [base58][]. This key changes if the validator's configured token changes. |
| `manifest` | String | _(May be omitted)_ The public "manifest" corresponding to this validator's configured token, [serialized to binary](serialization.html) and then encoded in base64. This field does not contain any private information. |
| `master_key` | String | The public key of this validator's master key pair, in [base58][]. This key uniquely identifies the validator and remains the same if the validator rotates ephemeral keys. If the server is configured using a `[validation_seed]` instead of a `[validator_token]`, this is the only field in the response. |
| `seq` | Number | _(May be omitted)_ A sequence number for this validator's configured validation token and settings. This number increases whenever the validator operator updates the validator's token to rotate ephemeral keys or change settings. |
For more information on validator tokens and key rotation, see the [validator-keys-tool Guide](https://github.com/ripple/validator-keys-tool/blob/master/doc/validator-keys-tool-guide.md).
### Possible Errors
- Any of the [universal error types][].
- `invalidParams` - The server returns this error with `"error_message" : "not a validator"` if the server is not [configured as a validator](run-rippled-as-a-validator.html).
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -4502,6 +4502,18 @@ pages:
targets: targets:
- ja - ja
- md: references/rippled-api/admin-rippled-methods/status-and-debugging-methods/manifest.md
html: manifest.html
blurb: Look up the public information about a known validator.
funnel: Docs
doc_type: References
supercategory: rippled API
category: Admin rippled Methods
subcategory: Status and Debugging Methods
targets:
- en
- ja
- md: references/rippled-api/admin-rippled-methods/status-and-debugging-methods/print.md - md: references/rippled-api/admin-rippled-methods/status-and-debugging-methods/print.md
html: print.html html: print.html
blurb: Get information about internal subsystems. blurb: Get information about internal subsystems.
@@ -4524,6 +4536,18 @@ pages:
targets: targets:
- ja - ja
- md: references/rippled-api/admin-rippled-methods/status-and-debugging-methods/validator_info.md
html: validator_info.html
blurb: Get the server's validation settings, if configured as a validator.
funnel: Docs
doc_type: References
supercategory: rippled API
category: Admin rippled Methods
subcategory: Status and Debugging Methods
targets:
- en
- ja
- md: references/rippled-api/admin-rippled-methods/status-and-debugging-methods/validator_list_sites.md - md: references/rippled-api/admin-rippled-methods/status-and-debugging-methods/validator_list_sites.md
html: validator_list_sites.html html: validator_list_sites.html
blurb: Get information about sites that publish validator lists. blurb: Get information about sites that publish validator lists.