Skip to content

Instantly share code, notes, and snippets.

View bensig's full-sized avatar
🚀
bitcoinlibre.io

Ben Sigman bensig

🚀
bitcoinlibre.io
View GitHub Profile
@bensig
bensig / check_bitcoind_sync.sh
Last active October 30, 2021 10:34
Check bitcoind sync level
# simple script to check the bitcoin sync level of your bitcoind node
echo `bitcoin-cli getblockcount 2>&1`/`curl -s https://blockchain.info/q/getblockcount 2>/dev/null`*100|bc -l
@bensig
bensig / install-neutrino.sh
Created June 20, 2021 23:36
installing neutrino like a boss
# clone neutrino
mkdir -d ~/go/pkg/neutrino
git clone https://github.com/lightninglabs/neutrino.git ~/neutrino
make all
@bensig
bensig / install-lnd.sh
Last active June 20, 2021 23:27
Installing LND like a boss
# install go
sudo snap install --classic go
# Create a 'go' directory in your home directory:
mkdir ~/go
# set GO PATH and PATH
echo "export GOPATH=$HOME/go" >> .bashrc
echo "export PATH=$PATH:$GOROOT/bin:$GOPATH/bin" >> .bashrc
source .bashrc
@bensig
bensig / install-bitcoind.sh
Last active June 20, 2021 22:25
Compile and install bitcoind like a boss
# installing bitcoind like a boss on Ubuntu 20.04.2 LTS \n \l
# Update & Upgrade the System
sudo apt-get update
sudo apt-get upgrade
# Install dependencies there might be more based on your system
# However below instructions are for the fresh Ubuntu install/server
# Please carefully watch the logs because if something could not be install
# You have to make sure it is installed properly by trying the command or that particular
@bensig
bensig / eosio_bp_hardware
Last active April 11, 2021 06:31
EOSIO Block Producer Hardware Recommendations
There are a few roles for servers - API, P2P, HYPERION, and PRODUCER
# Producer Role
EOSIO block producers are mostly single threaded for processing transactions.
...so normally I would never recommend using desktop hardware in place of server hardware, but in the case of producer nodes where clockspeed is king and you can mitigate risk by running a failover node - it's not THAT bad.
You might use a Z490 PRIME mobo with a i9-10900k, water cooling, and 32GB RAM (can't use ECC ram. another drawback to using desktop hardware.)
I'd recommend a enterprise SSD
1 out of 6 EVO SSDs have failed completely
@bensig
bensig / bashtools.sh
Created February 5, 2020 06:54
Bash tools
PROGNAME=${0##*/}
@bensig
bensig / haproxy.cfg
Created November 15, 2019 00:17
haproxy config for P2P proxy using wireguard for EOS seed nodes
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 4096
@bensig
bensig / nodeos-stop.sh
Created August 5, 2019 22:49
EOS nodeos stop script
#!/bin/bash
NODEOS=/home/ubuntu/src/wax-blockchain/build/programs/nodeos/nodeos
DATADIR=/home/ubuntu/eos/wax/node
GENESIS=/home/ubuntu/eos/wax/genesis.json
if [ -f $DATADIR"/nodeos.pid" ]; then
pid=$(cat $DATADIR"/nodeos.pid")
echo $pid
kill $pid
rm -r $DATADIR"/nodeos.pid"
@bensig
bensig / nodeos-start.sh
Created August 5, 2019 22:48
EOS nodeos start script with variables
#!/bin/bash
NODEOS=~/src/eos/build/programs/nodeos/nodeos
DATADIR=~/node
GENESIS=~/src/eos/genesis.json
CONFIG="config.ini"
$DATADIR/stop.sh || true
TIMESTAMP=$(/bin/date +%s)
$NODEOS --data-dir $DATADIR --config-dir $DATADIR -c $CONFIG "$@" >> $DATADIR/stdout.txt 2>> $DATADIR/eos-$TIMESTAMP.log & echo $! > $DATADIR/nodeos.pid
/usr/bin/unlink $DATADIR/eos.log
/bin/ln -s $DATADIR/eos-$TIMESTAMP.log $DATADIR/eos.log
#hapi
plugin = eosio::http_plugin
filter-on=*
filter-out=eosio:onblock:
history-index-state-db-size-mb = 32768
history-state-db-size-mb = 32768
history-per-account = 100
history-dir = history
history-index-dir = index