# XRPL EVM-Testnet

## Installation:

Install dependencies, if needed:

```
sudo apt update && \
sudo apt install curl git jq build-essential gcc unzip wget lz4 -y
```

Install go, if needed:

```
ver="1.21.13"
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
```

## Download Binary:

```
wget https://github.com/xrplevm/node/releases/download/v7.0.0/node_7.0.0_Linux_amd64.tar.gz
tar -xzf node_7.0.0_Linux_amd64.tar.gz
sudo mv /root/bin/exrpd /usr/local/bin/
chmod +x /usr/local/bin/exrpd
which exrpd
exrpd version
```

Setup your variable settings:

```
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="dongqn"" >> $HOME/.bash_profile
echo "export EXRPD_CHAIN_ID="xrplevm_1449000-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

Initialize node & create home directory for .exrpd

```
cd $HOME
exrpd init $MONIKER --chain-id $EXRPD_CHAIN_ID
```

Download genesis file:

```
wget -O $HOME/.exrpd/config/genesis.json "https://raw.githubusercontent.com/xrplevm/networks/refs/heads/main/testnet/genesis.json"
```

Set up node configuration:

```
sed -i.bak -e "s/^chain-id *=.*/chain-id = \"xrplevm_1449000-1\"/;" ~/.exrpd/config/client.toml
sed -i.bak -e "s/^keyring-backend *=.*/keyring-backend = \"os\"/;" ~/.exrpd/config/client.toml
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025axrp\"/;" ~/.exrpd/config/app.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.exrpd/config/config.toml
PEERS=`curl -sL https://raw.githubusercontent.com/xrplevm/networks/main/testnet/peers.txt | sort -R | head -n 10 | awk '{print $1}' | paste -s -d, -`
sed -i.bak -e "s/^seeds *=.*/seeds = \"$PEERS\"/" ~/.exrpd/config/config.toml
sed -i -e "s/^filter_peers *=.*/filter_peers = \"true\"/" $HOME/.exrpd/config/config.toml
```

(OPTIONAL) Set up pruning:

```
pruning="custom"
pruning_keep_recent="1000"
pruning_interval="100"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.exrpd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.exrpd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.exrpd/config/app.toml
```

(OPTIONAL) Set up indexer:

```
indexer="null"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.exrpd/config/config.toml
```

(OPTIONAL) Enable/Disable Snapshots:

```
snapshot_interval=1000
sed -i.bak -e "s/^snapshot-interval *=.*/snapshot-interval = \"$snapshot_interval\"/" ~/.exrpd/config/app.toml
```

Use initiad at service:

```
tee /etc/systemd/system/exrpd.service > /dev/null <<EOF
[Unit]
Description=exrpd
After=network-online.target

[Service]
User=$USER
ExecStart=$(which exrpd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
```

Launch:

```
systemctl daemon-reload
systemctl enable exrpd
systemctl restart exrpd && journalctl -u exrpd -f -o cat
```

**Check for your syncing progress**

```
exrpd status 2>&1 | jq
```

## Create wallet

```
exrpd keys add wallet --key-type eth_secp256k1
```

## **Creating a validator** <a href="#id-5b82" id="id-5b82"></a>

The XRPL EVM runs in a Proof of Authority consensus mechanism. In order to start signing for new blocks and participate in the network consensus, the current validators need to accept your node as a new trusted validator. This democratic process requires the approval of the majority of the current validators.

To begin the process, join the [XRPL EVM Sidechain Discord](https://discord.gg/xrplevm) and select your validator role in the `#roles` channel. After that, you will need to introduce yourself in the `#become-a-validator` channel. Explain who you are and why you want to run a validator. Generally, you will be accepted if you have a real interest in the project, either because you want to use the network for a company, are a recognized member of the community who wants to contribute to its long-term governance, or just have an academic interest.

While doing your introduction, you will need to provide the details that identify your validator.

* **Moniker**: The public name of your validator
* **Validator operator address**: The address of the operator of the node that starts with *ethmvaloper* . Can be obtained by running:

```
exrpd keys show wallet --bech val
```

* **Public key**: The public key of your node. Can be obtained by running:

```
exrpd tendermint show-validator
```

After that, a proposal to accept your validator will be voted on over a period of 7 days. During this time, some members may write to you publicly or privately to ask more questions. You can view the process on the [XRPL EVM Sidechain Explorer](https://governance.xrplevm.org/xrp/proposals).

#### (Optional) Download a Snapshot <a href="#id-6.-optional-download-a-snapshot" id="id-6.-optional-download-a-snapshot"></a>

```
systemctl stop exrpd
exrpd tendermint unsafe-reset-all --home $HOME/.exrpd
if curl -s --head curl https://share102.utsa.tech/xrpl/xrpl.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
  curl https://share102.utsa.tech/xrpl/xrpl.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.exrpd
    else
  echo "no snapshot found"
fi

systemctl restart exrpd && journalctl -u exrpd -f -o cat

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://services.dongqn.com/xrpl-evm-testnet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
