On localhost initiliaze the node with
ENTITY_DIR=/localhostdir/entity
ENTITY_ID=`cat $ENTITY_DIR/entity.json | jq -r .id`
mkdir -p /localhostdir/node-consensusrpc
cd /localhostdir/node-consensusrpc
oasis-node registry node init \
source https://habr.com/ru/articles/731608/ | |
wget https://github.com/XTLS/Xray-core/releases/download/v1.8.6/Xray-linux-64.zip | |
mkdir /opt/xray | |
unzip ./Xray-linux-64.zip -d /opt/xray | |
chmod +x /opt/xray/xray | |
nano /usr/lib/systemd/system/xray.service | |
# (пример ниже) |
[servers] | |
YOUR-IP | |
[all:vars] | |
ansible_ssh_common_args='-o StrictHostKeyChecking=no' | |
ansible_python_interpreter='/usr/bin/python3' | |
prometheus_source_ip='PROMETHEUS-IP' | |
systemd_path='/etc/systemd/system' | |
default_ssh_user='ubuntu' | |
default_ssh_port='22' |
#!/bin/sh | |
# Network data Script by Jonas Keidel 2012 | |
LANG=C | |
echo "Network data:" | |
for i in $(ifconfig -a | egrep '^eth.+|^en.+|^eno.+' | cut -d ':' -f 1); do | |
# detect link | |
link=$(ethtool $i | grep "Link detected" | tr -s ' ' | cut -d: -f2) | |
# get mac address |
#!/bin/bash | |
set -e | |
export PATH="/root/.local/share/solana/install/active_release/bin:$PATH" | |
TEXTFILE_COLLECTOR_DIR=/var/lib/prometheus/node-exporter | |
FILENAME=solana_active_stake.prom | |
metrics_prefix=solana_monit_mainnet | |
ALL=$(timeout 45 solana validators --output json | jq -r '.currentValidators[] |[.identityPubkey, .activatedStake/1000000000] | @csv' ) |
Utils collection
Check next epoch stake
curl -sL https://gist.githubusercontent.com/AGx10k/e001f79e64a2440c406e9d0839ea0698/raw/sol_stake_next.sh | bash -s -- $(solana-keygen pubkey $HOME/solana/vote-account-keypair.json)
Check vote balance
solana balance $HOME/solana/vote-account-keypair.json
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
#!/bin/bash | |
GO_VERSION="1.15.2" | |
cd /tmp/ \ | |
&& wget -q https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz \ | |
&& rm -rf /usr/local/go && tar -C /usr/local -xzf go*.tar.gz \ | |
&& rm go$GO_VERSION*.gz | |
echo "Creating default Go folders" | |
mkdir -p $HOME/go/bin |
#!/bin/bash | |
remote_height=$(curl -s https://api.blockcypher.com/v1/eth/main | jq .height) | |
local_height=$(($(curl -sX POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://127.0.0.1:8545 | jq -r .result))) | |
re='^[0-9]+$' | |
if ! [[ $remote_height =~ $re ]] ; then | |
echo "error: remote_height is not a number" >&2; exit 1 | |
fi |
#####GRAPH-NODE###### | |
#####NPM INSTALL##### | |
sudo apt update && \ | |
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash - && \ | |
sudo apt -y install nodejs && \ | |
sudo apt install -y libsecret-1-dev && \ | |
nodejs -v && \ | |
npm version | |
####DATABASE-SERVER################## |