Welcome to Barrenero’s documentation!¶
Overview¶
A set of services and tools for effective mining cryptocurrencies.
This projects aims to create a platform to develop and use cryptocurrency miners such as Ether, Storj… The main goal is to provide a flexible and robust set of services and tools for effective mining cryptocurrencies and performs real time checks over these miners.
Barrenero consists of following services:
- Miner
- Tools and scripts for mining cryptocurrencies. Code can be found in different repositories: ether, storj.
- API
- REST API for interacting with Barrenero. Code can be found in this repository.
- Telegram
- Telegram bot for Barrenero that serves information and provides interactive methods through Barrenero API. Code can be found in this repository.
- Telegraf
- Extension for Barrenero that harvests information and send it using Telegraf. Code can be found in this repository.
Code repository can be found in GitHub.
Help us Donating¶
This project is free and open sourced, you can use it, spread the word, contribute to the codebase and help us donating:
Ether: | 0x04BE4C8b74d2205b5fE2a31Ca18C670765feac7c |
---|---|
ADA: | addr1qxe963ree0zmdxtqypl7uvhtuvuzlxq6vrzm0lsrfsu53lffcradg5rrhf6q2wsuae4l4hrm8trlk278awztt82j8slsqz8uz5 |
Bitcoin: | 1Jtj2m65DN2UsUzxXhr355x38T6pPGhqiA |
PayPal: | barrenerobot@gmail.com |
Requirements¶
- Python 3.5 or newer. Download from official python site.
- Docker. Install following docker doc.
Update¶
Update services:
sudo ./make update
Configuration¶
To properly configure Barrenero you must configure each service that composes it.
Nvidia Overclock¶
Self-explained configuration parameters in nvdia.cfg file.
Miner¶
Self-explained configuration parameters in miner/<currency>.cfg file.
Telegram¶
Self-explained configuration parameters in telegram/setup.cfg file.
Telegraf¶
Self-explained configuration parameters in telegraf/setup.cfg file.
Contribute¶
Barrenero project is open to contributions, so if you find anything that can be improved, a bug that can be fixed or simply adds a new functionality, feel free to create a merge request or an issue.
Donate¶
This project is free and open sourced, you can use it, spread the word, contribute to the codebase and help us donating:
Ether: | 0x566d41b925ed1d9f643748d652f4e66593cba9c9 |
---|---|
Bitcoin: | 1Jtj2m65DN2UsUzxXhr355x38T6pPGhqiA |
PayPal: | barrenerobot@gmail.com |
Miner¶
API¶
Configuration¶
To properly configure Barrenero API you must define the following keys in .env file:
API superuser password¶
To create an API superuser password that allows users to do actions such restarting services you must define a password and encrypt it using Django tools:
from django.contrib.auth.hashers import make_password
password = make_password('foo_password')
You should put the result in DJANGO_API_SUPERUSER variable.
Resources¶
These are the resources exposed by Barrenero API.
Register User¶
Register a new user providing username, password, account and API password.
/api/v1/auth/register
- Username
- Name to register user
- Password
- Password to register user
- Account
- Ethereum wallet account, starting with 0x.
- API Password
- Password used to identify as a API superuser, that gives access to methods such restarting services.
{
"username": string,
"account": string,
"is_api_superuser": bool,
"token": string
}
Login User¶
Retrieve user token and user given username and password.
/api/v1/auth/user
- Username
- Name to register user
- Password
- Password to register user
{
"username": string,
"account": string,
"is_api_superuser": bool,
"token": string
}
Barrenero Status¶
Retrieve graphic cards and services status.
{
"graphics": [
{
"id": int,
"power": float,
"fan": int,
"gpu_usage": int,
"mem_usage": int,
"gpu_clock": int,
"mem_clock": int
}
],
"services": [
{
"name": "Ether",
"status": "active/inactive"
},
{
"name": "Storj",
"status": "active/inactive"
}
]
}
Restart Service¶
Restart a Barrenero service giving the name.
/api/v1/restart/
- Authorization
- Token <auth_token>
- name
- Barrenero service name to restart
{
"name": "Ether",
"status": "restarted"
}
Ether Miner Status¶
Retrieve Ether miner status.
{
"status": "active/inactive",
"hashrate": [
{
"graphic_card": int,
"hashrate": float
}
],
"nanopool": {
"balance": {
"confirmed": float,
"unconfirmed": float
},
"hashrate": {
"current": float,
"one_hour": float,
"three_hours": float,
"six_hours": float,
"twelve_hours": float,
"twenty_four_hours": float
},
"workers": [
{
"id": string,
"hashrate": float
}
],
"last_payment": {
"date": string,
"hash": string,
"value": float,
"confirmed": bool
}
}
}
Storj Miner Status¶
Retrieve Storj nodes status.
[
{
"id": string,
"status": string,
"config_path": string,
"uptime": string,
"restarts": int,
"peers": int,
"offers": int,
"data_received": int,
"delta": int,
"port": int,
"shared": string,
"shared_percent": int,
"response_time": float,
"reputation": int,
"version": string
}
]
Ethereum Wallet¶
Wallet status, including balance for each token and last transactions.
{
"tokens": {
"TOKEN_SYMBOL": {
"name": string,
"symbol": string,
"balance": float,
"price_usd": float,
"balance_usd": float
}
},
"transactions": [
{
"token": {
"name": string,
"symbol": string
},
"hash": string,
"source": string,
"destination": string,
"value": float,
"timestamp": string
}
]
}
Overview¶
API code can be found in this repository.
This service defines a lightweight REST API on top of Barrenero Miner, providing an easy and simple way to interact with all miners. This API exposes methods for:
- Query current machine status, such as active services, GPU stats…
- Query Ether miner and pool status.
- Restart Ether miner service.
- Query Storj miner status.
- Restart Storj miner service.
- Query Ethereum wallet value and last transactions.
Telegram¶
Overview¶
Telegram code can be found in this repository.
Telegram bot for Barrenero that serves information and provides interactive methods through Barrenero API.
This bot provides a real time interaction with Barrenero through its API, allowing a simple way to register an user in the API and link it to a Telegram chat. Once the registration is done, it’s possible to query for Barrenero status, restart services and performs any action allowed in the API.
Telegram¶
Overview¶
Telegraf code can be found in this repository.
Extension for Barrenero that harvests information and send it using Telegraf.
This extension provides an automatic way of harvesting Barrenero status through its API and send it through Telegraf.