Xrpl labs

Node installation

Start a codespace from a template and get to developing with the power of a virtual machine in the cloud.

Recommended Hardware

ubuntu-20.04

ubuntu-22.04

CPU:

RAM:

8 cores

32GB

Storage:

1000GB

Version

v0.8.9+commit.e5eed63a

Binary:

v8.0.0

Peers:

17

Node consumption

realtime

Cpu_cores

0.08 Core

1%

Ram

1.48 GB

4.63%

Storage

write | read

79.86 GB

0

kb/s

|

0

kb/s

Earliest block / Latest block

Node name

Port

Pruning

Pruning keep recent

Pruning interval

Manual upgrade

### Install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install git gcc make jq curl lz4
### Install go
cd $HOME
VER=1.22.11
wget -qO go.tar.gz "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go.tar.gz
rm go.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bashrc
source ~/.bashrc
mkdir -p ~/go/bin
### Download binary and build
cd $HOME
rm -rf exrpd
git clone https://github.com/xrplevm/node exrpd
cd exrpd
APP_VERSION=v8.0.0
git checkout tags/$APP_VERSION -b $APP_VERSION
make install
### Config and init app
exrpd init --chain-id xrplevm_1449000-1
wget -O $HOME/.exrpd/config/genesis.json https://st-snap-1.stakeme.pro/xrpl/pruned/genesis.json
wget -O $HOME/.exrpd/config/addrbook.json https://st-snap-1.stakeme.pro/xrpl/pruned/addrbook.json
### Set seeds and peers
SEED=56ae1ec1a945b4b7ca06e4f32ee9ebd55d0b2c54@xrpl-testnet-seed.stakeme.pro:15656
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.exrpd/config/config.toml
### Set custom ports in app.toml and config.toml
sed -i.bak -e "s%:1317%:317%g;
s%:8080%:080%g;
s%:9090%:090%g;
s%:9091%:091%g;
s%:8545%:545%g;
s%:8546%:546%g;
s%:6065%:065%g" $HOME/.exrpd/config/app.toml
sed -i.bak -e "s%:26658%:658%g;
s%:26657%:657%g;
s%:6060%:060%g;
s%:26656%:656%g;
s%:26660%:660%g" $HOME/.exrpd/config/config.toml
### Config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.exrpd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"\"/" $HOME/.exrpd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"\"/" $HOME/.exrpd/config/app.toml
### Set minimum gas price
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0axrp"|g' $HOME/.exrpd/config/app.toml
### Disable indexing if needed
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.exrpd/config/config.toml
### Create service file
sudo tee /etc/systemd/system/exrpd.service > /dev/null <<EOF
[Unit]
Description=Xrpl Daemon
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.exrpd
ExecStart=$(which exrpd) start
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
### Reset and state sync
exrpd tendermint unsafe-reset-all --home $HOME/.exrpd
STATYSYNC_RPC=https://xrpl-testnet-rpc.stakeme.pro:443
LATEST_HEIGHT=$(curl -s $STATYSYNC_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$STATYSYNC_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.exrpd/config/config.toml
### Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable exrpd.service
sudo systemctl restart exrpd.service && sudo journalctl -u exrpd.service -f -o cat