Rippled I – Compilation, Configuration, and Launch

The first module of the XRPL Core Dev Bootcamp is dedicated to setting up the development environment and compiling Rippled, the software at the core of the XRP Ledger.

This module allows you to gain an in-depth understanding of the structure of a blockchain client, its components, and provides you with hands-on experience in configuring and launching Rippled in standalone mode.

In stand-alone mode, the server operates without connecting to the network and participating in the consensus process. Without the consensus process, you have to manually advance the ledger and no distinction is made between "closed" and "validated" ledgers. However, the server still provides API access and processes transactions the same.

Learn more about stand-alone mode.


Module Objectives

  • Install and configure a Rippled development environment (macOS, Ubuntu)

  • Understand the internal structure of the Rippled project and its dependencies

  • Work with Conan, CMake, and other modern build tools

  • Compile and generate the Rippled binary

  • Configure Rippled for standalone mode

These skills are essential for any developer who wants to contribute to the XRPL ecosystem or propose modifications to the protocol.

Setting Up the Environment

macOS

Install Node.js via nvm for easy version management:

# Install nvm (if not already installed)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

# Install and use the latest LTS version of Node.js
nvm install --lts
nvm use --lts

# Verify installation
node --version
npm --version

Prerequisites for Compiling Rippled

  • macOS with administrator rights

  • Apple account (to download certain versions of Xcode)

  • Stable internet connection for dependencies

Checking Clang Version

clang --version

Installing Xcode (if needed)

  1. Download Xcode from Apple Developer Downloads

  2. Extract the .xip file and rename it (e.g., Xcode_16.2.app)

  3. Move it to /Applications and set it as the default toolchain:

sudo mv Xcode_16.2.app /Applications/
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
export DEVELOPER_DIR=/Applications/Xcode_16.2.app/Contents/Developer
  1. Verify the installation:

clang --version
git --version

You should see something like this for clang: Apple clang version 16.0.0 (clang-1600.0.26.3)

Installing Build Tools

# Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Essential dependencies
brew update
brew install xz pyenv ninja

Python Configuration

# Install Python 3.10 via pyenv
pyenv install 3.10-dev
pyenv global 3.10-dev
eval "$(pyenv init -)"

# Install Conan and CMake
pip install 'conan<2'
pip install 'cmake<4'

Ubuntu

Prerequisites

  • Ubuntu with administrator rights

  • Stable internet connection

Installing Build Tools

apt update
apt install --yes curl git libssl-dev pipx python3.10-dev python3-pip make g++-11 libprotobuf-dev protobuf-compiler

# Install CMake
curl -LO "https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1.tar.gz"
tar -xzf cmake-3.25.1.tar.gz
cd cmake-3.25.1
./bootstrap --parallel=$(nproc)
make --jobs $(nproc)
make install
cd ..

# Install Conan
pipx install 'conan>2'
pipx ensurepath

Cloning the Rippled Repository

mkdir -p ~/projects
cd ~/projects
git clone https://github.com/XRPLF/rippled.git
cd rippled
git checkout develop

Conan Configuration

macOS

conan profile new default --detect
conan profile update settings.compiler.cppstd=20 default
conan profile update settings.build_type=Debug default
conan config set general.revisions_enabled=1
  • For Apple Clang 15 only:

conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_BEAST_USE_STD_STRING_VIEW"]' default
conan profile update 'env.CXXFLAGS="-DBOOST_BEAST_USE_STD_STRING_VIEW"' default

Ubuntu

conan profile detect --force
nano ~/.conan2/profiles/default
conan profile update settings.compiler.cppstd=20 default
conan profile update settings.compiler.libcxx=libstdc++11 default

Compiling Rippled

# Create the build directory
mkdir -p build && cd build

# Install dependencies via Conan
conan install .. --output-folder . --build --settings build_type=Debug

# Configure the project with CMake
cmake -G Ninja \
    -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
    -DCMAKE_CXX_FLAGS=-DBOOST_ASIO_HAS_STD_INVOKE_RESULT \
    -DCMAKE_BUILD_TYPE=Debug \
    -DUNIT_TEST_REFERENCE_FEE=200 \
    -Dtests=TRUE \
    -Dxrpld=TRUE \
    -Dstatic=OFF \
    -Dassert=TRUE \
    -Dwerr=TRUE \
    ..

# Build Rippled
cmake --build . --target rippled --parallel 10

⚠️ Compilation may take 30 to 60 minutes depending on your machine.

Running Rippled in Standalone Mode

cd ~/projects/rippled/build
cp ../config -r ./config
./rippled -a --conf ./config/rippled.cfg
  • Option with genesis ledger:

./rippled -a --conf ./config/rippled.cfg --ledgerfile ./config/genesis.json

The following options determine which ledger to load first when starting up.

  • Check the logs to confirm that the server is running correctly.

Interacting with Rippled via XRPL Explorer

  1. Install dependencies:

cd ~/core-dev-bootcamp-2025/explorer
npm install
  1. Launch the explorer:

npm run serve
  1. Navigate to http://localhost:8080/ to view transactions and the ledger.

  2. Test commands such as server_info, ledger_current, account_info from the interface or via cURL/WebSocket.

Playground – Connection and Tests

git clone https://github.com/XRPL-Commons/core-dev-bootcamp-2025/tree/main/playground
cd core-dev-bootcamp-2025/playground
yarn install
ts-node src/connect.ts
ts-node src/fund.ts
  • Create and fund test accounts to interact with the local ledger.

  • Verify transactions in the explorer and via the interface/command.

Homework

We often learn best through hands-on practice, which is why we offer an exercise that involves configuring and launching Rippled on the XRPL mainnet, then analyzing the logs to understand the node's behavior during initial synchronization.

Access the homework

Ressources supplémentaires

Last updated