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/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' ) |
#!/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################## |
##########GRAPH-NODE######## | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -; \ | |
sudo bash -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'; \ | |
sudo apt-get update && sudo apt-get upgrade -y; \ | |
sudo apt-get install -y clang libpq-dev libssl-dev pkg-config; \ | |
sudo apt-get install -y gnupg gnupg2 snapd git postgresql-12 postgresql-client-12 nodejs screen httpie ufw; \ | |
curl https://sh.rustup.rs -sSf | sh | |
source $HOME/.cargo/env | |
sudo snap install ipfs |
########ETH-NODE######## | |
apt-get update; \ | |
apt-get upgrade -y; \ | |
apt-get install nginx -y; \ | |
rm /etc/nginx/sites-enabled/*; \ | |
nano /etc/nginx/sites-enabled/ether.conf | |
#Туда вот это ничего не меняя. | |
/начало файла |
#!/bin/bash | |
set -e | |
vote_account="/root/solana/vote-account-keypair.json" | |
identity_account="/root/solana/validator-keypair.json" | |
new_stake="/root/solana/validator-stake-keypair-$(printf '%(%Y-%m-%d)T').json" | |
min_vote_balance=100 | |
available_for_withdraw=$(solana balance $vote_account | awk -F\. '{print $1}') | |
re='^[0-9]+$' | |
if ! [[ $available_for_withdraw =~ $re ]] ; then |