mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 19:55:54 +00:00
Shards updates for 1.8.0
This commit is contained in:
@@ -30,6 +30,7 @@ Use these methods to manage log levels and other data, such as ledgers.
|
||||
* **[`ledger_request`](ledger_request.html)** - Query a peer server for a specific ledger version.
|
||||
* **[`log_level`](log_level.html)** - Get or modify log verbosity.
|
||||
* **[`logrotate`](logrotate.html)** - Reopen the log file.
|
||||
* **[`node_to_shard`](node_to_shard.html)** - Copy data from the ledger store to the shard store.
|
||||
|
||||
|
||||
## [Server Control Methods](server-control-methods.html)
|
||||
@@ -41,7 +42,7 @@ Use these methods to manage the `rippled` server.
|
||||
|
||||
## [Signing Methods](signing-methods.html)
|
||||
|
||||
Use these methods to sign transactions.
|
||||
Use these methods to sign transactions.
|
||||
|
||||
* **[`sign`](sign.html)** - Cryptographically sign a transaction.
|
||||
* **[`sign_for`](sign_for.html)** - Contribute to a multi-signature.
|
||||
|
||||
@@ -118,19 +118,20 @@ The response follows the [standard format][], with a successful result containin
|
||||
| `Field` | Type | Description |
|
||||
|:------------------|:-------|:------------------------------------------------|
|
||||
| `complete_shards` | String | _(May be omitted)_ The range of [history shards](history-sharding.html) that are available on the local server. This may be an empty string, or a disjointed range. For example, `1-2,5,7-9` indicates that shards 1, 2, 5, 7, 8, and 9 are available. Omitted if this server does not have history sharding enabled. |
|
||||
| `peers` | Array | List of **Peer Shard Objects** (see below) describing which history shards each peer has available. |
|
||||
| `peers` | Array | _(May be omitted)_ List of **Peer Shard Objects** (see below) describing which history shards each peer has available. The response omits this field if no peers within the number of hops specified by `limit` have any shards. |
|
||||
|
||||
#### Peer Shard Objects
|
||||
|
||||
Each member of the `peers` array of the response is an object that describes one server in the peer-to-peer network. The list only includes peers that have at least one complete [history shard](history-sharding.html) available. Each object in the array has the following fields:
|
||||
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:----------|:-------|:--------------------------------------------------------|
|
||||
| `complete_shards` | String | The range of history shards this peer has available. This may be disjointed. For example, `1-2,5,7-9` indicates that shards 1, 2, 5, 7, 8, and 9 are available. |
|
||||
| `ip` | String | _(May be omitted)_ The IP address of the peer this object describes. This may be an IPv4 or IPv6 address. Omitted if this is a [private peer](peer-protocol.html#private-peers). |
|
||||
| `complete_shards` | String | The range of complete history shards this peer has available. This may be disjointed. For example, `1-2,5,7-9` indicates that shards 1, 2, 5, 7, 8, and 9 are available. |
|
||||
| `incomplete_shards` | String | _(May be omitted)_ A comma-separated list of history shards this peer has partially downloaded, and percent completion for each. For example, `1:50,2:25` indicates that shard 1 is 50% downloaded and shard 2 is 25% downloaded. [New in: rippled 1.8.0][] |
|
||||
| `public_key` | String | _(Omitted unless the request specified `"public_key": true`)_ The public key this peer uses for peer-to-peer communications, in the XRP Ledger's [base58 format](base58-encodings.html). |
|
||||
|
||||
The `ip` field is no longer provided. [Removed in: rippled 1.8.0][]
|
||||
|
||||
|
||||
### Possible Errors
|
||||
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
---
|
||||
html: node_to_shard.html
|
||||
parent: logging-and-data-management-methods.html
|
||||
blurb: Copy data from the ledger store into the shard store.
|
||||
labels:
|
||||
- Data Retention
|
||||
---
|
||||
# node_to_shard
|
||||
[[Source]](https://github.com/undertome/rippled/blob/develop/src/ripple/rpc/handlers/NodeToShard.cpp "Source")
|
||||
|
||||
The `{{currentpage.name}}` method manages copying data from the ledger store to the [shard store](history-sharding.html). It can start, stop, or check the status of copying the data.
|
||||
|
||||
_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}}",
|
||||
"action": "start"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "{{currentpage.name}}",
|
||||
"params": [{
|
||||
"action": "start"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```sh
|
||||
#Syntax: {{currentpage.name}} start|stop|status
|
||||
rippled {{currentpage.name}} start
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The request includes the following parameters:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------|:-------|:---------------------------------------------------------|
|
||||
| `action` | String | Either `start`, `stop` or `status` depending on what action to take. |
|
||||
|
||||
|
||||
### Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"result": {
|
||||
"message": "Database import initiated..."
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"result" : {
|
||||
"message" : "Database import initiated...",
|
||||
"status" : "success"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```json
|
||||
Loading: "/etc/rippled.cfg"
|
||||
Connecting to 127.0.0.1:5005
|
||||
|
||||
{
|
||||
"result" : {
|
||||
"message" : "Database import initiated...",
|
||||
"status" : "success"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:----------|:-------|:--------------------------------------------------------|
|
||||
| `message` | String | A human-readable message indicating the action taken in response to the command. |
|
||||
|
||||
|
||||
### Possible Errors
|
||||
|
||||
- Any of the [universal error types][].
|
||||
- `internal` - If you attempt an invalid operation like checking the status of a copy when one isn't running.
|
||||
- `notEnabled` - If the server is not configured to store [history shards](history-sharding.html).
|
||||
- `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
Reference in New Issue
Block a user