Node server for Reflector, decentralized Stellar price feed oracle
Check architecture and general concepts overview to learn what's inside and how it works.
- Build and deploy Reflector Oracle contract.
- Create a multisig account to protect the contract. Ensure that each signer corresponds to a distinct Reflector cluster node and master weight is set to 0.
Prepare app.config.json
file and save it to the home
directory which will be utilized by Reflector node.
{
"secret": "SA5G...1DKG", //secret key of the node
"port": 30347,
"dataSources": {
"pubnet": {
"name": "pubnet",
"type": "db",
"sorobanRpc": ["http://172.16.5.4:8003/", "https://stellar-rpc.local/"],
}
}
}
Where:
secret
(string) - node secret key (should be unique for every node in the cluster)dataSources
(settings[]) - price data sources configurationdbSyncDelay
(number) - [optional] delay in seconds for database synchronization, should be identical for all nodes in the cluster (15)port
(number) - [optional] TCP port for inbound connections (30347)trace
(true|false) - [optional] detailed events tracing (false)handshakeTimeout
(number) - [optional] timeout to drop hanging incoming node connections
If you are joining the existing cluster, ask other node operators to share their basic config params, then override secret
and data sources configuration parameters.
Docker configurations to run Reflector node Docker image.
Prerequisites:
- Docker
Example startup script:
docker run -it -d --network host \
-p 30347:30347 \
-v "REFLECTOR_WORKDIR:/reflector-node/app/home" \
--name=reflector-node \
reflectornet/reflector-node:latest
REFLECTOR_WORKDIR
- path to the working directory where Reflector will store config and logs
30347
: WebSocket port for inter-cluster communication
- Reflector working directory, e.g.
REFLECTOR_WORKDIR:/reflector-node/app/home
- Pull the latest docker image from Docker Hub
docker pull reflectornet/reflector-node:latest
- Stop current node container
docker stop {container_id_or_name}
- Remove current container
docker rm {container_id_or_name}
- Start new container
Use the same startup command for the updated container (general startup command format is described above)
Prerequisites:
- NodeJS 18+
- Checkout this repository
git checkout [email protected]:reflector-network/reflector-node.git
- Install dependencies
npm i
- Start Reflector node
npm run start
Admin Dashboard is a GUI that simplifies common administrative tasks, monitoring, and management of Reflector nodes.
Check admin guide for a short 101 course on node administration.