Skip to content

Instantly share code, notes, and snippets.

View dmytrostriletskyi's full-sized avatar

Dmytro Striletskyi dmytrostriletskyi

View GitHub Profile
wget https://github.com/EOSIO/eos/releases/download/v1.7.4/eosio_1.7.4-1-ubuntu-16.04_amd64.deb && \
sudo apt install ./eosio_1.7.4-1-ubuntu-16.04_amd64.deb && \
mkdir contracts && cd contracts && \
keosd --http-server-address=0.0.0.0:9559 &
nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::http_plugin \
--plugin eosio::history_plugin --plugin eosio::history_api_plugin --http-server-address=0.0.0.0:8888 \
--access-control-allow-origin='*' --contracts-console --http-validate-host=false \
--verbose-http-errors >> nodeos.log 2>&1 &
#!/bin/bash
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common make -y && \
sudo sh -c "echo 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment" && \
echo "REMME_CORE_RELEASE=$2" >> ~/.bashrc && \
echo "NODE_IP_ADDRESS=$1" >> ~/.bashrc && \
cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$2.tar.gz | sudo tar zx && \
cd remme-core-$2 && \
sudo -i sed -i "s@80@3333@" /home/remme-core-$2/docker/compose/admin.yml && \
sudo -i sed -i "[email protected]@$1@" /home/remme-core-$2/config/network-config.env && \
#!/bin/bash
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common make -y && \
sudo sh -c "echo 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment" && \
echo "REMME_CORE_RELEASE=$2" >> ~/.bashrc && \
echo "NODE_IP_ADDRESS=$1" >> ~/.bashrc && \
cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$2.tar.gz | sudo tar zx && \
cd remme-core-$2 && \
sudo -i sed -i "s@80@3333@" /home/remme-core-$2/docker/compose/admin.yml && \
sudo -i sed -i "[email protected]@$1@" /home/remme-core-$2/config/network-config.env && \
#!/bin/bash
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common make -y && \
sudo sh -c "echo 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment" && \
echo "REMME_CORE_RELEASE=$2" >> ~/.bashrc && \
echo "NODE_IP_ADDRESS=$1" >> ~/.bashrc && \
cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$2.tar.gz | sudo tar zx && \
cd remme-core-$2 && \
sudo -i sed -i "s@80@3333@" /home/remme-core-$2/docker/compose/admin.yml && \
sudo -i sed -i "[email protected]@$1@" /home/remme-core-$2/config/network-config.env && \
[2019-05-20 16:50:35.236 DEBUG handler] Set policy :
name: "node_account_permissions_policy"
entries {
type: PERMIT_KEY
key: "037426e20b4ab14717d4483e2b56923a86b20a25ea8fdd1af2576de170b32768e1"
}
entries {
type: PERMIT_KEY
key: "03d1ec76ec167630a995bc4e6da52611eb4614ce5f2a4d7eae35467e7568ae56ca"
}
remme-tp:
[16:50:35.174 [MainThread] consensus_account INFO] Sending rewards...
[16:50:35.188 [MainThread] consensus_account INFO] Payng rewards. Unfrozen: 4600; frozen: 4400; signer: 1168295d5fdee716dd7561a14c5a9a408049409d8a36c5b74114c5f998c9eea26291e3; reward: 10000; unfrozen share: 0.4600; frozen share: 0.4400
[16:50:35.215 [MainThread] obligatory_payment INFO] Obligatory payment total: 2.0000
[16:50:35.252 [MainThread] bet WARNING] Bet is zero, detailed: block_cost=0; signer_node_address=1168295d5fdee716dd7561a14c5a9a408049409d8a36c5b74114c5f998c9eea26291e3; min=True; fixed_amount=0; max=False;
[16:50:35.252 [MainThread] bet INFO] Doing bet of size 0
[16:50:35.298 [MainThread] consensus_account INFO] Sending rewards...
[16:50:35.317 [MainThread] consensus_account INFO] Payng rewards. Unfrozen: 4600; frozen: 4400; signer: 1168295d5fdee716dd7561a14c5a9a408049409d8a36c5b74114c5f998c9eea26291e3; reward: 10000; unfrozen share: 0.4600; frozen share: 0.4400
[16:50:35.347 [MainThread] obligatory_payment INFO] O
#!/bin/bash
sudo rm -rf /home/remme-core-$1 && \
sudo docker rm $(sudo docker ps -a -q) -f && \
sudo docker rmi $(sudo docker images -q) -f && \
sudo sed -i '/REMME_CORE_RELEASE/d' ~/.bashrc && \
echo "REMME_CORE_RELEASE=$2" >> ~/.bashrc && \
cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$2.tar.gz | sudo tar zx && \
cd remme-core-$2 && \
sudo -i sed -i "s@80@3333@" /home/remme-core-$2/docker/compose/admin.yml && \
#!/bin/bash
if [ "$1" = "0.10.0-alpha" ]; then
cd /home/remme-core-$1
make stop
make clean_chain_data
make run_bg_user
else
echo "$1"
curl https://gist.githubusercontent.com/dmytrostriletskyi/ddb0d8fc16512523f4942a2d60b57c63/raw/63de05cc7f68801bb6887fc07463422810276a10/upgrade-node.sh > ~/upgrade-node.sh
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
map $http_upgrade $connection_upgrade {
#!/bin/bash
echo "Fetch the number of block on $1:"
curl --silent -X POST http://$1/rpc/ -H 'Content-Type: application/json' -d \
'{"jsonrpc":"2.0","id":"11","method":"get_block_number","params":{}}' | python3 -m json.tool
echo "Fetch the number of block on $2:"
curl --silent -X POST http://$2:8080 -H 'Content-Type: application/json' -d \
'{"jsonrpc":"2.0","id":"11","method":"get_block_number","params":{}}' | python3 -m json.tool