Waitman Gobble

2020-10-15 11:28 am

I found some issues with documentation, here are some notes if you want to set up a Stellar validator node and Horizon API. I used Alpine Linux but should work on systems.



apk add alpine-sdk
apk add bash
apk add bash-completion
apk add postgresql
apk add postgresql-dev
apk add go
apk add bison
apk add flex
apk add pkgconfig
apk add perl
apk add clang
apk add autoconf
apk add automake
apk add libtool
apk add linux-headers
apk add git
apk add mercurial
apk add aws-cli


u:~# cat .bashrc 
export GOROOT=/usr/lib/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

# source .



git clone https://github.com/stellar/stellar-core.git
(then checkout prod branch)

git checkout prod
git pull
git submodule init
git submodule update

build stellar-core
# ./autogen.sh
# ./configure
# ./make -j4

(stellar-core will be /root/stellar-core/src/stellar-core)


for horizon, run latest release, not dev
wget https://github.com/stellar/go/archive/horizon-v1.6.0.tar.gz
extract and cd then
go install github.com/stellar/go/services/horizon


then cp go/bin/horizon /usr/local/bin/



Set up postgres
#su postgres
#psql

CREATE DATABASE horizon; CREATE USER horizon WITH encrypted password 'assword'; grant all privileges on database horizon to horizon;
CREATE DATABASE stellar; CREATE USER stellar WITH encrypted password 'assword'; grant all privileges on database stellar to stellar;


create stellar.cfg: (use your own domain instead of obitcoin.org)
create your private/pub key (private key starts with S and pub starts with G, in 'node seed' enter the S key (private))

# ./stellar-core gen-seed


u:~# cat /etc/stellar.cfg 
METADATA_OUTPUT_STREAM=""
PEER_PORT=11625
LOG_FILE_PATH="/var/log/stellar/stellar-core.log"
BUCKET_DIR_PATH="/var/lib/stellar/buckets"
HTTP_PORT=11626
PUBLIC_HTTP_PORT=false
CATCHUP_COMPLETE=true
TARGET_PEER_CONNECTIONS=35
MAX_ADDITIONAL_PEER_CONNECTIONS=100

AUTOMATIC_MAINTENANCE_PERIOD=3600
AUTOMATIC_MAINTENANCE_COUNT=18000

COMMANDS=["ll?level=info"]

DATABASE="postgresql://dbname=stellar user=stellar password=assword host=127.0.0.1 sslmode=disable"

NETWORK_PASSPHRASE="Public Global Stellar Network ; September 2015"

UNSAFE_QUORUM=true

INVARIANT_CHECKS=[
".*"]

# validator-01
NODE_IS_VALIDATOR=true
# full validators require a NODE_SEED
# generate a seed `stellar-core gen-seed`
# uncomment and replace with your own seed
NODE_SEED="YOU_NODE_SEED local"
NODE_HOME_DOMAIN="obitcoin.org"

# PREFERRED_PEERS_ONLY=true

[HISTORY.local]
get="cp /www/obitcoin/{0} {1}"
put="cp {0} /www/obitcoin/{1}"
mkdir="mkdir -p /www/obitcoin/{0}"
#get="aws s3 cp --region eu-west-1 s3://history.example.com/validator-01/{0} {1}"
#put="aws s3 cp --region eu-west-1 {0} s3://history.example.com/validator-01/{1}"

[[HOME_DOMAINS]]
HOME_DOMAIN = "obitcoin.org"
QUALITY="MEDIUM"

[[HOME_DOMAINS]]
HOME_DOMAIN="www.stellar.org"
QUALITY="HIGH"

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

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

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

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

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

[[HOME_DOMAINS]]
HOME_DOMAIN="wirexapp.com"
QUALITY="HIGH"

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

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

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

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

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

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

[[VALIDATORS]]
NAME="LOBSTR_1_Europe"
HOME_DOMAIN="lobstr.co"
PUBLIC_KEY="GCFONE23AB7Y6C5YZOMKUKGETPIAJA4QOYLS5VNS4JHBGKRZCPYHDLW7"
ADDRESS="v1.stellar.lobstr.co"
HISTORY="curl -sf https://stellar-archive-1-lobstr.s3.amazonaws.com/{0} -o {1}"

[[VALIDATORS]]
NAME="LOBSTR_2_Europe_"
HOME_DOMAIN="lobstr.co"
PUBLIC_KEY="GDXQB3OMMQ6MGG43PWFBZWBFKBBDUZIVSUDAZZTRAWQZKES2CDSE5HKJ"
ADDRESS="v2.stellar.lobstr.co"
HISTORY="curl -sf https://stellar-archive-2-lobstr.s3.amazonaws.com/{0} -o {1}"

[[VALIDATORS]]
NAME="LOBSTR_3_North_America"
HOME_DOMAIN="lobstr.co"
PUBLIC_KEY="GD5QWEVV4GZZTQP46BRXV5CUMMMLP4JTGFD7FWYJJWRL54CELY6JGQ63"
ADDRESS="v3.stellar.lobstr.co"
HISTORY="curl -sf https://stellar-archive-3-lobstr.s3.amazonaws.com/{0} -o {1}"

[[VALIDATORS]]
NAME="LOBSTR_4_Asia"
HOME_DOMAIN="lobstr.co"
PUBLIC_KEY="GA7TEPCBDQKI7JQLQ34ZURRMK44DVYCIGVXQQWNSWAEQR6KB4FMCBT7J"
ADDRESS="v4.stellar.lobstr.co"
HISTORY="curl -sf https://stellar-archive-4-lobstr.s3.amazonaws.com/{0} -o {1}"

[[VALIDATORS]]
NAME="LOBSTR_5_Australia"
HOME_DOMAIN="lobstr.co"
PUBLIC_KEY="GA5STBMV6QDXFDGD62MEHLLHZTPDI77U3PFOD2SELU5RJDHQWBR5NNK7"
ADDRESS="v5.stellar.lobstr.co"
HISTORY="curl -sf https://stellar-archive-5-lobstr.s3.amazonaws.com/{0} -o {1}"

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

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

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

[[VALIDATORS]]
NAME="keybase.io"
HOME_DOMAIN="keybase.io"
PUBLIC_KEY="GCWJKM4EGTGJUVSWUJDPCQEOEP5LHSOFKSA4HALBTOO4T4H3HCHOM6UX"
ADDRESS="stellar0.keybase.io"
HISTORY="curl -sf https://stellarhistory.keybase.io/{0} -o {1}"

[[VALIDATORS]]
NAME="keybase1"
HOME_DOMAIN="keybase.io"
PUBLIC_KEY="GDKWELGJURRKXECG3HHFHXMRX64YWQPUHKCVRESOX3E5PM6DM4YXLZJM"
ADDRESS="stellar1.keybase.io"
HISTORY="curl -sf https://stellarhistory1.keybase.io/{0} -o {1}"

[[VALIDATORS]]
NAME="keybase2"
HOME_DOMAIN="keybase.io"
PUBLIC_KEY="GA35T3723UP2XJLC2H7MNL6VMKZZIFL2VW7XHMFFJKKIA2FJCYTLKFBW"
ADDRESS="stellar2.keybase.io"
HISTORY="curl -sf https://stellarhistory2.keybase.io/{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="wirexUS"
ADDRESS="us.stellar.wirexapp.com"
HOME_DOMAIN="wirexapp.com"
PUBLIC_KEY="GDXUKFGG76WJC7ACEH3JUPLKM5N5S76QSMNDBONREUXPCZYVPOLFWXUS"
HISTORY="curl -sf http://wxhorizonusstga1.blob.core.windows.net/history/{0} -o {1}"

[[VALIDATORS]]
NAME="wirexUK"
ADDRESS="uk.stellar.wirexapp.com"
HOME_DOMAIN="wirexapp.com"
PUBLIC_KEY="GBBQQT3EIUSXRJC6TGUCGVA3FVPXVZLGG3OJYACWBEWYBHU46WJLWXEU"
HISTORY="curl -sf http://wxhorizonukstga1.blob.core.windows.net/history/{0} -o {1}"

[[VALIDATORS]]
NAME="wirexSG"
ADDRESS="sg.stellar.wirexapp.com"
HOME_DOMAIN="wirexapp.com"
PUBLIC_KEY="GAB3GZIE6XAYWXGZUDM4GMFFLJBFMLE2JDPUCWUZXMOMT3NHXDHEWXAS"
HISTORY="curl -sf http://wxhorizonasiastga1.blob.core.windows.net/history/{0} -o {1}"


(first run stellar-core with 'new-db' and then 'new-hist', then 'run')
# cd /root/stellar-core; ./src/stellar-core --conf=/etc/stellar.cfg run >/dev/null 2>&1 &



(first run horizon with 'db init', then 'serve')

# horizon --db-url=postgresql://horizon:assword@127.0.0.1/horizon?sslmode=disable --stellar-core-db-url=postgresql://stellar:assword@127.0.0.1/stellar?sslmode=disable --stellar-core-url=http://127.0.0.1:11626 --log-file=/var/log/stellar/horizon.log --network-passphrase="Public Global Stellar Network ; September 2015" --ingest=true --history-archive-urls=https://history.stellar.org/prd/core-live/core_live_001,http://history.stellar.org/prd/core-live/core_live_002/,http://history.stellar.org/prd/core-live/core_live_003/ serve > /dev/null 2>&1 &

note: don't use --stellar-core-binary-path
Copyright 2020 Waitman Gobble. Contact