Selenium based grass (app.getgrass.io) miner.
- I recommend to use docker-compose
- set environments in
docker-compose.yaml
first, anddocker compose up -d
- set environments in
- The app.getgrass.io server might be unstable, causing the error. You can fix the problem by retrying to run the programme several times.
- All environment variable values must be set.
GRASS_USER
- login id of app.grass.io
GRASS_PASSWORD
- login password of app.grass.io
GRASS_CRX_NAME
- extension crx file name in
./data
- Example
data └── grass-4.20.2.crx
GRASS_CRX_NAME=grass-4.20.2.crx
- extension crx file name in
GRASS_CRX_EXTENSION_ID
- Grass chrome extension id
- for example,
4.20.2
version extension id islkbnfiajjmbhnfledhphioinpickokdi
- You could get details at
chrome://extensions
with developer mode
To support community node extension, this app needs crx file.
- get from app.getgrass.io
- direct link (4.20.2, Linux)
- You have to unzip the file.
$ curl -o ./data/grass.zip https://files.getgrass.io/file/grass-extension-upgrades/extension-latest/grass-community-node-linux-4.20.2.zip
$ cd ./data
$ unzip grass.zip -d .
The extension file must be located in ./data
directory.
.
├── data
│ └── grass-4.20.2.crx <-- MUST BE HERE
├── Dockerfile
└── ...
If you use docker files in this repository, you can map the volume to /app/data
use .env file. see .env.sample
To check the status of a node, you can get the 'network quality' and 'epoch earning' values through the API.
- It supports prometheus metric.
grass_network_quality
- Gauge
grass_node_earnings
- Gauge
grass_time_connected
- Gauge
- converted in minutes.
/metrics
... some python metrics...
# TYPE grass_network_quality gauge
grass_network_quality{node_name="NODE_NAME"} 0.0
# HELP grass_node_earnings Grass node earnings metrics
# TYPE grass_node_earnings gauge
grass_node_earnings{node_name="NODE_NAME"} 0.0
# HELP grass_time_connected Grass node time connected metrics
# TYPE grass_time_connected gauge
grass_time_connected{node_name="NODE_NAME"} 0.0
- To get metrics in json, request
GET /status
RESPONSE
{
"node_name": "node_name",
"time_connected": 12354.0,
"network_quality": 100.0,
"node_earnings": 1347.0
}