Skip to content

Instantly share code, notes, and snippets.

View bensig's full-sized avatar
🚀
libre.org

Ben Sigman bensig

🚀
libre.org
View GitHub Profile
@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 / bashtools.sh
Created February 5, 2020 06:54
Bash tools
PROGNAME=${0##*/}
@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 / 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 / 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-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 / 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 / check_btcd_sync.sh
Last active October 30, 2021 09:51
simple script to check the bitcoin sync level of your btcd node
# simple script to check the bitcoin sync level of your btcd node
echo `btcctl -s localhost:8337 getbestblock|jq -r -c .height`/`curl -s https://blockchain.info/q/getblockcount 2>/dev/null`*100|bc -l
@bensig
bensig / install-btcd.sh
Last active June 21, 2021 06:09
install btcd using go
# install go
sudo snap install --classic go
mkdir ~/go
echo “export GOPATH=$HOME/go” >> .bashrc
echo “export PATH=$PATH:$GOROOT/bin:$GOPATH/bin” >> .bashrc
source .bashrc
# install btcd
cd $GOPATH/pkg/mod/github.com/btcsuite/btcd
GO111MODULE=on go install -v . ./cmd/...
@bensig
bensig / btcd.service
Last active July 4, 2021 02:24
btcd systemd service example
[Unit]
Description=Bitcoin Go daemon
After=network.target
[Service]
User=<username>
Group=<username>
PIDFile=/home/<username>/.btcd/btcd.pid
ExecStart=/home/<username>/go/bin/btcd
KillMode=process