⛓️Oracle

This installation is exclusive to those who installed it from me. Those who install it elsewhere may get errors.

➡️ Prerequisites

sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential
sudo apt -qy upgrade
sudo apt-get update && apt-get install -y libssl-dev
sudo apt update
sudo apt install python3.10
sudo apt install python3.10-venv

➡️ Installation Steps

cd $HOME
rm -rf symphony
git clone https://github.com/Orchestra-Labs/symphony
cd symphony
git checkout v0.4.1
make build
cd $HOME
git clone https://github.com/cmancrypto/symphony-oracle-voter.git
cd symphony-oracle-voter
git checkout v0.0.4r1

If you are going to use your own RPC/API, you need to change indexer = "kv" in /root/.symphonyd/config/config.toml

Don't forget to write your symphony address and valoper address.

1. Option --default-- (keyring_back_end = os)

cat <<EOF > .env
VALIDATOR_ADDRESS= symphonyvaloperxxx
VALIDATOR_ACC_ADDRESS= symphonyxxx
KEY_PASSWORD= walletpassword
SYMPHONY_LCD= https://symphony-api.kleomedes.network #or http://localhost:35317 defaultport 1317
TENDERMINT_RPC= https://symphony-rpc.kleomedes.network #or http://localhost:35657 defaultport 26657
EOF

2. Option --my guide-- (keyring_back_end = test)

sed -i 's/keyring_back_end = os.getenv("KEY_BACKEND","os")/keyring_back_end = os.getenv("KEY_BACKEND","test")/' /root/symphony-oracle-voter/config.py
cat <<EOF > .env
VALIDATOR_ADDRESS= symphonyvaloperxxx
VALIDATOR_ACC_ADDRESS= symphonyxxx
SYMPHONY_LCD= https://symphony-api.kleomedes.network #or http://localhost:35317 defaultport 1317
TENDERMINT_RPC= https://symphony-rpc.kleomedes.network #or http://localhost:35657 defaultport 26657
EOF

➡️ You can proceed after choosing Option 1 or Option 2

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
deactivate

➡️ Service File

sudo tee /etc/systemd/system/oracle.service > /dev/null << EOF
[Unit]
Description=Symphony Oracle
After=network.target

[Service]
# Environment variables
Environment="SYMPHONYD_PATH=/root/symphony/build/symphonyd"
Environment="PYTHON_ENV=production"
Environment="LOG_LEVEL=INFO"
Environment="DEBUG=false"

# Service configuration
Type=simple
User=root
WorkingDirectory=/root/symphony-oracle-voter/
ExecStart=/root/symphony-oracle-voter/venv/bin/python3 -u /root/symphony-oracle-voter/main.py
Restart=always
RestartSec=3
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable oracle.service
sudo systemctl start oracle.service
sudo journalctl -u oracle -f -o cat

If you encounter any issues, check the service logs for more detailed error messages:

sudo journalctl -u oracle.service -n 50 --no-pager

Last updated