References general file structure (methods)

This commit is contained in:
mDuo13
2018-05-03 15:28:40 -07:00
parent c072b2622c
commit 48391ba3d5
99 changed files with 297 additions and 324 deletions

View File

@@ -0,0 +1,228 @@
## consensus_info
[[Source]<br>](https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/ConsensusInfo.cpp "Source")
The `consensus_info` command provides information about the consensus process for debugging purposes.
_The `consensus_info` method is an [admin command](#connecting-to-rippled) that cannot be run by unprivileged users._
#### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 99,
"command": "consensus_info"
}
```
*JSON-RPC*
```
{
"method": "consensus_info",
"params": [
{}
]
}
```
*Commandline*
```
#Syntax: consensus_info
rippled consensus_info
```
<!-- MULTICODE_BLOCK_END -->
The request has no parameters.
#### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```
{
"result" : {
"info" : {
"acquired" : {
"4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306" : "acquired"
},
"close_granularity" : 10,
"close_percent" : 50,
"close_resolution" : 10,
"close_times" : {
"486082972" : 1,
"486082973" : 4
},
"current_ms" : 1003,
"have_time_consensus" : false,
"ledger_seq" : 13701086,
"our_position" : {
"close_time" : 486082973,
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"peer_positions" : {
"0A2EAF919033A036D363D4E5610A66209DDBE8EE" : {
"close_time" : 486082972,
"peer_id" : "n9KiYM9CgngLvtRCQHZwgC2gjpdaZcCcbt3VboxiNFcKuwFVujzS",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"1567A8C953A86F8428C7B01641D79BBF2FD508F3" : {
"close_time" : 486082973,
"peer_id" : "n9LdgEtkmGB9E2h3K4Vp7iGUaKuq23Zr32ehxiU8FWY7xoxbWTSA",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"202397A81F20B44CF44EA99AF761295E5A8397D2" : {
"close_time" : 486082973,
"peer_id" : "n9MD5h24qrQqiyBC8aeqqCWvpiBiYQ3jxSr91uiDvmrkyHRdYLUj",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"5C29005CF4FB479FC49EEFB4A5B075C86DD963CC" : {
"close_time" : 486082973,
"peer_id" : "n9L81uNCaPgtUJfaHh89gmdvXKAmSt5Gdsw2g1iPWaPkAHW5Nm4C",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"EFC49EB648E557CC50A72D715249B80E071F7705" : {
"close_time" : 486082973,
"peer_id" : "n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
}
},
"previous_mseconds" : 2005,
"previous_proposers" : 5,
"proposers" : 5,
"proposing" : false,
"state" : "consensus",
"synched" : true,
"validating" : false
},
"status" : "success"
}
}
```
*Commandline*
```
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"info" : {
"acquired" : {
"4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306" : "acquired"
},
"close_granularity" : 10,
"close_percent" : 50,
"close_resolution" : 10,
"close_times" : {
"486082972" : 1,
"486082973" : 4
},
"current_ms" : 1003,
"have_time_consensus" : false,
"ledger_seq" : 13701086,
"our_position" : {
"close_time" : 486082973,
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"peer_positions" : {
"0A2EAF919033A036D363D4E5610A66209DDBE8EE" : {
"close_time" : 486082972,
"peer_id" : "n9KiYM9CgngLvtRCQHZwgC2gjpdaZcCcbt3VboxiNFcKuwFVujzS",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"1567A8C953A86F8428C7B01641D79BBF2FD508F3" : {
"close_time" : 486082973,
"peer_id" : "n9LdgEtkmGB9E2h3K4Vp7iGUaKuq23Zr32ehxiU8FWY7xoxbWTSA",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"202397A81F20B44CF44EA99AF761295E5A8397D2" : {
"close_time" : 486082973,
"peer_id" : "n9MD5h24qrQqiyBC8aeqqCWvpiBiYQ3jxSr91uiDvmrkyHRdYLUj",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"5C29005CF4FB479FC49EEFB4A5B075C86DD963CC" : {
"close_time" : 486082973,
"peer_id" : "n9L81uNCaPgtUJfaHh89gmdvXKAmSt5Gdsw2g1iPWaPkAHW5Nm4C",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"EFC49EB648E557CC50A72D715249B80E071F7705" : {
"close_time" : 486082973,
"peer_id" : "n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
}
},
"previous_mseconds" : 2005,
"previous_proposers" : 5,
"proposers" : 5,
"proposing" : false,
"state" : "consensus",
"synched" : true,
"validating" : false
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format](#response-formatting), with a successful result containing the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `info` | Object | Information that may be useful for debugging consensus. This output is subject to change without notice. |
The following is an incomplete summary of fields that may be contained in the `info` object:
| `Field` | Type | Description |
|:-----------------|:--------|:------------------------------------------------|
| `ledger_seq` | Number | The sequence number of the ledger currently in the consensus process |
| `our_position` | Object | This server's expectation for the ledger in the consensus process. |
| `peer_positions` | Object | Map of peers and their proposed versions of the ledger in the consensus process. |
| `proposers` | Number | The number of trusted validators participating in this consensus process. Which validators are trusted depends on this server's configuration. |
| `synched` | Boolean | Whether this server considers itself in sync with the network. |
| `state` | String | What part of the consensus process is currently in progress: `open`, `consensus`, `finished`, or `accepted`. |
It is also normal to get a minimal result where the only field in `info` is `"consensus": "none"`. This indicates that the server is in between consensus rounds.
The results of the `consensus_info` command can vary dramatically if you run it several times, even in short succession.
#### Possible Errors
* Any of the [universal error types](#universal-errors).

View File

@@ -0,0 +1,188 @@
## feature
[[Source]<br>](https://github.com/ripple/rippled/blob/develop/src/ripple/rpc/handlers/Feature1.cpp "Source")
The `feature` command returns information about [amendments](concept-amendments.html) this server knows about, including whether they are enabled and whether the server is voting in favor of those amendments in the [amendment process](concept-amendments.html#amendment-process). [New in: rippled 0.31.0][]
You can use the `feature` command to temporarily configure the server to vote against or in favor of an amendment. This change does not persist if you restart the server. To make lasting changes in amendment voting, use the `rippled.cfg` file. See [Configuring Amendment Voting](concept-amendments.html#configuring-amendment-voting) for more information.
_The `feature` method is an [admin command](#connecting-to-rippled) that cannot be run by unprivileged users._
#### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket - list all*
```
{
"id": "list_all_features",
"command": "feature"
}
```
*WebSocket - reject*
```
{
"id": "reject_multi_sign",
"command": "feature",
"feature": "4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373",
"vetoed": true
}
```
*JSON-RPC*
```
{
"method": "feature",
"params": [
{
"feature": "4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373",
"vetoed": false
}
]
}
```
*Commandline*
```
#Syntax: feature [<feature_id> [accept|reject]]
rippled feature 4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373 accept
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:----------|:--------|:-------------------------------------------------------|
| `feature` | String | _(Optional)_ The unique ID of an amendment, as hexadecimal; or the short name of the amendment. If provided, limits the response to one amendment. Otherwise, the response lists all amendments. |
| `vetoed` | Boolean | (Optional; ignored unless `feature` also specified) If true, instructs the server to vote against the amendment specified by `feature`. If false, instructs the server to vote in favor of the amendment. |
**Note:** You can configure your server to vote in favor of a new amendment, even if the server does not currently know how to apply that amendment, by specifying the amendment ID in the `feature` field. For example, you might want to do this if you plan to upgrade soon to a new `rippled` version that _does_ support the amendment.
#### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket - list all*
```
{
"id": "list_all_features",
"status": "success",
"type": "response",
"result": {
"features": {
"42426C4D4F1009EE67080A9B7965B44656D7714D104A72F9B4369F97ABF044EE": {
"enabled": false,
"name": "FeeEscalation",
"supported": true,
"vetoed": false
},
"4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": {
"enabled": false,
"name": "MultiSign",
"supported": true,
"vetoed": false
},
"6781F8368C4771B83E8B821D88F580202BCB4228075297B19E4FDC5233F1EFDC": {
"enabled": false,
"name": "TrustSetAuth",
"supported": true,
"vetoed": false
},
"C1B8D934087225F509BEB5A8EC24447854713EE447D277F69545ABFA0E0FD490": {
"enabled": false,
"name": "Tickets",
"supported": true,
"vetoed": false
},
"DA1BD556B42D85EA9C84066D028D355B52416734D3283F85E216EA5DA6DB7E13": {
"enabled": false,
"name": "SusPay",
"supported": true,
"vetoed": false
}
}
}
}
```
*WebSocket - reject*
```
{
"id": "reject_multi_sign",
"status": "success",
"type": "response",
"result": {
"features": {
"4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": {
"enabled": false,
"name": "MultiSign",
"supported": true,
"vetoed": true
}
}
}
}
```
*JSON-RPC*
```
200 OK
{
"result": {
"4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": {
"enabled": false,
"name": "MultiSign",
"supported": true,
"vetoed": false
},
"status": "success"
}
}
```
*Commandline*
```
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": {
"enabled": false,
"name": "MultiSign",
"supported": true,
"vetoed": false
},
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format](#response-formatting), with a successful result containing **a map of amendments** as a JSON object. The keys of the object are amendment IDs. The values for each key are _amendment objects_ that describe the status of the amendment with that ID. If the request specified a `feature`, the map contains only the requested amendment object, after applying any changes from the request. Each amendment object has the following fields:
| `Field` | Type | Description |
|:------------|:--------|:-----------------------------------------------------|
| `enabled` | Boolean | Whether this amendment is currently enabled in the latest ledger. |
| `name` | String | (May be omitted) The human-readable name for this amendment, if known. |
| `supported` | Boolean | Whether the server knows how to apply this amendment. If this field is set to `false` (the server does not know how to apply this amendment) and `enabled` is set to `true` (this amendment is enabled in the latest ledger), this amendment may cause your server to be [amendment blocked](concept-amendments.html#amendment-blocked). |
| `vetoed` | Boolean | Whether the server has been instructed to vote against this amendment. |
**Caution:** The `name` for an amendment does not strictly indicate what that amendment does. The name is not guaranteed to be unique or consistent across servers.
#### Possible Errors
* Any of the [universal error types](#universal-errors).
* `badFeature` - The `feature` specified was invalidly formatted, or the server does not know an amendment with that name.

View File

@@ -0,0 +1,156 @@
## fetch_info
[[Source]<br>](https://github.com/ripple/rippled/blob/315a8b6b602798a4cff4d8e1911936011e12abdb/src/ripple/rpc/handlers/FetchInfo.cpp "Source")
The `fetch_info` command returns information about objects that this server is currently fetching from the network, and how many peers have that information. It can also be used to reset current fetches.
_The `fetch_info` method is an [admin command](#connecting-to-rippled) that cannot be run by unprivileged users._
#### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 91,
"command": "fetch_info",
"clear": false
}
```
*JSON-RPC*
```
{
"method": "fetch_info",
"params": [
{
"clear": false
}
]
}
```
*Commandline*
```
#Syntax: fetch_info [clear]
rippled fetch_info
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:--------|:--------|:---------------------------------------------------------|
| `clear` | Boolean | If `true`, reset current fetches. Otherwise, only get status of fetches in progress. |
#### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```
{
"result" : {
"info" : {
"348928" : {
"hash" : "C26D432B06F84861BCACD7942EDC3FE0B2E1DEB966A9E516A0FD275A375C2010",
"have_header" : true,
"have_state" : false,
"have_transactions" : true,
"needed_state_hashes" : [
"BF8DC6B1E10D1D3565BF0649075D22EBFD34F751AFCC0E53E81D74786BC88922",
"34E37A71CB51A12C73A435250E6A6349F7884C7EEBA6B88FA31F0244E967E88F",
"BFB7D3008A7D61FD6A0538D1C2E70CFB94CE8DC66606319C372F278A48629765",
"41C0C61D701FB1EA586F0EF1FC7A91FEC476D979589DA60507F05C13F7C21975",
"6DDE8840A2C3C7FF05E5FFEE4D06408694C16A8357338FE0C4581DC3D8A00BBA",
"6C69D833B582C849917806FA009518832BB50E900E43716FD7CC1966428DD0CF",
"1EDC020CFC4AF19B625C52E20B66D6AE672821CCC461E8A9C457A3B2955657F7",
"FC0616A66A2B0589CA513F3341D4EA51E782C4601E5072308478E3CC19264640",
"19FC607B5DE1B64681A676EC1ED5507B9555B0E098CD9D898320297DE1A64033",
"5E128D3FC990074E35687387A14AA12D9FD287E5AB57CB9B2FD83DE635DF5CA9",
"DE72820F3981770F2AA8770BC233B80661F1A452819D8529008875FF8DED87A9",
"3ACB84BEE2C45556351FF60FD787D235C9CF5623FB8A35B01446B773598E7CC0",
"0DD3A8DF69874148057F1F2BF305442FF2E89A76A08B4CC8C051E2ED69B874F3",
"4AE9A9C4F12A5BD0355037DA40A0B145420A2168A9FEDE43E643BD13062F8ECE",
"08CBF8CFFEC207F5AC4E4F24BC447011FD8C79D25B344281FBFB4732D7058ED4",
"779B2577C5C4BAED6657421448EA506BBF50F86BE363E0924127C4EA17A58BBE"
],
"peers" : 2,
"timeouts" : 0
}
},
"status" : "success"
}
}
```
*Commandline*
```
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"info" : {
"348928" : {
"hash" : "C26D432B06F84861BCACD7942EDC3FE0B2E1DEB966A9E516A0FD275A375C2010",
"have_header" : true,
"have_state" : false,
"have_transactions" : true,
"needed_state_hashes" : [
"BF8DC6B1E10D1D3565BF0649075D22EBFD34F751AFCC0E53E81D74786BC88922",
"34E37A71CB51A12C73A435250E6A6349F7884C7EEBA6B88FA31F0244E967E88F",
"BFB7D3008A7D61FD6A0538D1C2E70CFB94CE8DC66606319C372F278A48629765",
"41C0C61D701FB1EA586F0EF1FC7A91FEC476D979589DA60507F05C13F7C21975",
"6DDE8840A2C3C7FF05E5FFEE4D06408694C16A8357338FE0C4581DC3D8A00BBA",
"6C69D833B582C849917806FA009518832BB50E900E43716FD7CC1966428DD0CF",
"1EDC020CFC4AF19B625C52E20B66D6AE672821CCC461E8A9C457A3B2955657F7",
"FC0616A66A2B0589CA513F3341D4EA51E782C4601E5072308478E3CC19264640",
"19FC607B5DE1B64681A676EC1ED5507B9555B0E098CD9D898320297DE1A64033",
"5E128D3FC990074E35687387A14AA12D9FD287E5AB57CB9B2FD83DE635DF5CA9",
"DE72820F3981770F2AA8770BC233B80661F1A452819D8529008875FF8DED87A9",
"3ACB84BEE2C45556351FF60FD787D235C9CF5623FB8A35B01446B773598E7CC0",
"0DD3A8DF69874148057F1F2BF305442FF2E89A76A08B4CC8C051E2ED69B874F3",
"4AE9A9C4F12A5BD0355037DA40A0B145420A2168A9FEDE43E643BD13062F8ECE",
"08CBF8CFFEC207F5AC4E4F24BC447011FD8C79D25B344281FBFB4732D7058ED4",
"779B2577C5C4BAED6657421448EA506BBF50F86BE363E0924127C4EA17A58BBE"
],
"peers" : 2,
"timeouts" : 0
}
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format](#response-formatting), with a successful result containing the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `info` | Object | Map of objects being fetched and the status of that object being fetched. A ledger being fetched may be identified by its sequence number; ledgers and other objects being fetched may also be identified by their hashes. |
The fields describing a fetch in progress are subject to change without notice. The following fields may be included:
| `Field` | Type | Description |
|:----------------------|:------------------------|:---------------------------|
| `hash` | String | The hash of the item being fetched. |
| `have_header` | Boolean | For a ledger, whether this server has already obtained the ledger's header section. |
| `have_transactions` | Boolean | For a ledger, whether this server has already obtained the transaction section of that ledger. |
| `needed_state_hashes` | Array of (Hash) Strings | The hash values of state objects still needed from this item. If more than 16 are needed, the response contains only the first 16. |
| `peers` | Number | The number of peers who have this item available. |
| `timeouts` | Number | The number of times that fetching this item has resulted in a timeout (2.5 seconds). |
#### Possible Errors
* Any of the [universal error types](#universal-errors).

View File

@@ -0,0 +1,148 @@
## get_counts
[[Source]<br>](https://github.com/ripple/rippled/blob/c7118a183a660648aa88a3546a6b2c5bce858440/src/ripple/rpc/handlers/GetCounts.cpp "Source")
The `get_counts` command provides various stats about the health of the server, mostly the number of objects of different types that it currently holds in memory.
_The `get_counts` method is an [admin command](#connecting-to-rippled) that cannot be run by unprivileged users._
#### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 90,
"command": "get_counts",
"min_count": 100
}
```
*JSON-RPC*
```
{
"method": "get_counts",
"params": [
{
"min_count": 100
}
]
}
```
*Commandline*
```
#Syntax: get_counts [min_count]
rippled get_counts 100
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:------------|:--------------------------|:-----------------------------------|
| `min_count` | Number (Unsigned Integer) | Only return fields with a value at least this high. |
#### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```
{
"result" : {
"AL_hit_rate" : 48.36725616455078,
"HashRouterEntry" : 3048,
"Ledger" : 46,
"NodeObject" : 10417,
"SLE_hit_rate" : 64.62035369873047,
"STArray" : 1299,
"STLedgerEntry" : 646,
"STObject" : 6987,
"STTx" : 4104,
"STValidation" : 610,
"Transaction" : 4069,
"dbKBLedger" : 10733,
"dbKBTotal" : 39069,
"dbKBTransaction" : 26982,
"fullbelow_size" : 0,
"historical_perminute" : 0,
"ledger_hit_rate" : 71.0565185546875,
"node_hit_rate" : 3.808214902877808,
"node_read_bytes" : 393611911,
"node_reads_hit" : 1283098,
"node_reads_total" : 679410,
"node_writes" : 1744285,
"node_written_bytes" : 794368909,
"status" : "success",
"treenode_cache_size" : 6650,
"treenode_track_size" : 598631,
"uptime" : "3 hours, 50 minutes, 27 seconds",
"write_load" : 0
}
}
```
*Commandline*
```
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"AL_hit_rate" : 48.36725616455078,
"HashRouterEntry" : 3048,
"Ledger" : 46,
"NodeObject" : 10417,
"SLE_hit_rate" : 64.62035369873047,
"STArray" : 1299,
"STLedgerEntry" : 646,
"STObject" : 6987,
"STTx" : 4104,
"STValidation" : 610,
"Transaction" : 4069,
"dbKBLedger" : 10733,
"dbKBTotal" : 39069,
"dbKBTransaction" : 26982,
"fullbelow_size" : 0,
"historical_perminute" : 0,
"ledger_hit_rate" : 71.0565185546875,
"node_hit_rate" : 3.808214902877808,
"node_read_bytes" : 393611911,
"node_reads_hit" : 1283098,
"node_reads_total" : 679410,
"node_writes" : 1744285,
"node_written_bytes" : 794368909,
"status" : "success",
"treenode_cache_size" : 6650,
"treenode_track_size" : 598631,
"uptime" : "3 hours, 50 minutes, 27 seconds",
"write_load" : 0
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format](#response-formatting). The list of fields contained in the result is subject to change without notice, but it may contain any of the following (among others):
| `Field` | Type | Description |
|:--------------|:-------|:----------------------------------------------------|
| `Transaction` | Number | The number of `Transaction` objects in memory |
| `Ledger` | Number | The number of ledgers in memory |
| `uptime` | String | The amount of time this server has been running uninterrupted. |
For most other entries, the value indicates the number of objects of that type currently in memory.
#### Possible Errors
* Any of the [universal error types](#universal-errors).
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.

View File

@@ -0,0 +1,409 @@
## peers
[[Source]<br>](https://github.com/ripple/rippled/blob/52f298f150fc1530d201d3140c80d3eaf781cb5f/src/ripple/rpc/handlers/Peers.cpp "Source")
The `peers` command returns a list of all other `rippled` servers currently connected to this one, including information on their connection and sync status.
*The `peers` request is an [admin command](#connecting-to-rippled) that cannot be run by unprivileged users!*
#### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 2,
"command": "peers"
}
```
*Commandline*
```
rippled peers
```
<!-- MULTICODE_BLOCK_END -->
The request includes no additional parameters.
#### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 2,
"status": "success",
"type": "response",
"result": {
"cluster": {},
"peers": [
{
"address": "184.172.237.226:51235",
"complete_ledgers": "14534883 - 18828973",
"latency": 117,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 54,
"public_key": "n9KNYm52mgcUQ7R2RA4kyw9Nk1yc6S35PaiuyqjYsy6UjhCXpw12",
"uptime": 55036,
"version": "rippled-0.30.0-hf1"
},
{
"address": "54.186.248.91:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 91,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 62,
"public_key": "n9MT5EjnV912KGuBUqPs4tpdhzMPGcnDBrTuWkD9sWQHJ1kDcUcz",
"uptime": 83814,
"version": "rippled-0.30.1"
},
{
"address": "54.84.21.230:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 202,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 60,
"public_key": "n9KJb7NMxGySRcjCqh69xEPMUhwJx22qntYYXsnUqYgjsJhNoW7g",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "72.251.233.162:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 36,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 66,
"public_key": "n9M8RSk6hrvXZKFQ6CxPbJsjt73xW1xsnjn7G69VAMbE2j4sBQNQ",
"uptime": 99619,
"version": "rippled-0.30.1"
},
{
"address": "162.217.98.136:51235",
"complete_ledgers": "32570 - 18828973",
"latency": 118,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 69,
"public_key": "n944PcXEoZaiEHnwFD92xA4bxsS7jjYb27WcdDQwkHYyk1MWTEsX",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "72.251.233.163:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 51,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 61,
"public_key": "n94ne2Z5dX8qcJNa8cPtAbtn21gEaCoEduS8TwdGAhi1iLfCUMDm",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "54.186.73.52:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 72,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 60,
"public_key": "n9JySgyBVcQKvyDoeRKg7s2Mm6ZcFHk22vUZb3o1HSosWxcj9xPt",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "72.251.233.165:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 40,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 63,
"public_key": "n9M77Uc9CSaSFZqt5V7sxPR4kFwbha7hwUFBD5v5kZt2SQjBeoDs",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "72.251.232.173:51235",
"complete_ledgers": "32570 - 18828973",
"latency": 40,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 71,
"public_key": "n9JveA1hHDGjZECaYC7KM4JP8NXXzNXAxixbzcLTGnrsFZsA9AD1",
"uptime": 99625,
"version": "rippled-0.31.0-b6"
},
{
"address": "98.167.120.212:51235",
"complete_ledgers": "18828845 - 18828973",
"latency": 99,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 60,
"public_key": "n9LDBRoqPYY7RdkNXbX1dqZXVtUKcSqzs2CZPhTH7ymA9X7Xzmpj",
"uptime": 99625,
"version": "rippled-0.30.1-rc4"
}
]
}
}
```
*JSON-RPC*
```
{
"result" : {
"cluster" : {},
"peers" : [
{
"address" : "184.172.237.226:51235",
"complete_ledgers" : "14535005 - 18828957",
"latency" : 114,
"ledger" : "80FCB89BC5B90D2B9C2CE33786738809796F04FB9CB1E5EEE768DD9A9C399FB0",
"load" : 47,
"public_key" : "n9KNYm52mgcUQ7R2RA4kyw9Nk1yc6S35PaiuyqjYsy6UjhCXpw12",
"uptime" : 54976,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "54.186.248.91:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 68,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 56,
"public_key" : "n9MT5EjnV912KGuBUqPs4tpdhzMPGcnDBrTuWkD9sWQHJ1kDcUcz",
"uptime" : 83754,
"version" : "rippled-0.30.1"
},
{
"address" : "54.84.21.230:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 135,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 54,
"public_key" : "n9KJb7NMxGySRcjCqh69xEPMUhwJx22qntYYXsnUqYgjsJhNoW7g",
"uptime" : 99565,
"version" : "rippled-0.30.1"
},
{
"address" : "72.251.233.162:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 24,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 61,
"public_key" : "n9M8RSk6hrvXZKFQ6CxPbJsjt73xW1xsnjn7G69VAMbE2j4sBQNQ",
"uptime" : 99560,
"version" : "rippled-0.30.1"
},
{
"address" : "162.217.98.136:51235",
"complete_ledgers" : "32570 - 18828958",
"latency" : 88,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 55,
"public_key" : "n944PcXEoZaiEHnwFD92xA4bxsS7jjYb27WcdDQwkHYyk1MWTEsX",
"uptime" : 99566,
"version" : "rippled-0.30.1"
},
{
"address" : "72.251.233.163:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 24,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 56,
"public_key" : "n94ne2Z5dX8qcJNa8cPtAbtn21gEaCoEduS8TwdGAhi1iLfCUMDm",
"uptime" : 99566,
"version" : "rippled-0.30.1"
},
{
"address" : "54.186.73.52:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 51,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 56,
"public_key" : "n9JySgyBVcQKvyDoeRKg7s2Mm6ZcFHk22vUZb3o1HSosWxcj9xPt",
"uptime" : 99566,
"version" : "rippled-0.30.1"
},
{
"address" : "72.251.233.165:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 25,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 56,
"public_key" : "n9M77Uc9CSaSFZqt5V7sxPR4kFwbha7hwUFBD5v5kZt2SQjBeoDs",
"uptime" : 99566,
"version" : "rippled-0.30.1"
},
{
"address" : "72.251.232.173:51235",
"complete_ledgers" : "32570 - 18828958",
"latency" : 24,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 81,
"public_key" : "n9JveA1hHDGjZECaYC7KM4JP8NXXzNXAxixbzcLTGnrsFZsA9AD1",
"uptime" : 99566,
"version" : "rippled-0.31.0-b6"
},
{
"address" : "98.167.120.212:51235",
"complete_ledgers" : "18828830 - 18828957",
"latency" : 137,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 54,
"public_key" : "n9LDBRoqPYY7RdkNXbX1dqZXVtUKcSqzs2CZPhTH7ymA9X7Xzmpj",
"uptime" : 99566,
"version" : "rippled-0.30.1-rc4"
}
],
"status" : "success"
}
}
```
*Commandline*
```
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"cluster" : {},
"peers" : [
{
"address" : "72.251.232.173:51235",
"complete_ledgers" : "32570 - 18851276",
"latency" : 22,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 20,
"public_key" : "n9JveA1hHDGjZECaYC7KM4JP8NXXzNXAxixbzcLTGnrsFZsA9AD1",
"uptime" : 26,
"version" : "rippled-0.31.0-b6"
},
{
"address" : "169.53.155.36:51235",
"complete_ledgers" : "12920801 - 18851275",
"latency" : 127,
"load" : 16,
"public_key" : "n9L42gouyppsmsMXXUdByXnVDUZv1eu6KLZUWUkNHsukzv3pr7po",
"uptime" : 18,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "169.53.155.44:51235",
"complete_ledgers" : "12920779 - 18851276",
"latency" : 20,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 49,
"public_key" : "n94BpoEqEf1PxpAv3Bmyy2WoKHyeMpHPH4tcj6P9NW98zdzEyRhi",
"uptime" : 50,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "192.170.145.77:51235",
"complete_ledgers" : "32570 - 18851277",
"latency" : 145,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 29,
"public_key" : "n9LwcmtjDAJQz4u8DZCMGQ9GXHuMEV4Cf8KpPL9NgqAV2puxdYc2",
"uptime" : 51,
"version" : "rippled-0.30.1"
},
{
"address" : "162.217.98.136:51235",
"complete_ledgers" : "32570 - 18851277",
"latency" : 83,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 30,
"public_key" : "n944PcXEoZaiEHnwFD92xA4bxsS7jjYb27WcdDQwkHYyk1MWTEsX",
"uptime" : 50,
"version" : "rippled-0.30.1"
},
{
"address" : "184.172.237.241:51235",
"complete_ledgers" : "14153089 - 18851277",
"latency" : 104,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 29,
"public_key" : "n9L3LdCTVYUhCKtQtxiHrQ5ocNXVqZFiEJpF5pX9DXahYLrvi5R7",
"uptime" : 51,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "99.110.49.91:51301",
"complete_ledgers" : "32570 - 18851277",
"latency" : 152,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 55,
"public_key" : "n9LGv3xKVqhxq6vcTfmJZhxyhjywsZbvJvpFbZRXzzz5uQ64xTLy",
"uptime" : 51,
"version" : "rippled-0.31.0-b6"
},
{
"address" : "169.53.155.45:51235",
"complete_ledgers" : "12920779 - 18851277",
"latency" : 15,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 30,
"public_key" : "n9MRiHyMk43YpqATWeT8Zyu4HJq1btb5oNKmnHTkLJKQg9LQQq3v",
"uptime" : 51,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "54.186.248.91:51235",
"complete_ledgers" : "18850253 - 18851277",
"latency" : 63,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 36,
"public_key" : "n9MT5EjnV912KGuBUqPs4tpdhzMPGcnDBrTuWkD9sWQHJ1kDcUcz",
"uptime" : 51,
"version" : "rippled-0.30.1"
}
],
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format](#response-formatting), with a successful result containing a JSON object with the following fields:
| `Field` | Type | Description |
|:----------|:-------|:--------------------------------------------------------|
| `cluster` | Object | Summary of other `rippled` servers in the same cluster, if [configured as a cluster](tutorial-rippled-setup.html#clustering). [New in: rippled 0.30.1][] |
| `peers` | Array | Array of peer objects. |
Each field of the `cluster` object is the public key of that `rippled` server's identifying keypair. (This is the same value that that server returns as `pubkey_node` in the [`server_info` command](#server-info).) The contents of that field are an object with the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `tag` | String | The display name for this cluster member as defined in the config file. |
| `fee` | Number | (May be omitted) The load multiplier this cluster member is applying to the [transaction cost](concept-transaction-cost.html) |
| `age` | Number | The number of seconds since the last cluster report from this cluster member. |
Each member of the `peers` array is a peer object with the following fields:
| `Field` | Type | Description |
|:-------------------|:--------|:----------------------------------------------|
| `address` | String | The IP address and port where this peer is connected |
| `cluster` | Boolean | (May be omitted) If `true`, the current server and the peer server are part of the same `rippled` cluster. |
| `name` | String | (May be omitted) If the peer is part of the same cluster, this is the display name for that server as defined in the config file. |
| `complete_ledgers` | String | Range expression indicating the sequence numbers of the ledger versions the peer `rippled` has available |
| `inbound` | Boolean | (May be omitted) If `true`, the peer is connecting to the local server. |
| `latency` | Number | The network latency to the peer (in milliseconds) |
| `ledger` | String | The hash of the peer's most recently closed ledger |
| `load` | Number | A measure of the amount of load the peer server is putting on the local server. Larger numbers indicate more load. (The units by which load is measured are not formally defined.) |
| `protocol` | String | (May be omitted) The protocol version that the peer is using, if not the same as the local server. |
| `public_key` | String | (May be omitted) A public key that can be used to verify the integrity of the peer's messages. This is not the same key that is used for validations, but it follows the same format. |
| `sanity` | String | (May be omitted) Whether this peer is following the same rules and ledger sequence as the current server. A value of `insane` probably indicates that the peer is part of a parallel network. The value `unknown` indicates that the current server is unsure whether the peer is compatible. <!-- STYLE_OVERRIDE: insane --> |
| `status` | String | (May be omitted) The most recent status message from the peer. Could be `connecting`, `connected`, `monitoring`, `validating`, or `shutting`. |
| `uptime` | Number | The number of seconds that your `rippled` server has been continuously connected to this peer. [New in: rippled 0.30.1][] |
| `version` | string | (May be omitted) The `rippled` version number of the peer server |
#### Possible Errors
* Any of the [universal error types](#universal-errors).

View File

@@ -0,0 +1,231 @@
## print
[[Source]<br>](https://github.com/ripple/rippled/blob/315a8b6b602798a4cff4d8e1911936011e12abdb/src/ripple/rpc/handlers/Print.cpp "Source")
The `print` command returns the current status of various internal subsystems, including peers, the ledger cleaner, and the resource manager.
*The `print` request is an [admin command](#connecting-to-rippled) that cannot be run by unprivileged users!*
#### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": "print_req_1",
"command": "print"
}
```
*Commandline*
```
rippled print
```
<!-- MULTICODE_BLOCK_END -->
The request includes no parameters.
#### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*Commandline*
```
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"app" : {
"ledgercleaner" : {
"status" : "idle"
},
"peers" : {
"peerfinder" : {
"bootcache" : {
"entries" : 109
},
"config" : {
"auto_connect" : "true",
"features" : "",
"max_peers" : 21,
"out_peers" : 10,
"port" : 51235,
"want_incoming" : "true"
},
"counts" : {
"accept" : 0,
"close" : 0,
"cluster" : "0",
"connect" : 0,
"fixed" : "0",
"in" : "0/11",
"out" : "10/10",
"total" : "10"
},
"fixed" : 0,
"livecache" : {
"entries" : [
{
"address" : "23.239.3.247:51235",
"expires" : "30000000000 nanoseconds",
"hops" : 2
},
{
"address" : "192.170.145.88:51235",
"expires" : "30000000000 nanoseconds",
"hops" : 1
},
{
"address" : "198.204.238.130:51235",
"expires" : "26000024558 nanoseconds",
"hops" : 1
},
{
"address" : "203.127.12.115:51235",
"expires" : "26000024558 nanoseconds",
"hops" : 2
},
{
"address" : "212.83.147.67:51235",
"expires" : "26000024558 nanoseconds",
"hops" : 2
}
],
"hist" : "0, 10, 74, 10, 0, 0, 0, 0",
"size" : "94"
},
"peers" : [
{
"local_address" : "10.1.10.78:48923",
"remote_address" : "52.24.43.83:51235",
"state" : "active"
},
{
"local_address" : "10.1.10.78:50004",
"remote_address" : "52.26.205.197:51235",
"state" : "active"
},
{
"local_address" : "10.1.10.78:37019",
"remote_address" : "168.1.60.132:51235",
"state" : "active"
},
{
"local_address" : "10.1.10.78:38775",
"remote_address" : "192.170.145.88:51235",
"state" : "active"
},
{
"local_address" : "10.1.10.78:34793",
"remote_address" : "198.204.238.130:51235",
"state" : "active"
}
]
}
},
"resource" : {
"admin" : [
{
"balance" : 0,
"count" : 1,
"name" : "\"127.0.0.1\""
}
],
"inactive" : [],
"inbound" : [],
"outbound" : [
{
"balance" : 23,
"count" : 1,
"name" : "93.190.138.234:51235"
},
{
"balance" : 35,
"count" : 1,
"name" : "198.204.238.130:51235"
},
{
"balance" : 31,
"count" : 1,
"name" : "52.26.205.197:51235"
},
{
"balance" : 32,
"count" : 1,
"name" : "54.186.73.52:51235"
},
{
"balance" : 15,
"count" : 1,
"name" : "72.251.233.164:51235"
}
]
},
"server" : {
"active" : "2",
"hist" : "16",
"history" : [
{
"bytes_in" : "214",
"bytes_out" : "11688",
"elapsed" : "0 seconds",
"id" : "16",
"requests" : 1,
"when" : "2015-Jun-16 16:33:50"
},
{
"bytes_in" : "214",
"bytes_out" : "11431",
"elapsed" : "0 seconds",
"id" : "15",
"requests" : 1,
"when" : "2015-Jun-16 16:11:59"
},
{
"bytes_in" : "227",
"bytes_out" : "337",
"elapsed" : "0 seconds",
"id" : "3",
"requests" : 1,
"when" : "2015-Jun-16 14:57:23"
},
{
"bytes_in" : "214",
"bytes_out" : "2917",
"elapsed" : "0 seconds",
"id" : "2",
"requests" : 1,
"when" : "2015-Jun-16 12:39:29"
},
{
"bytes_in" : "220",
"bytes_out" : "1426",
"elapsed" : "0 seconds",
"id" : "1",
"requests" : 1,
"when" : "2015-Jun-16 12:39:13"
}
]
},
"validators" : {}
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format](#response-formatting). Additional fields in the result depend on the internal state of the `rippled` server. The results of this command are subject to change without notice.
#### Possible Errors
* Any of the [universal error types](#universal-errors).

View File

@@ -0,0 +1,129 @@
## validator_list_sites
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/ValidatorListSites.cpp "Source")
The `validator_list_sites` command returns status information of sites serving validator lists. [New in: rippled 0.80.1][]
*The `validator_list_sites` request is an [admin command](#connecting-to-rippled) that cannot be run by unprivileged users!*
#### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 1,
"command": "validator_list_sites"
}
```
*JSON-RPC*
```
{
"method": "validator_list_sites",
"params": [
{}
]
}
```
*Commandline*
```
#Syntax: validator_list_sites
rippled validator_list_sites
```
<!-- MULTICODE_BLOCK_END -->
The request includes no parameters.
#### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id":5,
"status":"success",
"type":"response",
"result": {
"validator_sites": [
{
"last_refresh_status": "accepted",
"last_refresh_time": "2017-Oct-13 21:26:37",
"refresh_interval_min": 5,
"uri": "http://127.0.0.1:51447/validators"
}
]
}
}
}
```
*JSON-RPC*
```
200 OK
{
"result": {
"status": "success",
"validator_sites": [
{
"last_refresh_status": "accepted",
"last_refresh_time": "2017-Oct-13 21:26:37",
"refresh_interval_min": 5,
"uri": "http://127.0.0.1:51447/validators"
}
]
}
}
```
*Commandline*
```
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"status": "success",
"validator_sites": [
{
"last_refresh_status": "accepted",
"last_refresh_time": "2017-Oct-13 21:26:37",
"refresh_interval_min": 5,
"uri": "http://127.0.0.1:51447/validators"
}
]
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format](#response-formatting), with a successful result containing the following field:
| `Field` | Type | Description |
|:------------------|:------|----------------------------------|
| `validator_sites` | Array | Array of validator site objects. |
Each member of the `validator_sites` field array is an object with the following fields:
| `Field` | Type | Description |
|:-----------------------|:-----------------|:--------------------------------|
| `last_refresh_status` | String | If present, the[`ListDisposition`](https://github.com/ripple/rippled/blob/master/src/ripple/app/misc/ValidatorList.h) of the most recent refresh of the site. If missing, the site has not yet been succesfully queried. |
| `last_refresh_time` | String | Human readable time when the site was last queried. If missing, the site has not yet been succesfully queried. |
| `refresh_interval_min` | Unsigned Integer | The number of minutes between refresh attempts. |
| `uri` | String | The URI of the site. |
#### Possible Errors
* Any of the [universal error types](#universal-errors).

View File

@@ -0,0 +1,177 @@
## validators
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Validators.cpp "Source")
The `validators` command returns human readable information about the current list of published and trusted validators used by the server. [New in: rippled 0.80.1][]
*The `validators` request is an [admin command](#connecting-to-rippled) that cannot be run by unprivileged users!*
#### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 1,
"command": "validators"
}
```
*JSON-RPC*
```
{
"method": "validators",
"params": [
{}
]
}
```
*Commandline*
```
#Syntax: validators
rippled validators
```
<!-- MULTICODE_BLOCK_END -->
The request includes no parameters.
#### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id":5,
"status":"success",
"type":"response",
"result":{
"local_static_keys": [],
"publisher_lists":[
{
"available":true,
"expiration":"2017-Oct-13 14:56:00",
"list":[
"n9Ltz6ZxPRWTkqwBbpvgbaXPgm6GYCxCJRqFgNXhWVUebgezo28H",
"n94D73ZKSUaTDCnUqYW5ugJ9fHPNxda9GQVoWA6BGtcKuuhozrD1"
],
"pubkey_publisher":"ED58ED4AA543B524F16771F6E1367BAA220D99DCF22CD8CF7A11309E9EAB1B647B",
"seq":1,
"version":1
}
],
"signing_keys":{},
"status":"success",
"trusted_validator_keys":[
"n94D73ZKSUaTDCnUqYW5ugJ9fHPNxda9GQVoWA6BGtcKuuhozrD1",
"n9Ltz6ZxPRWTkqwBbpvgbaXPgm6GYCxCJRqFgNXhWVUebgezo28H"
],
"validation_quorum":2,
"validator_list_expires":"2017-Oct-13 14:56:00"
}
}
```
*JSON-RPC*
```
200 OK
{
"result":{
"local_static_keys": [],
"publisher_lists":[
{
"available":true,
"expiration":"2017-Oct-13 14:56:00",
"list":[
"n9Ltz6ZxPRWTkqwBbpvgbaXPgm6GYCxCJRqFgNXhWVUebgezo28H",
"n94D73ZKSUaTDCnUqYW5ugJ9fHPNxda9GQVoWA6BGtcKuuhozrD1"
],
"pubkey_publisher":"ED58ED4AA543B524F16771F6E1367BAA220D99DCF22CD8CF7A11309E9EAB1B647B",
"seq":1,
"version":1
}
],
"signing_keys":{},
"status":"success",
"trusted_validator_keys":[
"n94D73ZKSUaTDCnUqYW5ugJ9fHPNxda9GQVoWA6BGtcKuuhozrD1",
"n9Ltz6ZxPRWTkqwBbpvgbaXPgm6GYCxCJRqFgNXhWVUebgezo28H"
],
"validation_quorum":2,
"validator_list_expires":"2017-Oct-13 14:56:00"
},
"status":"success"
}
```
*Commandline*
```
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result":{
"local_static_keys": [],
"publisher_lists":[
{
"available":true,
"expiration":"2017-Oct-13 14:56:00",
"list":[
"n9Ltz6ZxPRWTkqwBbpvgbaXPgm6GYCxCJRqFgNXhWVUebgezo28H",
"n94D73ZKSUaTDCnUqYW5ugJ9fHPNxda9GQVoWA6BGtcKuuhozrD1"
],
"pubkey_publisher":"ED58ED4AA543B524F16771F6E1367BAA220D99DCF22CD8CF7A11309E9EAB1B647B",
"seq":1,
"version":1
}
],
"signing_keys":{},
"status":"success",
"trusted_validator_keys":[
"n94D73ZKSUaTDCnUqYW5ugJ9fHPNxda9GQVoWA6BGtcKuuhozrD1",
"n9Ltz6ZxPRWTkqwBbpvgbaXPgm6GYCxCJRqFgNXhWVUebgezo28H"
],
"validation_quorum":2,
"validator_list_expires":"2017-Oct-13 14:56:00"
},
"status":"success"
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format](#response-formatting), with a successful result containing the following fields:
| `Field` | Type | Description |
|:-------------------------|:-------|:-----------------------------------------|
| `listed_static_keys` | Array | Array of public keys for validators always eligible for inclusion in the trusted list. |
| `publisher_lists` | Array | Array of publisher list objects. |
| `signing_keys` | Object | Mapping from master public key to current signing key for listed validators that use validator manifests. |
| `trusted_validator_keys` | Array | Array of public keys for currently trusted validators. |
| `validation_quorum` | Number | Minimum number of trusted validations required to validate a ledger version. Some circumstances may cause the server to require more validations. |
| `validator_list_expires` | String | Either the human readable time when the current validator list will expire, the string `unknown` if the server has yet to load a published validator list or the string `never` if the server uses a static validator list. |
Each member of the `publisher_lists` array is an object with the following fields:
| `Field` | Type | Description |
|:-------------------|:-----------------|:-------------------------------------|
| `available` | Boolean | If `false`, the validator keys in `list` may no longer be supported by this publisher. |
| `expiration` | String | The human readable time when this published list will expire. |
| `list` | Array | Array of published validator keys. |
| `pubkey_publisher` | String | Ed25519 or ECDSA public key of the list publisher, as hexadecimal. |
| `seq` | Unsigned Integer | The sequence number of this published list. |
| `version` | Unsigned Integer | The version of the list format. |
#### Possible Errors
* Any of the [universal error types](#universal-errors).