GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - orcfax/collector-node: Orcfax simplified collector node

BranchesTags
Open more actions menu

Latest commit

 

History

53 Commits
53 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
requirements
requirements
 
 
services
services
 
 
src/collector_node
src/collector_node
 
 
startup
startup
 
 
.codespellrc
.codespellrc
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.markdownlint.yaml
.markdownlint.yaml
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
.pylintrc
.pylintrc
 
 
.ruff.toml
.ruff.toml
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
collector.py
collector.py
 
 
pyproject.toml
pyproject.toml
 
 
pytest.ini
pytest.ini
 
 
tox.ini
tox.ini
 
 
validator.env
validator.env
 
 

Repository files navigation

Collector Node

A simplified collector node concept from Orcfax. Original documentation available to maintainers can be found: here.

An Orcfax collector node now:

  • Uses cron to request price-feed data every 1x minute.
  • Via this Python script requests the price-feed data via Orcfax's enhanced version of Chronicle Labs gofer.
  • Parses the results from gofer and send the results to a validator web-socket.

Node install

A small recipe for installation on a collector node machine.

NB. the following assumes we're in the home folder root, i.e. ~/. and a username of orcfax, i.e. /home/orcfax/.

Create a collector directory

mkdir -p collector && cd collector

Download this script

wget https://raw.githubusercontent.com/orcfax/collector-node/main/collector.py -O collector.py
wget https://raw.githubusercontent.com/orcfax/collector-node/main/requirements/requirements.txt -O requirements.txt

Create a virtual environment

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

Download and initialize node-id

wget https://github.com/orcfax/node-id/releases/download/0.0.1/node-id_0.0.1_Linux_x86_64 -O node-id
chmod +x node-id
./node-id -w ""

NB. the -w argument is legacy and replaced with the use of validator.env in this repository.

Download gofer

wget https://github.com/orcfax/oracle-suite/releases/download/0.0.1/gofer_0.0.1_Linux_x86_64 -O gofer
chmod +x gofer

Edit crontab

Open crontab

crontab -e

Amend the file with the following

# Required.
ORCFAX_VALIDATOR=
NODE_IDENTITY_LOC=
NODE_SIGNING_KEY=
CNT_DB_NAME=
OGMIOS_URL=
# Optional.
OGMIOS_VERSION=v6

* * * * * /home/orcfax/collector/venv/bin/python /home/orcfax/collector/collector.py 2>&1 | logger -t orcfax_collector

NB. crontab will read the environment variable from its own context when it is set there.

Congratulations

The collector node should be installed. You can view log output in the syslog.

sudo tail -f /var/log/syslog | grep orcfax_collector

Developer install

pip

Setup a virtual environment venv and install the local development requirements as follows:

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

Upgrade dependencies

A make recipe is included, simply call make upgrade. Alternatively run pip-upgrader once the local requirements have been installed and follow the prompts. requirements.txt and local.txt can be updated as desired.

tox

Run tests (all)

python -m tox

Run tests-only

python -m tox -e py3

Run linting-only

python -m tox -e linting

pre-commit

Pre-commit can be used to provide more feedback before committing code. This reduces reduces the number of commits you might want to make when working on code, it's also an alternative to running tox manually.

To set up pre-commit, providing pip install has been run above:

  • pre-commit install

This repository contains a default number of pre-commit hooks, but there may be others suited to different projects. A list of other pre-commit hooks can be found here.

Packaging

The Makefile contains helper functions for packaging and release.

Makefile functions can be reviewed by calling make from the root of this repository:

help                           Print this help message
pre-commit-checks              Run pre-commit-checks.
tar-source                     Package repository as tar for easy distribution
upgrade                        Upgrade project dependencies

About

Orcfax simplified collector node

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

3 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.