Skip to content

Full History Size Snapshot

Elliot Lee edited this page Aug 8, 2023 · 1 revision

Clio provides full history.

As of August 4, 2023, the sizes of the databases for Mainnet (aka livenet) were as follows.

781G	objects
366G	successor
255G	diff
234G	account_tx
130G	transactions
100G	ledger_transactions
14G	ledgers
6.8G	ledger_hashes
378M	nf_token_transactions
188M	nf_tokens
21M	issuer_nf_tokens
30K	ledger_range

Acquiring full history from scratch via the peer-to-peer network is very slow. A faster method is to download a snapshot of the required data files.

There are two types of full history:

  • rippled
  • Clio

With rippled, there are two database options:

  • rocksdb
  • nudb

At this point, nudb is more widely used, and tends to be more reliable with the most commonly-used hardware. A full history snapshot can be achieved by copying:

  • nudb
  • transaction.db
  • ledger.db

transaction.db and ledger.db can be found in the configured database directory.

Typically, it is easiest for operators to get this data from S3 (Amazon Simple Storage Service), but S3 has a file size limit, 5TB at the time of writing. For this reason, the <databasedir>/nudb/nudb.dat file must be split into smaller pieces, such as 1TB. Example:

cd <databasedir/nudb>

split -b 1000000000000 --numeric-suffixes=1 nudb.dat /rippled/tmp/nudb.dat

Then, the files to upload, relative to , are:

  • ledger.db
  • transaction.db
  • nudb/nudb.key
  • nudb/nudb.dat.*

An operator could also provide a login shell, and the necessary files can be copied directly.

The config guide for full history: https://xrpl.org/configure-full-history.html

Set:

[ledger_history]
full

and no entry for online_delete. If there is an entry for online_delete then transaction history can be deleted.

For background on how to install and configure rippled to support full history, refer to these documents: https://xrpl.org/manage-the-rippled-server.html https://xrpl.org/configure-full-history.html For hardware sizing guidelines: https://xrpl.org/capacity-planning.html

Before downloading full history, first confirm that your installation of rippled is correct by starting the process and syncing to the network. Once you verify that the installation is functional, stop rippled and delete the contents of the data directory.

The data directory is configurable, but a common choice is /var/lib/rippled/db.