Soroban

Set up your Soroban node.

Prerequisites

  • Minimum hardware requirements: At least 4GB of RAM and a 2.40GHz CPU with 6 cores depending on your request load. Disk/Storage is recommended at least 10GB
  • MacOS or Ubuntu 18.04+
  • Build-essential packages
  • Golang 1.17+
  • Official Documentation

Install required dependencies

In order to build the Soroban node, you first need to install all the required dependencies. c++ toolchain and headers that supports c++17 clang >= 12.0 g++ >= 10.0 pkg-config bison and flex libpq-dev unless you ./configure —disable-postgres in the build step below. 64-bit system clang-format-12 (for make format to work) sed and perl libunwind-dev Rust toolchain (see Installing Rust subsection) cargo >= 1.74 rust >= 1.74

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt-get update
sudo apt-get install -y make git-core libssl-dev pkg-config libclang-12-dev build-essential protobuf-compiler
sudo apt-get install libudev-dev
source "$HOME/.cargo/env"

# common packages
sudo apt-get install git build-essential pkg-config autoconf automake libtool bison flex libpq-dev libunwind-dev parallel sed perl postgresql-common postgresql postgresql-contrib
# if using clang
sudo apt-get install clang-12
# clang with libstdc++
sudo apt-get install gcc-10
# if using g++ or building with libstdc++
# sudo apt-get install gcc-10 g++-10 cpp-10
sudo apt-get install clang-format-12

Install Stellar-Core

Soroban-RPC requires an instance of stellar-core binary on the same host. This is referred to as the Captive Core. Since, we are building RPC from source, we recommend considering two approaches to get the stellar-core binary:

Install the latest versions for the network accordingly stellar core latest release tag and soroban latest release tag

# These are examples - check their docs and release page to opt for the right version
STELLAR_RELEASE=v21.2.0
SOROBAN_RELEASE=v21.4.1

1. Install Stellar Core

git clone https://github.com/stellar/stellar-core.git
cd stellar-core
git checkout $STELLAR_RELEASE
git submodule init
git submodule update
./autogen.sh
./configure
make
make check
make install
git clone https://github.com/stellar/stellar-core.git
cd stellar-core
git checkout $STELLAR_RELEASE
git submodule init
git submodule update
./autogen.sh
./configure
make
make check
make install

2. Install Soroban

git clone https://github.com/stellar/soroban-rpc.git
cd soroban-rpc
git checkout $SOROBAN_RELEASE
make build-soroban-rpc
mv soroban-rpc /usr/bin/
git clone https://github.com/stellar/soroban-rpc.git
cd soroban-rpc
git checkout $SOROBAN_RELEASE
make build-soroban-rpc
mv soroban-rpc /usr/bin/

Check Versions

soroban-rpc version
stellar-core version

Configure soroban node

1. Create a config directories

mkdir -p ~/.stellar/config
mkdir -p ~/.soroban/config

2. Create the config file for stellar

Create ~/.stellar/config/core.toml and add

HTTP_PORT=11626
PUBLIC_HTTP_PORT=false

NETWORK_PASSPHRASE="Public Global Stellar Network ; September 2015"

DATABASE="sqlite3://stellar.db"

# Stellar Pubnet Validators
[[HOME_DOMAINS]]
HOME_DOMAIN="stellar.org"
QUALITY="HIGH"

[[HOME_DOMAINS]]
HOME_DOMAIN="satoshipay.io"
QUALITY="HIGH"

[[HOME_DOMAINS]]
HOME_DOMAIN="lobstr.co"
QUALITY="HIGH"

[[HOME_DOMAINS]]
HOME_DOMAIN="www.coinqvest.com"
QUALITY="HIGH"

[[HOME_DOMAINS]]
HOME_DOMAIN="publicnode.org"
QUALITY="HIGH"

[[HOME_DOMAINS]]
HOME_DOMAIN="stellar.blockdaemon.com"
QUALITY="HIGH"

[[HOME_DOMAINS]]
HOME_DOMAIN="www.franklintempleton.com"
QUALITY="HIGH"

[[VALIDATORS]]
NAME="sdf_1"
HOME_DOMAIN="stellar.org"
PUBLIC_KEY="GCGB2S2KGYARPVIA37HYZXVRM2YZUEXA6S33ZU5BUDC6THSB62LZSTYH"
ADDRESS="core-live-a.stellar.org:11625"
HISTORY="curl -sf https://history.stellar.org/prd/core-live/core_live_001/{0} -o {1}"

[[VALIDATORS]]
NAME="sdf_2"
HOME_DOMAIN="stellar.org"
PUBLIC_KEY="GCM6QMP3DLRPTAZW2UZPCPX2LF3SXWXKPMP3GKFZBDSF3QZGV2G5QSTK"
ADDRESS="core-live-b.stellar.org:11625"
HISTORY="curl -sf https://history.stellar.org/prd/core-live/core_live_002/{0} -o {1}"

[[VALIDATORS]]
NAME="sdf_3"
HOME_DOMAIN="stellar.org"
PUBLIC_KEY="GABMKJM6I25XI4K7U6XWMULOUQIQ27BCTMLS6BYYSOWKTBUXVRJSXHYQ"
ADDRESS="core-live-c.stellar.org:11625"
HISTORY="curl -sf https://history.stellar.org/prd/core-live/core_live_003/{0} -o {1}"

[[VALIDATORS]]
NAME="satoshipay_singapore"
HOME_DOMAIN="satoshipay.io"
PUBLIC_KEY="GBJQUIXUO4XSNPAUT6ODLZUJRV2NPXYASKUBY4G5MYP3M47PCVI55MNT"
ADDRESS="stellar-sg-sin.satoshipay.io:11625"
HISTORY="curl -sf https://stellar-history-sg-sin.satoshipay.io/{0} -o {1}"

[[VALIDATORS]]
NAME="satoshipay_iowa"
HOME_DOMAIN="satoshipay.io"
PUBLIC_KEY="GAK6Z5UVGUVSEK6PEOCAYJISTT5EJBB34PN3NOLEQG2SUKXRVV2F6HZY"
ADDRESS="stellar-us-iowa.satoshipay.io:11625"
HISTORY="curl -sf https://stellar-history-us-iowa.satoshipay.io/{0} -o {1}"

[[VALIDATORS]]
NAME="satoshipay_frankfurt"
HOME_DOMAIN="satoshipay.io"
PUBLIC_KEY="GC5SXLNAM3C4NMGK2PXK4R34B5GNZ47FYQ24ZIBFDFOCU6D4KBN4POAE"
ADDRESS="stellar-de-fra.satoshipay.io:11625"
HISTORY="curl -sf https://stellar-history-de-fra.satoshipay.io/{0} -o {1}"

[[VALIDATORS]]
NAME="coinqvest_hong_kong"
HOME_DOMAIN="www.coinqvest.com"
PUBLIC_KEY="GAZ437J46SCFPZEDLVGDMKZPLFO77XJ4QVAURSJVRZK2T5S7XUFHXI2Z"
ADDRESS="hongkong.stellar.coinqvest.com:11625"
HISTORY="curl -sf https://hongkong.stellar.coinqvest.com/history/{0} -o {1}"

[[VALIDATORS]]
NAME="coinqvest_germany"
HOME_DOMAIN="www.coinqvest.com"
PUBLIC_KEY="GD6SZQV3WEJUH352NTVLKEV2JM2RH266VPEM7EH5QLLI7ZZAALMLNUVN"
ADDRESS="germany.stellar.coinqvest.com:11625"
HISTORY="curl -sf https://germany.stellar.coinqvest.com/history/{0} -o {1}"

[[VALIDATORS]]
NAME="coinqvest_finland"
HOME_DOMAIN="www.coinqvest.com"
PUBLIC_KEY="GADLA6BJK6VK33EM2IDQM37L5KGVCY5MSHSHVJA4SCNGNUIEOTCR6J5T"
ADDRESS="finland.stellar.coinqvest.com:11625"
HISTORY="curl -sf https://finland.stellar.coinqvest.com/history/{0} -o {1}"

[[VALIDATORS]]
NAME="bootes"
HOME_DOMAIN="publicnode.org"
PUBLIC_KEY="GCVJ4Z6TI6Z2SOGENSPXDQ2U4RKH3CNQKYUHNSSPYFPNWTLGS6EBH7I2"
ADDRESS="bootes.publicnode.org"
HISTORY="curl -sf https://bootes-history.publicnode.org/{0} -o {1}"

[[VALIDATORS]]
NAME="hercules"
HOME_DOMAIN="publicnode.org"
PUBLIC_KEY="GBLJNN3AVZZPG2FYAYTYQKECNWTQYYUUY2KVFN2OUKZKBULXIXBZ4FCT"
ADDRESS="hercules.publicnode.org"
HISTORY="curl -sf https://hercules-history.publicnode.org/{0} -o {1}"

[[VALIDATORS]]
NAME="lyra"
HOME_DOMAIN="publicnode.org"
PUBLIC_KEY="GCIXVKNFPKWVMKJKVK2V4NK7D4TC6W3BUMXSIJ365QUAXWBRPPJXIR2Z"
ADDRESS="lyra.publicnode.org"
HISTORY="curl -sf https://lyra-history.publicnode.org/{0} -o {1}"

[[VALIDATORS]]
NAME="Blockdaemon_Validator_1"
HOME_DOMAIN="stellar.blockdaemon.com"
PUBLIC_KEY="GAAV2GCVFLNN522ORUYFV33E76VPC22E72S75AQ6MBR5V45Z5DWVPWEU"
ADDRESS="stellar-full-validator1.bdnodes.net"
HISTORY="curl -sf https://stellar-full-history1.bdnodes.net/{0} -o {1}"

[[VALIDATORS]]
NAME="Blockdaemon_Validator_2"
HOME_DOMAIN="stellar.blockdaemon.com"
PUBLIC_KEY="GAVXB7SBJRYHSG6KSQHY74N7JAFRL4PFVZCNWW2ARI6ZEKNBJSMSKW7C"
ADDRESS="stellar-full-validator2.bdnodes.net"
HISTORY="curl -sf https://stellar-full-history2.bdnodes.net/{0} -o {1}"

[[VALIDATORS]]
NAME="Blockdaemon_Validator_3"
HOME_DOMAIN="stellar.blockdaemon.com"
PUBLIC_KEY="GAYXZ4PZ7P6QOX7EBHPIZXNWY4KCOBYWJCA4WKWRKC7XIUS3UJPT6EZ4"
ADDRESS="stellar-full-validator3.bdnodes.net"
HISTORY="curl -sf https://stellar-full-history3.bdnodes.net/{0} -o {1}"

[[VALIDATORS]]
NAME = "FT_SCV_1"
HOME_DOMAIN = "www.franklintempleton.com"
PUBLIC_KEY = "GARYGQ5F2IJEBCZJCBNPWNWVDOFK7IBOHLJKKSG2TMHDQKEEC6P4PE4V"
ADDRESS = "stellar1.franklintempleton.com:11625"
HISTORY = "curl -sf https://stellar-history-usw.franklintempleton.com/azuswshf401/{0} -o {1}"

[[VALIDATORS]]
NAME = "FT_SCV_2"
HOME_DOMAIN = "www.franklintempleton.com"
PUBLIC_KEY = "GCMSM2VFZGRPTZKPH5OABHGH4F3AVS6XTNJXDGCZ3MKCOSUBH3FL6DOB"
ADDRESS = "stellar2.franklintempleton.com:11625"
HISTORY = "curl -sf https://stellar-history-usc.franklintempleton.com/azuscshf401/{0} -o {1}"

[[VALIDATORS]]
NAME = "FT_SCV_3"
HOME_DOMAIN = "www.franklintempleton.com"
PUBLIC_KEY = "GA7DV63PBUUWNUFAF4GAZVXU2OZMYRATDLKTC7VTCG7AU4XUPN5VRX4A"
ADDRESS = "stellar3.franklintempleton.com:11625"
HISTORY = "curl -sf https://stellar-history-ins.franklintempleton.com/azinsshf401/{0} -o {1}"
HTTP_PORT=11626
PUBLIC_HTTP_PORT=false

NETWORK_PASSPHRASE="Test SDF Network ; September 2015"

DATABASE="sqlite3://stellar.db"

# Stellar Testnet validators
[[HOME_DOMAINS]]
HOME_DOMAIN="testnet.stellar.org"
QUALITY="HIGH"

[[VALIDATORS]]
NAME="sdftest1"
HOME_DOMAIN="testnet.stellar.org"
PUBLIC_KEY="GDKXE2OZMJIPOSLNA6N6F2BVCI3O777I2OOC4BV7VOYUEHYX7RTRYA7Y"
ADDRESS="core-testnet1.stellar.org"
HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_001/{0} -o {1}"

[[VALIDATORS]]
NAME="sdftest2"
HOME_DOMAIN="testnet.stellar.org"
PUBLIC_KEY="GCUCJTIYXSOXKBSNFGNFWW5MUQ54HKRPGJUTQFJ5RQXZXNOLNXYDHRAP"
ADDRESS="core-testnet2.stellar.org"
HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_002/{0} -o {1}"

[[VALIDATORS]]
NAME="sdftest3"
HOME_DOMAIN="testnet.stellar.org"
PUBLIC_KEY="GC2V2EFSXN6SQTWVYA5EPJPBWWIMSD2XQNKUOHGEKB535AQE2I6IXV2Z"
ADDRESS="core-testnet3.stellar.org"
HISTORY="curl -sf http://history.stellar.org/prd/core-testnet/core_testnet_003/{0} -o {1}"

2. Create the config file for soroban

cd ~/.soroban/config/
soroban-rpc gen-config-file >> config.toml
# edit ~/.soroban/config.toml and uncomment and set to
NETWORK_PASSPHRASE="Public Global Stellar Network ; September 2015"
# update to ~/.stellar/config/core.toml
CAPTIVE_CORE_CONFIG_PATH=""
# update to ~/.stellar
CAPTIVE_CORE_STORAGE_PATH = ""
HISTORY_ARCHIVE_URLS = ["https://history.stellar.org/prd/core-live/core_live_001"]
STELLAR_CORE_BINARY_PATH = "/usr/local/bin/stellar-core"
# edit ~/.soroban/config.toml and uncomment and set to
NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
# update to ~/.stellar/config/core.toml
CAPTIVE_CORE_CONFIG_PATH=""
# update to ~/.stellar
CAPTIVE_CORE_STORAGE_PATH = ""
HISTORY_ARCHIVE_URLS = ["http://history.stellar.org/prd/core-testnet/core_testnet_001"]
STELLAR_CORE_BINARY_PATH = "/usr/local/bin/stellar-core"

2. Create a service

BINARY_NAME=soroban-rpc
CONFIG_PATH=$HOME/.soroban/config/config.toml
sudo tee <<EOF >/dev/null /etc/systemd/system/$BINARY_NAME.service
[Unit]
Description=$BINARY_NAME daemon
After=network-online.target

[Service]
User=$USER
ExecStart=$(which $BINARY_NAME) --config-path $CONFIG_PATH
Restart=always
RestartSec=3
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target
EOF


cat /etc/systemd/system/$BINARY_NAME.service

Start the services

sudo systemctl enable soroban-rpc
sudo systemctl daemon-reload
sudo systemctl restart soroban-rpc

Check logs

journalctl -u soroban-rpc.service -n 100 -f -o cat

Verify RPC

Once your soroban node is fully synced, you can run a cURL request to see the status of your node:

curl --location 'http://localhost:8000' --header 'Content-Type: application/json' --data '{
"jsonrpc":"2.0",
"id":2,
"method":"getHealth"
}' | jq

If the node is successfully synced, the output from above will print

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "status": "healthy",
    "latestLedger": 52909103,
    "oldestLedger": 52908928,
    "ledgerRetentionWindow": 17280
  }
}
Edit this page