Merge pull request #621 from ripple/rippled_v1.3.0

rippled v1.3.1 Docs
This commit is contained in:
Rome Reginelli
2019-07-25 16:25:12 -07:00
committed by GitHub
31 changed files with 385 additions and 199 deletions

View File

@@ -2,7 +2,7 @@
This tutorial guides you through the basics of building an XRP Ledger-connected application using [Node.js](http://nodejs.org/) and [RippleAPI](rippleapi-reference.html), a JavaScript API for accessing the XRP Ledger.
The scripts and configuration files used in this guide are [available in the Ripple Dev Portal GitHub Repository](https://github.com/ripple/ripple-dev-portal/tree/master/content/_code-samples/rippleapi_quickstart).
The scripts and config files used in this guide are [available in the Ripple Dev Portal GitHub Repository](https://github.com/ripple/ripple-dev-portal/tree/master/content/_code-samples/rippleapi_quickstart).
<!--#{ keep multiple H1s so that all steps are surfaced in sidebar. Do not change H1 titles unless they provide a clear improvement bc they are linked to on external sites. }# -->

View File

@@ -10,7 +10,7 @@ This tutorial assumes your server meets the following prerequisites:
- The `rippled` server is already [installed](install-rippled.html) and [online deletion](online-deletion.html) is enabled.
The default configuration file enables online deletion after 2000 ledger versions.
The default config file enables online deletion after 2000 ledger versions.
- A `cron` daemon is installed and running.

View File

@@ -10,11 +10,11 @@ To configure your `rippled` to store shards of ledger history, complete the foll
Before you configure your `rippled` server to store history shards, you must decide how much disk space to allocate to the history shard store. This also affects how much history you keep in the default ledger store. You should consider the following when deciding what size to configure your shard store:
- The ledger store (defined by the `[node_db]` stanza) is separate from the history shard store. The ledger store is required for all servers and _must_ contain a range of recent history, defined by how many ledgers to keep available in the `online_delete` parameter. (The default configuration stores the most recent 2000 ledgers.)
- If you keep at least 2^15 ledgers (32768) in the ledger store, you can efficiently import chunks of recent history from the ledger store into the shard store.
- The history shard store (defined by the `[shard_db]` stanza) is only required for storing history shards. The configuration stanza should be omitted from servers that do not store history shards. The size of the history shard store is defined in gigabytes in the `max_size_gb` parameter; the server attempts to use as much of this space as possible to store complete shards.
- A shard consists of 2^14 ledgers (16384) and occupies approximately 200 MB to 4 GB based on the age of the shard. Older shards are smaller because there was less activity in the XRP Ledger at the time.
- The history shard store and the ledger store _must_ be stored at different file paths. You can configure the ledger store and history store to be on different disks or partitions if desired.
- The ledger store (defined by the `[node_db]` stanza) is separate from the history shard store. The ledger store is required for all servers, and always contains a range of recent history, defined by how many ledgers to keep available in the `online_delete` parameter. (The default configuration stores the most recent 2000 ledgers.)
- If you keep at least 2<sup>15</sup> ledgers (32768) in the ledger store, you can efficiently import chunks of recent history from the ledger store into the shard store.
- The history shard store (defined by the `[shard_db]` stanza) is only required for storing history shards. The configuration stanza should be omitted from servers that do not store history shards. The size of the history shard store is defined in gigabytes in the `max_size_gb` parameter; the server attempts to use as much of this space as possible to store complete shards. The history shard store _MUST_ be stored on a solid-state disk or similar fast media. Traditional spinning hard disks are insufficient.
- A shard consists of 2<sup>14</sup> ledgers (16384) and occupies approximately 200 MB to 4 GB based on the age of the shard. Older shards are smaller because there was less activity in the XRP Ledger at the time.
- The history shard store and the ledger store _MUST_ be stored at different file paths. You can configure the ledger store and history store to be on different disks or partitions if desired.
- It is possible but redundant to hold full ledger history in both the ledger store and the history shard store.
- The time to acquire a shard, number of file handles needed by the `rippled` server, and memory cache usage is directly affected by the size of the shard.
@@ -33,9 +33,9 @@ path=/var/lib/rippled/db/shards/nudb
max_size_gb=50
```
**Tip:** Ripple recommends using NuDB for the shard store (`type=NuDB`). NuDB uses fewer file handles per shard than RocksDB. RocksDB uses memory that scales with the size of data it stores, which may require excessive memory overhead. However, NuDB is designed to be used with SSD drives and does not work with rotational disks.
The `type` field can be omitted. If present, it _MUST_ be `NuDB`. [New in: rippled 1.3.1][]
**Caution:** If you enable history sharding, then later change the database type of your shard store, you must also change the path or delete the existing data from the configured path. If `rippled` detects the wrong type of data in the shard store path, it may [fail to start](server-wont-start.html).
**Caution:** If `rippled` detects the wrong type of data in the shard store path, it may [fail to start](server-wont-start.html). You should use a new folder for the shard store. If you previously used a RocksDB shard store (`rippled` 1.2.x and lower), use a different path or delete the RocksDB shard data.
For more information, reference the `[shard_db]` example in the [rippled.cfg configuration example](https://github.com/ripple/rippled/blob/master/cfg/rippled-example.cfg).
@@ -51,4 +51,10 @@ After your server syncs to the network, it automatically starts downloading hist
This folder should contain a numbered folder for each shard your server has. At any given time, up to one folder may contain a `control.txt` file, indicating it is incomplete.
<!-- TODO: add download_shard and crawl_shards commands when they get added. -->
<!-- TODO: add download_shard and crawl_shards commands: https://github.com/ripple/ripple-dev-portal/issues/629 -->
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -24,9 +24,9 @@ For development purposes Ripple recommends running `rippled` as your own user, n
$ brew install git cmake pkg-config protobuf openssl ninja
0. Install Boost 1.67.0. `rippled` 1.2.0 is compatible with Boost 1.67. <!--#{ no boost@1.67 formula, so must manually compile and install. will eventually upgrade to boost 1.68, but needs testing first }# -->
0. Install Boost 1.70.0 or higher. `rippled` 1.3.1 is compatible with Boost 1.70.0 and higher. The latest version of Boost available in the Homebrew repositories isn't new enough, so you must install Boost manually:
1. Download [Boost 1.67.0](https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.bz2).
1. Download [Boost 1.70.0](https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.bz2).
2. Extract it to a folder. Be sure to note the location.
@@ -38,7 +38,7 @@ For development purposes Ripple recommends running `rippled` as your own user, n
0. Ensure that your `BOOST_ROOT` environment variable points to the directory created by the Boost installation. To find your Boost install directory, use `brew info boost`. Put this environment variable in your `.bash_profile` file so it's automatically set when you log in. For example:
export BOOST_ROOT=/Users/my_user/boost_1_67_0
export BOOST_ROOT=/Users/my_user/boost_1_70_0
0. If you updated your `.bash_profile` file in the previous step, be sure to source it. For example:
@@ -82,7 +82,7 @@ For development purposes Ripple recommends running `rippled` as your own user, n
$ ./rippled --unittest
0. `rippled` requires the `rippled.cfg` configuration file to run. You can find an example config file, `rippled-example.cfg` in `rippled/cfg`. Make a copy and save it as `rippled.cfg` in a location that enables you to run `rippled` as a non-root user. Access the `rippled` directory and run:
0. `rippled` requires the `rippled.cfg` config file to run. You can find an example config file, `rippled-example.cfg` in `rippled/cfg`. Make a copy and save it as `rippled.cfg` in a location that enables you to run `rippled` as a non-root user. Access the `rippled` directory and run:
$ mkdir -p $HOME/.config/ripple
$ cp cfg/rippled-example.cfg $HOME/.config/ripple/rippled.cfg
@@ -165,6 +165,7 @@ For information about `rippled` log messages, see [Understanding Log Messages](u
## See Also
- [Install rippled on Ubuntu Linux](install-rippled-on-ubuntu-with-alien.html) (Pre-built binary on Ubuntu for production use)
- [Install rippled on Ubuntu Linux](install-rippled-on-ubuntu.html) (Pre-built binary on Ubuntu for production use)
- [Install rippled on Red Hat Enterprise Linux](install-rippled-on-centos-rhel-with-yum.html) (Pre-built binary on RHEL or CentOS for production use)
- [Build and Run `rippled` on Ubuntu](build-run-rippled-ubuntu.html) (Compile `rippled` yourself on Ubuntu)
- [Compilation instructions for other platforms](https://github.com/ripple/rippled/tree/develop/Builds)

View File

@@ -31,7 +31,7 @@ These instructions use Ubuntu's APT (Advanced Packaging Tool) to install the sof
4. Install CMake.
Version 1.2.0 of `rippled` requires CMake 3.9.0 or higher. For the purposes of this tutorial, we used CMake 3.13.3, which was the latest version available at the time of writing.
Version 1.3.1 of `rippled` requires CMake 3.9.0 or higher. For the purposes of this tutorial, we used CMake 3.13.3, which was the latest version available at the time of writing.
If you have previously installed CMake 3.9.0 or higher, you can skip these steps.
@@ -44,21 +44,21 @@ These instructions use Ubuntu's APT (Advanced Packaging Tool) to install the sof
5. Compile Boost.
Version 1.2.0 of `rippled` requires Boost version 1.67.0 exactly. Because Boost version 1.67.0 isn't available in the Ubuntu 16.04 software repositories, you must compile it yourself.
Version 1.3.1 of `rippled` requires Boost version 1.70.0 or higher. Because Boost version 1.70.0 or higher isn't available in the Ubuntu 18.04 (or 16.04) software repositories, you must compile it yourself.
If you have previously built Boost 1.67.0 for `rippled` and configured the `BOOST_ROOT` environment variable, you can skip these steps.
If you have previously built Boost 1.70.0 for `rippled` and configured the `BOOST_ROOT` environment variable, you can skip these steps.
1. Download Boost 1.67.0.
1. Download Boost 1.70.0.
wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.gz
wget https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz
2. Extract `boost_1_67_0.tar.gz`.
2. Extract `boost_1_70_0.tar.gz`.
tar xvzf boost_1_67_0.tar.gz
tar xvzf boost_1_70_0.tar.gz
3. Change to the new `boost_1_67_0` directory.
3. Change to the new `boost_1_70_0` directory.
cd boost_1_67_0
cd boost_1_70_0
4. Prepare the Boost.Build system for use.
@@ -70,9 +70,9 @@ These instructions use Ubuntu's APT (Advanced Packaging Tool) to install the sof
**Tip:** This example uses 4 processes to build in parallel. The best number of processes to use depends on how many CPU cores your hardware has available. You can use `cat /proc/cpuinfo` to get information about your hardware's processor.
6. Set the environment variable `BOOST_ROOT` to point to the new `boost_1_67_0` directory. It's best to put this environment variable in your `.profile`, or equivalent, file for your shell so it's automatically set when you log in. Add the following line to the file:
6. Set the environment variable `BOOST_ROOT` to point to the new `boost_1_70_0` directory. It's best to put this environment variable in your `.profile`, or equivalent, file for your shell so it's automatically set when you log in. Add the following line to the file:
export BOOST_ROOT=/home/my_user/boost_1_67_0
export BOOST_ROOT=/home/my_user/boost_1_70_0
7. Source your updated `.profile` file. For example:
@@ -88,11 +88,13 @@ These instructions use Ubuntu's APT (Advanced Packaging Tool) to install the sof
$ git log -1
commit 7779dcdda00ea61a976cf5f387bc1f3bb4ebbfdd
Author: Mike Ellery <mellery451@gmail.com>
Date: Tue Feb 12 16:41:03 2019 -0800
commit e1adbd7ddd5dfa9f2a9791aa3c0fcc1fdb4e8236
Author: Manoj doshi <mdoshi@ripple.com>
Date: Wed Jul 24 15:21:56 2019 -0700
Set version to 1.3.1
Set version to 1.2.0
8. If you previously built, or (more importantly) tried and failed to build `rippled`, you should delete the `my_build/` directory (or whatever you named it) to start clean before moving on to the next step. Otherwise, you may get unexpected behavior, like a `rippled` executable that crashes due to a segmentation fault (segfault).

View File

@@ -8,7 +8,7 @@ This section describes configuration, network, and hardware recommendations that
Ripple recommends using these configuration guidelines to optimize resource utilization and performance of your `rippled` server.
You can set the following parameters in the `rippled.cfg` file used for your `rippled` server. You can access an example configuration file, `rippled-example.cfg`, in the [`cfg` directory](https://github.com/ripple/rippled/blob/develop/cfg/rippled-example.cfg) in the `rippled` GitHub repo.
You can set the following parameters in the `rippled.cfg` file used for your `rippled` server. You can access an example config file, `rippled-example.cfg`, in the [`cfg` directory](https://github.com/ripple/rippled/blob/develop/cfg/rippled-example.cfg) in the `rippled` GitHub repo.
### Node Size

View File

@@ -14,17 +14,35 @@ Before you install `rippled`, you must meet the [System Requirements](system-req
1. Install the Ripple RPM repository:
$ sudo rpm -Uvh https://mirrors.ripple.com/ripple-repo-el7.rpm
$ cat << REPOFILE | sudo tee /etc/yum.repos.d/ripple.repo
[ripple-stable]
name=XRP Ledger Packages
baseurl=https://repos.ripple.com/repos/rippled-rpm/stable/
enabled=1
gpgcheck=0
gpgkey=https://repos.ripple.com/repos/rippled-rpm/stable/repodata/repomd.xml.key
repo_gpgcheck=1
REPOFILE
2. Install the `rippled` software package:
2. Fetch the latest repo updates:
$ sudo yum install --enablerepo=ripple-stable rippled
$ sudo yum -y update
3. Configure the `rippled` service to start on system boot:
3. Install the new `rippled` package:
$ sudo yum install rippled
Version 1.3.1 does not require any changes to your config files (`rippled.cfg` and `validators.txt`). This update procedure leaves your existing config files in place.
4. Reload systemd unit files:
$ sudo systemctl daemon-reload
5. Configure the `rippled` service to start on boot:
$ sudo systemctl enable rippled.service
4. Start the `rippled` service
6. Start the `rippled` service:
$ sudo systemctl start rippled.service
@@ -35,7 +53,8 @@ Before you install `rippled`, you must meet the [System Requirements](system-req
## See Also
- [Update Automatically on CentOS/Red Hat](update-rippled-automatically-on-centos-rhel.html)
- [Install rippled on Ubuntu Linux](install-rippled-on-ubuntu-with-alien.html) (Pre-built binary on Ubuntu)
- [Update Automatically on Linux](update-rippled-automatically-on-linux.html)
- [Install rippled on Ubuntu Linux](install-rippled-on-ubuntu.html) (Pre-built binary for Ubuntu or Debian)
- [Build and Run `rippled` on Ubuntu](build-run-rippled-ubuntu.html) (Compile `rippled` yourself on Ubuntu)
- [Build and Run `rippled` on macOS](build-run-rippled-macos.html) (Compile `rippled` yourself on macOS)
- [Compilation instructions for other platforms](https://github.com/ripple/rippled/tree/develop/Builds)

View File

@@ -1,47 +0,0 @@
# Install on Ubuntu with Alien
This page describes the recommended instructions for installing the latest stable version of `rippled` on **Ubuntu Linux 16.04 or higher**, using the [Alien](https://help.ubuntu.com/community/RPM/AlienHowto) utility to install from Ripple's [yum](https://en.wikipedia.org/wiki/Yellowdog_Updater,_Modified) repository.
These instructions install a binary that has been compiled by Ripple.
## Prerequisites
Before you install `rippled`, you must meet the [System Requirements](system-requirements.html).
## Installation Steps
1. Install yum-utils and alien:
$ sudo apt-get update
$ sudo apt-get install yum-utils alien
2. Install the Ripple RPM repository:
$ sudo rpm -Uvh https://mirrors.ripple.com/ripple-repo-el7.rpm
3. Download the `rippled` software package:
$ yumdownloader --enablerepo=ripple-stable --releasever=el7 rippled
4. Verify the signature on the `rippled` software package:
$ sudo rpm --import https://mirrors.ripple.com/rpm/RPM-GPG-KEY-ripple-release && rpm -K rippled*.rpm
5. Install the `rippled` software package:
$ sudo alien -i --scripts rippled*.rpm && rm rippled*.rpm
6. Configure the `rippled` service to start on system boot:
$ sudo systemctl enable rippled.service
7. Start the `rippled` service
$ sudo systemctl start rippled.service
## Next Steps
{% include '_snippets/post-rippled-install.md' %}

View File

@@ -0,0 +1,88 @@
# Install on Ubuntu or Debian Linux
This page describes the recommended instructions for installing the latest stable version of `rippled` on **Ubuntu Linux 16.04 or higher** or **Debian 9 (Stretch)**, using the [`apt`](https://help.ubuntu.com/lts/serverguide/apt.html) utility. [Updated in: rippled 1.3.1][New in: rippled 1.3.1]
These instructions install a binary that has been compiled by Ripple.
## Prerequisites
Before you install `rippled`, you must meet the [System Requirements](system-requirements.html).
## Installation Steps
1. Update repositories:
$ sudo apt -y update
2. Install utilities:
$ sudo apt -y install apt-transport-https ca-certificates wget gnupg
3. Add Ripple's package-signing GPG key to your list of trusted keys:
$ wget -q -O - "https://repos.ripple.com/repos/api/gpg/key/public" | \
sudo apt-key add -
4. Check the fingerprint of the newly-added key:
$ apt-key finger
The output should include an entry for Ripple such as the following:
pub rsa3072 2019-02-14 [SC] [expires: 2021-02-13]
C001 0EC2 05B3 5A33 10DC 90DE 395F 97FF CCAF D9A2
uid [ unknown] TechOps Team at Ripple <techops+rippled@ripple.com>
sub rsa3072 2019-02-14 [E] [expires: 2021-02-13]
In particular, make sure that the fingerprint matches. (In the above example, the fingerprint is on the second line, starting with `C001`.)
4. Add the appropriate Ripple repository for your operating system version:
$ echo "deb https://repos.ripple.com/repos/rippled-deb bionic stable" | \
sudo tee -a /etc/apt/sources.list.d/ripple.list
The above example is appropriate for **Ubuntu 18.04 Bionic Beaver**. For other operating systems, replace the word `bionic` with one of the following:
- `xenial` for **Ubuntu 16.04 Xenial Xerus**
- `stretch` for **Debian 9 Stretch**
If you want access to development or pre-release versions of `rippled`, use one of the following instead of `stable`:
- `unstable` - Pre-release builds ([`release` branch](https://github.com/ripple/rippled/tree/release))
- `nightly` - Experimental/development builds ([`develop` branch](https://github.com/ripple/rippled/tree/develop))
**Warning:** Unstable and nightly builds may be broken at any time. Do not use these builds for production servers.
5. Fetch the Ripple repository.
$ sudo apt -y update
6. Install the `rippled` software package:
$ sudo apt -y install rippled
7. Check the status of the `rippled` service:
$ systemctl status rippled.service
The `rippled` service should start automatically. If not, you can start it manually:
$ sudo systemctl start rippled.service
To configure it to start automatically on boot:
$ sudo systemctl enable rippled.service
## Next Steps
{% include '_snippets/post-rippled-install.md' %}
<!--{# 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,76 @@
# rippled v1.3.x Migration Instructions
This document describes the migration process for upgrading from `rippled` 1.2.4 or earlier to `rippled` v1.3 or later. This migration process is necessary because the `rippled` install process has changed as of version 1.3.
This document provides migration steps for upgrading on supported platforms:
- [CentOS or Red Hat Enterprise Linux (RHEL)](#migration-on-centos-or-red-hat-enterprise-linux-rhel)
- [Ubuntu Linux](#migration-on-ubuntu-linux)
For other platforms, see the updated instructions for compiling from source. ([Ubuntu](build-run-rippled-ubuntu.html), [macOS](build-run-rippled-macos.html), or [Windows](https://github.com/ripple/rippled/tree/develop/Builds/VisualStudio2017))
## Migration on CentOS or Red Hat Enterprise Linux (RHEL)
Ripple's official RPM repository and instructions for using it have changed. If you have [automatic updates](update-rippled-automatically-on-linux.html) enabled, your system should perform the migration automatically. To migrate manually from the old repository to the new one, complete the following steps:
1. Stop the `rippled` server.
$ sudo systemctl stop rippled.service
2. Remove the old Ripple repository package.
$ sudo rpm -e ripple-repo
The `rippled-repo` package is now **DEPRECATED**. The package has been updated one last time for version 1.3.1. In the future, any changes to the repositories will require manual changes to the `ripple.repo` file.
3. Add Ripple's new yum repository:
$ cat << REPOFILE | sudo tee /etc/yum.repos.d/ripple.repo
[ripple-stable]
name=XRP Ledger Packages
baseurl=https://repos.ripple.com/repos/rippled-rpm/stable/
enabled=1
gpgcheck=0
gpgkey=https://repos.ripple.com/repos/rippled-rpm/stable/repodata/repomd.xml.key
repo_gpgcheck=1
REPOFILE
4. Install the new `rippled` package:
$ sudo yum install rippled
Version 1.3.1 does not require any changes to your config files (`rippled.cfg` and `validators.txt`). This update procedure leaves your existing config files in place.
5. Reload systemd unit files:
$ sudo systemctl daemon-reload
6. Start the `rippled` service:
$ sudo systemctl start rippled.service
**Warning:** If you use [automatic updates](update-rippled-automatically-on-linux.html), they should continue working after performing this migration process. However, **the `ripple-repo` package is now deprecated**. As a consequence, in the future, any changes to Ripple's repositories may require you to manually update your repos file.
## Migration on Ubuntu Linux
Prior to version 1.3, the supported way to install `rippled` on Ubuntu Linux was using Alien to install the RPM package. Starting with `rippled` v1.3.1, Ripple provides a native package for Ubuntu and Debian Linux, which is the recommended way of installing it. If you already have the RPM package installed, complete the [installation steps](install-rippled-on-ubuntu.html) to upgrade the package and switch over to the native APT (`.deb`) package.
If you have made any changes to your config files (`/opt/ripple/etc/rippled.cfg` and `/opt/ripple/etc/validators.txt`), `apt` may prompt you during installation asking if you want to overwrite your config files with the newest versions from the packages. Version 1.3 does not require any changes to the config file, so you can safely keep your existing config files unchanged.
After installing the new package, if you no longer need Alien for any other packages, you may optionally uninstall it and its dependencies using the following steps:
1. Uninstall Alien:
$ sudo apt -y remove alien
2. Uninstall unused dependencies:
$ sudo apt -y autoremove
### Automatic Updates
The `rippled` v1.3 package includes an updated auto-update script that works on Ubuntu and Debian Linux. For more information, see [Update `rippled` Automatically on Linux](update-rippled-automatically-on-linux.html).

View File

@@ -5,7 +5,7 @@
A `rippled` server should run comfortably on commodity hardware, to make it inexpensive to participate in the network. At present, Ripple recommends the following minimum requirements:
- Operating System:
- Production: CentOS or RedHat Enterprise Linux (latest release) or Ubuntu (16.04+) supported
- Production: CentOS or RedHat Enterprise Linux (latest release), Ubuntu (16.04+), or Debian (9.x) supported
- Development: Mac OS X, Windows (64-bit), or most Linux distributions
- CPU: 64-bit x86_64, 2+ cores
- Disk: Minimum 50GB for the database partition. SSD strongly recommended (minimum 1000 IOPS, more is better)

View File

@@ -1,25 +0,0 @@
# Update Automatically on CentOS/Red Hat
On CentOS and Red Hat Enterprise Linux, you can set up `rippled` to automatically upgrade to the latest version with a one-time `cron` configuration. Ripple recommends enabling automatic updates if possible.
These instructions assume you have already [installed `rippled` from the `yum` repository](install-rippled-on-centos-rhel-with-yum.html).
To set up automatic updates, complete the following steps:
1. Check that `/opt/ripple/bin/update-rippled.sh` exists. If it does not, [update manually](update-rippled-manually-on-centos-rhel.html).
2. Install `crond`:
$ sudo yum install cronie
3. Open the crontab file for editing
$ sudo crontab -e
4. Add the following to the crontab file. Be sure to add a blank line at the end of the file.
RANDOM_DELAY=59
0 * * * * /opt/ripple/bin/update-rippled.sh
The script updates the installed `rippled` package within an hour of each new release. To reduce the chance of outages from all servers updating simultaneously, the script delays the update for a random number of minutes, up to 59.

View File

@@ -0,0 +1,17 @@
# Update Automatically on Linux
On Linux, you can set up `rippled` to automatically upgrade to the latest version with a one-time `cron` configuration. Ripple recommends enabling automatic updates if possible.
These instructions assume you have already installed `rippled` [from the `yum` repository (CentOS/RedHat)](install-rippled-on-centos-rhel-with-yum.html) or [using `apt` (Ubuntu/Debian)](install-rippled-on-ubuntu.html).
To set up automatic updates, complete the following steps:
1. Check that `/opt/ripple/etc/update-rippled-cron` exists. If it does not, update manually ([CentOS/Red Hat](update-rippled-manually-on-centos-rhel.html) or [Ubuntu/Debian](update-rippled-manually-on-ubuntu.html)).
2. Create a symlink in your `cron.d` folder to the `/opt/ripple/etc/update-rippled-cron` config file:
$ sudo ln -s /opt/ripple/etc/update-rippled-cron /etc/cron.d/
This cron configuration runs a script to update the installed `rippled` package within an hour of each new release. To reduce the chance of outages from all servers updating simultaneously, the script delays the update for a random number of minutes, up to 59.
**Caution:** In the future, it is possible that changes to Ripple's repositories may require manual intervention to update the URLs where your script searches for updates. Stay tuned to the [XRP Ledger Blog](/blog/) or the [ripple-server mailing list](https://groups.google.com/forum/#!forum/ripple-server) for announcements on any required changes.

View File

@@ -1,23 +1,21 @@
# Update Manually on CentOS/Red Hat
This page describes how to update manually to the latest release of `rippled` on CentOS or Red Hat Enterprise Linux. Ripple recommends setting up [automatic updates](update-rippled-automatically-on-centos-rhel.html) instead, where possible.
This page describes how to update manually to the latest release of `rippled` on CentOS or Red Hat Enterprise Linux. Ripple recommends setting up [automatic updates](update-rippled-automatically-on-linux.html) instead, where possible.
These instructions assume you have already [installed `rippled` from the `yum` repository](install-rippled-on-centos-rhel-with-yum.html).
**Tip:** To perform these steps all at once, you can run the `/opt/ripple/bin/update-rippled.sh` script, which is included with the `rippled` package.
To update manually, complete the following steps:
1. Update the package list from Ripple's yum repository:
1. Download and install the latest `rippled` package:
$ sudo rpm -Uvh --replacepkgs https://mirrors.ripple.com/ripple-repo-el7.rpm
$ sudo yum update rippled
2. Download and install the latest `rippled` package:
$ sudo yum update --enablerepo=ripple-stable rippled
3. Reload the `systemd` unit files:
2. Reload the `systemd` unit files:
$ sudo systemctl daemon-reload
4. Restart the `rippled` service:
3. Restart the `rippled` service:
$ sudo service rippled restart

View File

@@ -1,35 +1,25 @@
# Update Manually on Ubuntu
# Update Manually on Ubuntu or Debian
This page describes how to update manually to the latest release of `rippled` on Ubuntu Linux. These instructions assume you have already [installed `rippled` using Alien](install-rippled-on-ubuntu-with-alien.html).
This page describes how to update manually to the latest release of `rippled` on Ubuntu Linux. These instructions assume you have already [installed `rippled` using the native package](install-rippled-on-ubuntu.html). Ripple recommends setting up [automatic updates](update-rippled-automatically-on-linux.html) instead, where possible.
**Caution:** To upgrade from `rippled` 1.2.x to 1.3.1 or higher on Ubuntu Linux, you should follow the [1.3.1 migration instructions](rippled-1-3-migration-instructions.html). The following instructions assume you have already installed the native APT package provided with versions 1.3.1 and up.
**Tip:** To perform these steps all at once, you can run the `/opt/ripple/bin/update-rippled.sh` script, which is included with the `rippled` package and is compatible with Ubuntu and Debian starting with `rippled` version 1.3.1.
To update manually, complete the following steps:
1. Update the package list from Ripple's yum repository:
1. Update repositories:
$ sudo rpm -Uvh --replacepkgs https://mirrors.ripple.com/ripple-repo-el7.rpm
$ sudo apt -y update
2. Download the latest `rippled` package:
2. Upgrade the `rippled` package:
$ yumdownloader --enablerepo=ripple-stable --releasever=el7 rippled
$ sudo apt -y upgrade rippled
3. Verify the signatures on the downloaded packages:
$ rpm -K rippled*.rpm
4. Use Alien to upgrade to the new `rippled` package:
$ sudo alien -i --scripts rippled*.rpm
5. Reload the `systemd` unit files:
3. Reload the `systemd` unit files:
$ sudo systemctl daemon-reload
6. Restart the `rippled` service:
4. Restart the `rippled` service:
$ sudo service rippled restart
7. Delete the downloaded `rippled` package file:
$ rm rippled*.rpm
(This does not affect the installation, but prevents later updates from trying to re-install the old version.)

View File

@@ -20,7 +20,7 @@ In a genesis ledger, the [genesis address](accounts.html#special-addresses) hold
In a new genesis ledger, the hard-coded default [Reserve](reserves.html) is **200 XRP** minimum for funding a new address, with an increment of **50 XRP** per object in the ledger. These values are higher than the current reserve requirements of the production network. (See also: [Fee Voting](fee-voting.html))
By default, a new genesis ledger has no [amendments](amendments.html) enabled. If you start a new genesis ledger with `--start`, the genesis ledger contains an [EnableAmendment pseudo-transaction](enableamendment.html) to turn on all amendments natively supported by the `rippled` server, except for amendments that you explicitly disable in the configuration file. The effects of those amendments are available starting from the very next ledger version. (Reminder: in stand-alone mode, you must [advance the ledger manually](advance-the-ledger-in-stand-alone-mode.html).) [New in: rippled 0.50.0][]
By default, a new genesis ledger has no [amendments](amendments.html) enabled. If you start a new genesis ledger with `--start`, the genesis ledger contains an [EnableAmendment pseudo-transaction](enableamendment.html) to turn on all amendments natively supported by the `rippled` server, except for amendments that you explicitly disable in the config file. The effects of those amendments are available starting from the very next ledger version. (Reminder: in stand-alone mode, you must [advance the ledger manually](advance-the-ledger-in-stand-alone-mode.html).) [New in: rippled 0.50.0][]
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -60,7 +60,7 @@ This generally indicates one of several problems:
## Check the server log
[By default,](https://github.com/ripple/rippled/blob/master/cfg/rippled-example.cfg#L1139-L1142) `rippled` writes the server's debug log to the file `/var/log/rippled/debug.log`. The location of the debug log can differ based on your server's configuration file. If you start the `rippled` service directly (instead of using `systemctl` or `service` to start it), it also prints log messages to the console by default.
[By default,](https://github.com/ripple/rippled/blob/master/cfg/rippled-example.cfg#L1139-L1142) `rippled` writes the server's debug log to the file `/var/log/rippled/debug.log`. The location of the debug log can differ based on your server's config file. If you start the `rippled` service directly (instead of using `systemctl` or `service` to start it), it also prints log messages to the console by default.
The default config file sets the log level to severity "warning" for all categories of log messages by internally using the [log_level method][] during startup. You can control the verbosity of the debug log [using the `--silent` commandline option during startup](commandline-usage.html#verbosity-options) and with the [log_level method][] while the server is running. (See the `[rpc_startup]` stanza of the config file for settings.)

View File

@@ -22,7 +22,7 @@ If your server is vulnerable to this problem, you can detect it two ways:
In both cases, detection of the problem requires access to `rippled`'s server logs.
**Tip:** The location of the debug log depends on your `rippled` server's configuration file. The [default configuration](https://github.com/ripple/rippled/blob/master/cfg/rippled-example.cfg#L1139-L1142) writes the server's debug log to the file `/var/log/rippled/debug.log`.
**Tip:** The location of the debug log depends on your `rippled` server's config file. The [default configuration](https://github.com/ripple/rippled/blob/master/cfg/rippled-example.cfg#L1139-L1142) writes the server's debug log to the file `/var/log/rippled/debug.log`.
### Proactive Detection

View File

@@ -179,17 +179,24 @@ Terminating thread rippled: main: unhandled St13runtime_error 'shard path missin
If your config includes a `[shard_db]` stanza, it must contain a `path` field, which points to a directory where `rippled` can write the data for the shard store. This error means the `path` field is missing or located in the wrong place. Check for extra whitespace or typos in your config file, and compare against the [Shard Configuration Example](configure-history-sharding.html#2-edit-rippledcfg).
## Unsupported shard store type: RocksDB
## ShardStore unable to open/create RocksDB
RocksDB is no longer supported as a backend for [history sharding](history-sharding.html). If you have an existing configuration that defines a RocksDB shard store, the server fails to start. [New in: rippled 1.3.1][]
If you enable [history sharding](history-sharding.html), then later change the configuration to use RocksDB instead of NuDB, the server may try to read the existing NuDB data as RocksDB data and fail to start. In this case, the server writes an error such as the following:
In this case, the process dies shortly after the log startup command, with a message such as the following appearing earlier in the output log:
```text
ShardStore:ERR shard 504 error: Unable to open/create RocksDB: Invalid argument: /var/lib/rippled/db/shards/504: does not exist (create_if_missing is false)
ShardStore:ERR Unsupported shard store type: RocksDB
```
To fix this problem, do one of the following:
- Move or delete the existing shard data from the configured folder
- Change where the shard store is located on disk by changing the `path` of the `[shard_db]` stanza in the `rippled.cfg` file.
- Change the shard store back to using NuDB.
To fix this problem, do one of the following, then restart the server:
- Change your shard store to use NuDB instead.
- Disable history sharding.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}