committed by
GitHub
122 changed files with 1332 additions and 8 deletions
@ -0,0 +1,10 @@ |
|||||
|
### Notary Instructions: |
||||
|
Start VM |
||||
|
Run `sync_ramdisk` and let it finish: 20 mins currently. |
||||
|
Run `start` wait for KMD to start. |
||||
|
Run `startassets` wait for all AC to start. |
||||
|
Run `resetALLwallet` |
||||
|
Import privkey to VRSC. |
||||
|
Run m_notary or m_notary_run (depends if iguana needs recompile) |
||||
|
Once Iguana started, run `cron_splitfunds` |
||||
|
Then run `dpowassets` from komodo/src |
@ -0,0 +1,2 @@ |
|||||
|
#!/bin/bash |
||||
|
curl --silent --url "http://127.0.0.1:7776" --data "{\"coin\":\""${1}"\",\"agent\":\"iguana\",\"method\":\"splitfunds\",\"satoshis\":\"10000\",\"sendflag\":1,\"duplicates\":"${2}"}" |
@ -0,0 +1,2 @@ |
|||||
|
#!/bin/bash |
||||
|
komodo-cli -ac_name=${@} |
@ -0,0 +1,16 @@ |
|||||
|
#!/bin/bash |
||||
|
declare -a skip=("BEER" "PIZZA") |
||||
|
args="${@}" |
||||
|
delay=0.5 |
||||
|
|
||||
|
~/komodo/src/listassetchains | while read chain; do |
||||
|
if [[ " ${skip[@]} " =~ " ${chain} " ]]; then |
||||
|
pointless=0 |
||||
|
else |
||||
|
echo $chain |
||||
|
komodo-cli -ac_name=$chain $args |
||||
|
sleep $delay |
||||
|
fi |
||||
|
done |
||||
|
echo VRSC |
||||
|
komodo-cli -ac_name=VRSC $args |
@ -0,0 +1,21 @@ |
|||||
|
#!/bin/bash |
||||
|
print_txid () { |
||||
|
echo -n $(echo "$1" | jq .txid) |
||||
|
} |
||||
|
|
||||
|
echo "Checking BTC" |
||||
|
cd ~ |
||||
|
now=$(date +"%Y-%m-%d %T%z") |
||||
|
echo "$now" |
||||
|
echo -n BTC |
||||
|
UTXOS="$(bitcoin-cli listunspent | grep -c .00010000)" |
||||
|
echo -n -e '\t\t';echo -n "$UTXOS" |
||||
|
|
||||
|
if [ "$UTXOS" -lt "99" ] |
||||
|
then |
||||
|
echo -n " - SPLITFUNDING BTC: " |
||||
|
RESULT="$(acsplit BTC 20)" |
||||
|
print_txid "$RESULT" |
||||
|
fi |
||||
|
echo "" |
||||
|
echo "---------------------------------------------------------------------------------------------" |
@ -0,0 +1,93 @@ |
|||||
|
#!/bin/bash |
||||
|
# Remove BEER and PIZZA from splitfund as they are not notarized. |
||||
|
declare -a skip=("BEER" "PIZZA") |
||||
|
# Minimum number of UTXOs to maintain |
||||
|
TARGETAMNT=10 |
||||
|
|
||||
|
print_txid () { |
||||
|
txid=$(echo $1 | jq -r .txid) |
||||
|
if [[ $txid = "" ]]; then |
||||
|
echo -n "No valid UTXO to split" |
||||
|
else |
||||
|
echo -n $txid |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
# Amount of UTXOs to create at one time |
||||
|
splitamount () { |
||||
|
SPLITAMNT=$(( $TARGETAMNT -$1 )) |
||||
|
} |
||||
|
|
||||
|
#Print Date and Time |
||||
|
now=$(date +"%Y-%m-%d %T%z") |
||||
|
echo $now |
||||
|
|
||||
|
echo "Checking CHIPS, KMD, GAME, VRSC" |
||||
|
cd ~ |
||||
|
echo -n CHIPS |
||||
|
UTXOS="$(chips-cli listunspent | grep -c .00010000)" |
||||
|
echo -n -e '\t\t';echo -n "$UTXOS" |
||||
|
if [ "$UTXOS" -lt "15" ] |
||||
|
then |
||||
|
SPLITAMNT=$(( 25 -$UTXOS )) |
||||
|
echo -n " - SPLITFUNDING CHIPS: " |
||||
|
RESULT="$(acsplit CHIPS $SPLITAMNT)" |
||||
|
print_txid $RESULT |
||||
|
fi |
||||
|
echo "" |
||||
|
|
||||
|
echo -n KMD |
||||
|
UTXOS="$(komodo-cli listunspent | grep -c .00010000)" |
||||
|
echo -n -e '\t\t';echo -n "$UTXOS" |
||||
|
if [ "$UTXOS" -lt "25" ] |
||||
|
then |
||||
|
SPLITAMNT=$(( 50 -$UTXOS )) |
||||
|
echo -n " - SPLITFUNDING KMD: " |
||||
|
RESULT="$(acsplit KMD $SPLITAMNT)" |
||||
|
print_txid $RESULT |
||||
|
fi |
||||
|
echo "" |
||||
|
|
||||
|
echo -n GAME |
||||
|
UTXOS="$(gc-cli listunspent | grep -c .00100000)" |
||||
|
echo -n -e '\t\t';echo -n "$UTXOS" |
||||
|
if [ "$UTXOS" -lt "10" ] |
||||
|
then |
||||
|
echo -n " - SPLITFUNDING GAME: " |
||||
|
RESULT=$(curl --silent --url "http://127.0.0.1:7776" --data "{\"coin\":\"GAME\",\"agent\":\"iguana\",\"method\":\"splitfunds\",\"satoshis\":\"100000\",\"sendflag\":1,\"duplicates\":"20"}") |
||||
|
print_txid $RESULT |
||||
|
fi |
||||
|
echo "" |
||||
|
|
||||
|
echo -n VRSC |
||||
|
UTXOS="$(komodo-cli -ac_name=VRSC listunspent | grep -c .00010000)" |
||||
|
echo -n -e '\t\t';echo -n "$UTXOS" |
||||
|
if [ "$UTXOS" -lt "5" ] |
||||
|
then |
||||
|
splitamount $UTXOS |
||||
|
echo -n " - SPLITFUNDING VRSC: " |
||||
|
RESULT="$(acsplit VRSC $SPLITAMNT)" |
||||
|
print_txid $RESULT |
||||
|
fi |
||||
|
echo "" |
||||
|
|
||||
|
echo "Checking Other Coins" |
||||
|
# Check the rest of the coins using a loop |
||||
|
~/komodo/src/listassetchains | while read chain; do |
||||
|
if [[ " ${skip[@]} " =~ " ${chain} " ]]; then |
||||
|
pointless=0 |
||||
|
else |
||||
|
echo -n $chain |
||||
|
UTXOS="$(komodo-cli -ac_name=$chain listunspent | grep -c .00010000)" |
||||
|
echo -n -e '\t\t';echo -n "$UTXOS" |
||||
|
if [ "$UTXOS" -lt "5" ]; then |
||||
|
splitamount $UTXOS |
||||
|
echo -n " - SPLITFUNDING $chain: " |
||||
|
RESULT="$(acsplit $chain $SPLITAMNT)" |
||||
|
print_txid $RESULT |
||||
|
fi |
||||
|
echo "" |
||||
|
fi |
||||
|
done |
||||
|
echo "--------------------------------------------------------------------------------------------------" |
||||
|
echo "" |
@ -0,0 +1,21 @@ |
|||||
|
#!/bin/bash |
||||
|
source ~/komodo/src/pubkey.txt |
||||
|
delay=7 |
||||
|
declare -a skip=("BEER" "PIZZA" "RFOX") |
||||
|
|
||||
|
~/komodo/src/listassetchains | while read chain; do |
||||
|
if [[ " ${skip[@]} " =~ " ${chain} " ]]; then |
||||
|
pointless=0 |
||||
|
else |
||||
|
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"$chain\",\"pubkey\":\"$pubkey\"}" |
||||
|
sleep $delay |
||||
|
fi |
||||
|
done |
||||
|
|
||||
|
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHIPS\",\"pubkey\":\"$pubkey\"}" |
||||
|
sleep $delay |
||||
|
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GAME\",\"freq\":5,\"pubkey\":\"$pubkey\"}" |
||||
|
sleep $delay |
||||
|
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RFOX\",\"freq\":10,\"pubkey\":\"$pubkey\"}" |
||||
|
sleep $delay |
||||
|
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"VRSC\",\"freq\":10,\"pubkey\":\"$pubkey\"}" |
@ -0,0 +1,2 @@ |
|||||
|
#!/bin/bash |
||||
|
komodo-cli dumpprivkey $1 |
@ -0,0 +1,17 @@ |
|||||
|
#Check if BBR Module is avalible |
||||
|
#sudo modprobe tcp_bbr |
||||
|
#if [ $? -ne 0 ] |
||||
|
# then |
||||
|
# echo "tcp_bbr Module not supported, install other network tweaks" |
||||
|
# sudo cp 01-notary.conf /etc/sysctl.d/ |
||||
|
# else |
||||
|
# echo "tcp_bbr Module is supported, install it with network tweaks." |
||||
|
# echo "net.ipv4.tcp_congestion_control=bbr" | tee --append 01-notary.conf |
||||
|
# sudo cp 01-notary.conf /etc/sysctl.d/ |
||||
|
# echo "tcp_bbr" | sudo tee --append /etc/modules-load.d/modules.conf |
||||
|
# fi |
||||
|
# |
||||
|
#Set the ulimit for open files for the user. |
||||
|
echo "$USER soft nofile 1000000" | sudo tee --append /etc/security/limits.conf |
||||
|
echo "$USER hard nofile 1000000" | sudo tee --append /etc/security/limits.conf |
||||
|
echo "session required pam_limits.so" | sudo tee --append /etc/pam.d/common-session |
@ -0,0 +1,23 @@ |
|||||
|
#Install Chips: |
||||
|
cd ~ |
||||
|
git clone https://github.com/jl777/chips3.git |
||||
|
cd chips3/ |
||||
|
git checkout dev |
||||
|
|
||||
|
#Build Berkly DB 4.8 |
||||
|
CHIPS_ROOT=$(pwd) |
||||
|
BDB_PREFIX="${CHIPS_ROOT}/db4" |
||||
|
mkdir -p $BDB_PREFIX |
||||
|
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' |
||||
|
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c |
||||
|
tar -xzvf db-4.8.30.NC.tar.gz |
||||
|
cd db-4.8.30.NC/build_unix/ |
||||
|
../dist/configure -enable-cxx -disable-shared -with-pic -prefix=$BDB_PREFIX |
||||
|
make -j$(nproc) |
||||
|
make install |
||||
|
|
||||
|
#Build Chips |
||||
|
cd ~/chips3 |
||||
|
./autogen.sh |
||||
|
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" -without-gui -without-miniupnpc |
||||
|
make -j$(nproc) |
@ -0,0 +1,40 @@ |
|||||
|
#!/bin/bash |
||||
|
# GameCredits build script for Debian 9 (c) Decker |
||||
|
# Step 1: Build BDB 4.8 |
||||
|
cd ~ |
||||
|
git clone https://github.com/gamecredits-project/GameCredits.git |
||||
|
cd GameCredits |
||||
|
|
||||
|
GAMECREDITS_ROOT=$(pwd) |
||||
|
GAMECREDITS_PREFIX="${GAMECREDITS_ROOT}/db4" |
||||
|
mkdir -p $GAMECREDITS_PREFIX |
||||
|
wget -N 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' |
||||
|
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c |
||||
|
tar -xzvf db-4.8.30.NC.tar.gz |
||||
|
cd db-4.8.30.NC/build_unix/ |
||||
|
../dist/configure -enable-cxx -disable-shared -with-pic -prefix=$GAMECREDITS_PREFIX |
||||
|
make -j$(nproc) |
||||
|
make install |
||||
|
cd $GAMECREDITS_ROOT |
||||
|
|
||||
|
# Step 2: Build OpenSSL (libssl-dev) 1.0.x |
||||
|
version=1.0.2j |
||||
|
mkdir -p openssl_build |
||||
|
wget -qO- http://www.openssl.org/source/openssl-$version.tar.gz | tar xzv |
||||
|
cd openssl-$version |
||||
|
export CFLAGS+="-fPIC" |
||||
|
./config shared --prefix=$GAMECREDITS_ROOT/openssl_build |
||||
|
make -j$(nproc) |
||||
|
make install |
||||
|
cd .. |
||||
|
|
||||
|
export PKG_CONFIG_PATH="$GAMECREDITS_ROOT/openssl_build/pkgconfig" |
||||
|
export CXXFLAGS+=" -I$GAMECREDITS_ROOT/openssl_build/include/ -I${GAMECREDITS_PREFIX}/include/" |
||||
|
export LDFLAGS+=" -L$GAMECREDITS_ROOT/openssl_build/lib -L${GAMECREDITS_PREFIX}/lib/" |
||||
|
|
||||
|
# Step 3: Build GameCredits daemon |
||||
|
./autogen.sh |
||||
|
./configure --with-gui=no --disable-tests --disable-bench --without-miniupnpc --enable-experimental-asm |
||||
|
make -j$(nproc) |
||||
|
|
||||
|
|
@ -0,0 +1,33 @@ |
|||||
|
#!/bin/bash |
||||
|
# OpeSSL 1.0.x build script (c) Decker |
||||
|
version=1.0.2j |
||||
|
BDB_PREFIX="~/chips3/db4/" |
||||
|
cd ~/GameCredits |
||||
|
|
||||
|
curdir=$(pwd) |
||||
|
mkdir build |
||||
|
wget -qO- http://www.openssl.org/source/openssl-$version.tar.gz | tar xzv |
||||
|
cd openssl-$version |
||||
|
./config --prefix=$curdir/build |
||||
|
make -j$(nproc) |
||||
|
make install |
||||
|
cd .. |
||||
|
|
||||
|
# Configure GameCredits Core to use our own-built instance of BDB |
||||
|
cd $gamecredits_ROOT |
||||
|
./autogen.sh |
||||
|
./configure LDFLAGS="-L${BDB_PREFIX}/lib/ -L${curdr}/build/export CXXFLAGS+=" -I<full_path_to_build_folder>/include/openssl-1.0" |
||||
|
export LDFLAGS+=" -L<full_path_to_build_folder>/lib/openssl-1.0 -lssl" |
||||
|
export CXXFLAGS+=" -fpic" |
||||
|
|
||||
|
./autogen.sh |
||||
|
./configure |
||||
|
make -j4" CPPFLAGS="-I${BDB_PREFIX}/include/" |
||||
|
make -j$(nproc) |
||||
|
export CXXFLAGS+=" -I<full_path_to_build_folder>/include/openssl-1.0" |
||||
|
export LDFLAGS+=" -L<full_path_to_build_folder>/lib/openssl-1.0 -lssl" |
||||
|
export CXXFLAGS+=" -fpic" |
||||
|
|
||||
|
./autogen.sh |
||||
|
./configure |
||||
|
make -j4 |
@ -0,0 +1,7 @@ |
|||||
|
#Install Komodo |
||||
|
cd ~ |
||||
|
git clone https://github.com/jl777/komodo |
||||
|
cd komodo |
||||
|
git checkout mergemaster |
||||
|
./zcutil/fetch-params.sh |
||||
|
./zcutil/build.sh -j$(nproc) |
@ -0,0 +1,7 @@ |
|||||
|
#!/bin/bash |
||||
|
#Dependacies without QT, DBD, vim |
||||
|
sudo apt-get install build-essential pkg-config git libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip python zlib1g-dev wget bsdmainutils automake libssl-dev libprotobuf-dev protobuf-compiler libqrencode-dev ntp ntpdate software-properties-common curl libcurl4-gnutls-dev cmake clang libevent-dev libboost-all-dev |
||||
|
./buildkomodo.sh |
||||
|
./buildchips.sh |
||||
|
./buildbitcoin.sh |
||||
|
./symlinks.sh |
@ -0,0 +1,4 @@ |
|||||
|
cd ~ |
||||
|
git clone https://github.com/jl777/SuperNET |
||||
|
cd SuperNET/iguana |
||||
|
git checkout dev |
@ -0,0 +1,22 @@ |
|||||
|
|
||||
|
#!/bin/bash |
||||
|
if [ "$1" = "" ] |
||||
|
then |
||||
|
echo "no coin specified" |
||||
|
echo "Enter infomation in the format:" |
||||
|
echo "./makeconf.sh datadir coinname" |
||||
|
echo "Example:" |
||||
|
echo "./makeconf.sh .dashcore dash" |
||||
|
else |
||||
|
confpath="$2.conf" |
||||
|
rpcuser=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1) |
||||
|
rpcpassword=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1) |
||||
|
mkdir "/mnt/$2_data" |
||||
|
ln -s /mnt/$2_data ~/$1 |
||||
|
cd ~/$1 |
||||
|
echo "rpcuser=$rpcuser" > $confpath |
||||
|
echo "rpcpassword=$rpcpassword" >> $confpath |
||||
|
echo "server=1" >> $confpath |
||||
|
echo "deamon=1" >> $confpath |
||||
|
echo "txindex=1" >> $confpath |
||||
|
fi |
@ -0,0 +1 @@ |
|||||
|
/home/node/GameCredits/openssl_build/lib |
@ -0,0 +1,23 @@ |
|||||
|
cd ~ |
||||
|
#Link Bitcoin Exec's. |
||||
|
sudo ln -sf /home/$USER/bitcoin/src/bitcoin-cli /usr/local/bin/bitcoin-cli |
||||
|
sudo ln -sf /home/$USER/bitcoin/src/bitcoind /usr/local/bin/bitcoind |
||||
|
|
||||
|
#Link Komodo Exec's. |
||||
|
sudo ln -sf /home/$USER/komodo/src/komodo-cli /usr/local/bin/komodo-cli |
||||
|
sudo ln -sf /home/$USER/komodo/src/komodod /usr/local/bin/komodod |
||||
|
|
||||
|
#Link Chips Exec's |
||||
|
sudo ln -sf /home/$USER/chips3/src/chips-cli /usr/local/bin/chips-cli |
||||
|
sudo ln -sf /home/$USER/chips3/src/chipsd /usr/local/bin/chipsd |
||||
|
|
||||
|
#Link GameCredits |
||||
|
sudo ln -sf /home/$USER/GameCredits/src/gamecredits-cli /usr/local/bin/gamecredits-cli |
||||
|
sudo ln -sf /home/$USER/GameCredits/src/gamecredits-cli /usr/local/bin/gc-cli |
||||
|
sudo ln -sf /home/$USER/GameCredits/src/gamecreditsd /usr/local/bin/gamecreditsd |
||||
|
|
||||
|
#Link scripts |
||||
|
sudo ln -sf /home/$USER/scripts/acsplit /usr/local/bin/acsplit |
||||
|
sudo ln -sf /home/$USER/scripts/assets-cli /usr/local/bin/assets-cli |
||||
|
sudo ln -sf /home/$USER/scripts/asset-cli /usr/local/bin/asset-cli |
||||
|
|
Binary file not shown.
@ -0,0 +1,18 @@ |
|||||
|
#!/bin/bash |
||||
|
declare -a skip=("BEER" "PIZZA") |
||||
|
delay=0.5 |
||||
|
NNaddress=RSuXRScqHNbRFqjur2C3tf3oDoauBs2B1i |
||||
|
NNprivkey=$(ssh node@172.16.16.11 "bash -s" -- < ./dumpKMDprivkey $NNaddress) |
||||
|
komodo-cli importprivkey $NNprivkey "" false |
||||
|
ssh node@172.16.16.11 "bash -s" -- < ./sendtoself $NNaddress |
||||
|
|
||||
|
~/komodo/src/listassetchains | while read chain; do |
||||
|
if [[ " ${skip[@]} " =~ " ${chain} " ]]; then |
||||
|
pointless=0 |
||||
|
else |
||||
|
echo $chain |
||||
|
komodo-cli -ac_name=$chain importprivkey $NNprivkey "" false |
||||
|
ssh node@172.16.16.11 "bash -s" -- < ./sendtoself $NNaddress $chain |
||||
|
sleep $delay |
||||
|
fi |
||||
|
done |
@ -0,0 +1,68 @@ |
|||||
|
#!/bin/bash |
||||
|
#Config area |
||||
|
komodo_data=~/.komodo #default would be ~/.komodo |
||||
|
komodopath=komodo-cli #path to komodo-cli |
||||
|
komododpath=komodod #path to komodod |
||||
|
NNaddress=RSuXRScqHNbRFqjur2C3tf3oDoauBs2B1i #Your NN public key goes here |
||||
|
source ~/komodo/src/pubkey.txt #path to your pubkey.txt |
||||
|
args="-connect=172.16.16.11" #Any special args you pass komodod on start |
||||
|
DATE=`date +%Y-%m-%d` #get todays date for your wallet.dat backup file |
||||
|
currdir=$(echo $PWD) #get the working directory |
||||
|
|
||||
|
waitforconfirm () { |
||||
|
sleep 30 |
||||
|
confirmations=0 |
||||
|
while [[ $confirmations -lt 1 ]]; do |
||||
|
confirmations=$($komodopath gettransaction $1 | jq -r .confirmations) |
||||
|
sleep 2 |
||||
|
done |
||||
|
} |
||||
|
|
||||
|
#stop the deamon |
||||
|
$komodopath stop |
||||
|
|
||||
|
#wait for deamon to stop |
||||
|
stopped=0 |
||||
|
while [[ $stopped -eq 0 ]]; do |
||||
|
sleep 5 |
||||
|
pgrep -a komodod | grep "komodod -notary" |
||||
|
outcome=$(echo $?) |
||||
|
if [[ $outcome -ne 0 ]]; then |
||||
|
stopped=1 |
||||
|
fi |
||||
|
sleep 10 |
||||
|
done |
||||
|
|
||||
|
#move your old wallet, then return to our working directory |
||||
|
cd $komodo_data |
||||
|
mv wallet.dat wallet.bak$DATE |
||||
|
cd $currdir |
||||
|
|
||||
|
#restart the komodo deamon, it will generate a new empty wallet.dat on start |
||||
|
$komododpath -notary -pubkey=$pubkey $args & |
||||
|
|
||||
|
#wait for deamon to start |
||||
|
started=0 |
||||
|
while [[ $started -eq 0 ]]; do |
||||
|
sleep 15 |
||||
|
$komodopath getbalance |
||||
|
outcome=$(echo $?) |
||||
|
if [[ $outcome -eq 0 ]]; then |
||||
|
started=1 |
||||
|
fi |
||||
|
done |
||||
|
|
||||
|
# Get the NN privkey from the other node |
||||
|
NNprivkey=$(ssh node@172.16.16.11 "bash -s" -- < ./dumpKMDprivkey $NNaddress) |
||||
|
|
||||
|
# import the private key of notary node without a rescan. |
||||
|
$komodopath importprivkey $NNprivkey "" false |
||||
|
|
||||
|
# Execute the sendtoself script on the second node and return us the TXID |
||||
|
TXID=$(ssh node@172.16.16.11 "bash -s" -- < ./sendtoself $NNaddress) |
||||
|
|
||||
|
#Check for confirmation of received funds |
||||
|
waitforconfirm $TXID |
||||
|
|
||||
|
#split funds |
||||
|
acsplit KMD 100 |
@ -0,0 +1,2 @@ |
|||||
|
#!/bin/bash |
||||
|
komodo-cli -ac_name=$2 sendtoaddress $1 $(komodo-cli -ac_name=$2 getbalance) "" "" true |
@ -0,0 +1 @@ |
|||||
|
skip=("-ac_supply=100000000 -ac_name=PIZZA" "-ac_supply=100000000 -ac_name=BEER") |
@ -0,0 +1,16 @@ |
|||||
|
#!/bin/bash |
||||
|
source ~/komodo/src/pubkey.txt |
||||
|
args="-pubkey=$pubkey -connect=172.16.16.11" # -addnode=37.9.62.186 -addnode=209.58.144.205 -addnode=167.99.69.47" |
||||
|
|
||||
|
echo "Starting Bitcoin" |
||||
|
bitcoind & |
||||
|
sleep 30 |
||||
|
echo "Starting Komodo" |
||||
|
komodod -notary $args & |
||||
|
sleep 60 |
||||
|
echo "Starting Chips" |
||||
|
chipsd $args & |
||||
|
echo "Starting GameCredits" |
||||
|
gamecreditsd $args & |
||||
|
#echo "Starting Hush" |
||||
|
#hushd $args & |
@ -0,0 +1,19 @@ |
|||||
|
#!/bin/bash |
||||
|
set -eo pipefail |
||||
|
delay=10 |
||||
|
source ~/komodo/src/pubkey.txt |
||||
|
overide_args="${@}" |
||||
|
extra_args="-connect=172.16.16.11" |
||||
|
source skip |
||||
|
|
||||
|
verusd $overide_args $extra_args -pubkey=$pubkey & |
||||
|
sleep $delay |
||||
|
|
||||
|
~/komodo/src/listassetchainparams | while read args; do |
||||
|
if [[ " ${skip[@]} " =~ " ${args} " ]]; then |
||||
|
pointless=0 |
||||
|
else |
||||
|
komodod $args $overide_args $extra_args -pubkey=$pubkey & |
||||
|
sleep $delay |
||||
|
fi |
||||
|
done |
@ -0,0 +1,11 @@ |
|||||
|
echo "Stopping Iguana" |
||||
|
pkill -15 iguana |
||||
|
assets-cli stop |
||||
|
echo "Stopping Komodo" |
||||
|
komodo-cli stop |
||||
|
echo "Stopping Chips" |
||||
|
chips-cli stop |
||||
|
echo "Stopping Game" |
||||
|
gc-cli stop |
||||
|
echo "Stopping Bitcoin" |
||||
|
bitcoin-cli stop |
@ -0,0 +1,5 @@ |
|||||
|
#!/bin/bash |
||||
|
# Rsync .komodo folder from seed node |
||||
|
rsync -avzh node@172.16.16.11:/mnt/komodo_data/ /mnt/ramdisk |
||||
|
# Delete all wallet.dat's |
||||
|
find /mnt/ramdisk -name 'wallet.dat' -delete |
@ -0,0 +1,14 @@ |
|||||
|
komodo-cli -ac_name=PIZZA addnode 77.95.229.63 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 109.105.61.27 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 139.60.161.30 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 82.220.39.84 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 163.172.30.96 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 209.58.169.118 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 188.165.48.169 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 74.208.210.191 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 145.239.204.33 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 31.192.110.70 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 139.99.124.117 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 167.114.208.203 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 195.154.78.44 add |
||||
|
komodo-cli -ac_name=PIZZA addnode 139.99.148.62 add |
@ -0,0 +1,14 @@ |
|||||
|
ping 77.95.229.63 |
||||
|
ping 109.105.61.27 |
||||
|
ping 139.60.161.30 |
||||
|
ping 82.220.39.84 |
||||
|
ping 163.172.30.96 |
||||
|
ping 209.58.169.118 |
||||
|
ping 188.165.48.169 |
||||
|
ping 74.208.210.191 |
||||
|
ping 145.239.204.33 |
||||
|
ping 31.192.110.70 |
||||
|
ping 139.99.124.117 |
||||
|
ping 167.114.208.203 |
||||
|
ping 195.154.78.44 |
||||
|
ping 139.99.148.62 |
@ -0,0 +1,7 @@ |
|||||
|
#!/bin/bash |
||||
|
source ~/komodo/src/pubkey.txt |
||||
|
echo "Starting Komodo" |
||||
|
komodod -notary -pubkey=$pubkey & |
||||
|
sleep 90 |
||||
|
echo "Starting PIZZA" |
||||
|
./startassets |
@ -0,0 +1,16 @@ |
|||||
|
#!/bin/bash |
||||
|
IFS= |
||||
|
cd ~/komodo/src |
||||
|
now=$(date +"%Y-%m-%d %T%z") |
||||
|
|
||||
|
printf "$now \n"; |
||||
|
printf -- "-ASSET-%s\t\t-NTRZd-%s\t\t-UTXOs-%s\t\t-BLOX-%s\t\t-BAL-\n"; |
||||
|
printf "BTC%s\t\t-\t\t$(bitcoin-cli listunspent | grep .0001 | wc -l)%s\t\t-\t\t$(bitcoin-cli getwalletinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')\n"; |
||||
|
|
||||
|
kmdinfo=$(./komodo-cli getinfo) |
||||
|
pizzainfo=$(./komodo-cli -ac_name=PIZZA getinfo) |
||||
|
|
||||
|
printf "KMD%s\t\t-\t\t$(./komodo-cli listunspent | grep .0001 | wc -l)%s\t\t"; printf "$kmdinfo" | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//'; printf "%s\t\t"; printf "$kmdinfo" | awk ' /\"balance\"/ {print $2}' | sed 's/,//'; |
||||
|
printf "PIZZA%s\t\t$(./komodo-cli -ac_name=PIZZA listtransactions "" 77777 | grep -- -0.00083600 | wc -l)%s\t\t$(./komodo-cli -ac_name=PIZZA listunspent | grep .0001 | wc -l)%s\t\t"; printf "$pizzainfo" | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//'; printf "%s\t\t"; printf "$pizzainfo" | awk ' /\"balance\"/ {print $2}' | sed 's/,//'; |
||||
|
|
||||
|
#can also grep RXL3YXG2ceaB6C5hfJcN4fvmLH2C34knhA instead of checking for -0.00418000 if it proves unreliable |
@ -0,0 +1,3 @@ |
|||||
|
pkill -15 iguana |
||||
|
./testnet-cli stop |
||||
|
komodo-cli stop |
@ -0,0 +1,27 @@ |
|||||
|
net.core.default_qdisc=fq |
||||
|
net.core.rmem_default = 1048576 |
||||
|
net.core.wmem_default = 1048576 |
||||
|
net.core.rmem_max = 16777216 |
||||
|
net.core.wmem_max = 16777216 |
||||
|
net.ipv4.tcp_rmem = 4096 87380 16777216 |
||||
|
net.ipv4.tcp_wmem = 4096 65536 16777216 |
||||
|
net.ipv4.udp_rmem_min = 16384 |
||||
|
net.ipv4.udp_wmem_min = 16384 |
||||
|
net.core.netdev_max_backlog = 262144 |
||||
|
net.ipv4.tcp_max_orphans = 262144 |
||||
|
net.ipv4.tcp_max_syn_backlog = 262144 |
||||
|
net.ipv4.tcp_no_metrics_save = 1 |
||||
|
net.ipv4.tcp_tw_reuse = 1 |
||||
|
net.ipv4.tcp_max_tw_buckets = 2000000 |
||||
|
net.ipv4.tcp_fin_timeout = 10 |
||||
|
net.ipv4.tcp_keepalive_time = 60 |
||||
|
net.ipv4.tcp_keepalive_intvl = 10 |
||||
|
net.ipv4.tcp_keepalive_probes = 3 |
||||
|
net.ipv4.tcp_synack_retries = 2 |
||||
|
net.ipv4.tcp_syn_retries = 2 |
||||
|
net.ipv4.ip_local_port_range = 16001 65530 |
||||
|
net.core.somaxconn = 20480 |
||||
|
net.ipv4.tcp_low_latency = 1 |
||||
|
net.ipv4.tcp_slow_start_after_idle = 0 |
||||
|
net.ipv4.tcp_mtu_probing = 1 |
||||
|
net.ipv4.tcp_fastopen = 3 |
@ -0,0 +1,16 @@ |
|||||
|
#Check if BBR Module is avalible |
||||
|
sudo modprobe tcp_bbr |
||||
|
if [ $? -ne 0 ] |
||||
|
then |
||||
|
echo "tcp_bbr Module not supported, install other network tweaks" |
||||
|
sudo cp 01-notary.conf /etc/sysctl.d/ |
||||
|
else |
||||
|
echo "tcp_bbr Module is supported, install it with network tweaks." |
||||
|
echo "net.ipv4.tcp_congestion_control=bbr" | tee --append 01-notary.conf |
||||
|
sudo cp 01-notary.conf /etc/sysctl.d/ |
||||
|
echo "tcp_bbr" | sudo tee --append /etc/modules-load.d/modules.conf |
||||
|
fi |
||||
|
#Set the ulimit for open files for the user. |
||||
|
echo "$USER soft nofile 1000000" | sudo tee --append /etc/security/limits.conf |
||||
|
echo "$USER hard nofile 1000000" | sudo tee --append /etc/security/limits.conf |
||||
|
echo "session required pam_limits.so" | sudo tee --append /etc/pam.d/common-session |
@ -0,0 +1,23 @@ |
|||||
|
#Install Bitcoin |
||||
|
cd ~ |
||||
|
git clone https://github.com/bitcoin/bitcoin.git |
||||
|
cd bitcoin |
||||
|
#I like getinfo |
||||
|
git checkout 0.15 |
||||
|
|
||||
|
#BDB 4.8 for bitcoin |
||||
|
BTC_ROOT=$(pwd) |
||||
|
BDB_PREFIX="${BTC_ROOT}/db4" |
||||
|
mkdir -p $BDB_PREFIX |
||||
|
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' |
||||
|
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c |
||||
|
tar -xzvf db-4.8.30.NC.tar.gz |
||||
|
cd db-4.8.30.NC/build_unix/ |
||||
|
../dist/configure -enable-cxx -disable-shared -with-pic -prefix=$BDB_PREFIX |
||||
|
make -j$(nproc) |
||||
|
make install |
||||
|
|
||||
|
cd ~/bitcoin |
||||
|
./autogen.sh |
||||
|
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" -without-gui -without-miniupnpc |
||||
|
make -j$(nproc) |
@ -0,0 +1,7 @@ |
|||||
|
curl --url "http://127.0.0.1:7776" --data "{\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTCD\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":16,\"RELAY\":0,\"VALIDATE\":0,\"portp2p\":14631,\"rpc\":14632}" |
||||
|
curl --url "http://127.0.0.1:7776" --data "{\"prefetchlag\":5,\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTC\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":16,\"RELAY\":0,\"VALIDATE\":0,\"portp2p\":8333}" |
||||
|
cd ~/SuperNET/iguana |
||||
|
passphrase=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 128 | head -n 1) |
||||
|
echo "passphrase=$passphrase" > passphrase.txt |
||||
|
cp ~/scripts/install/wp_7776 . |
||||
|
source ~/SuperNET/iguana/passphrase.txt |
@ -0,0 +1,9 @@ |
|||||
|
curl --url "http://127.0.0.1:7776" --data "{\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTCD\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":16,\"RELAY\":0,\"VALIDATE\":0,\"portp2p\":14631,\"rpc\":14632}" |
||||
|
curl --url "http://127.0.0.1:7776" --data "{\"prefetchlag\":5,\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTC\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":16,\"RELAY\":0,\"VALIDATE\":0,\"portp2p\":8333}" |
||||
|
cd ~/SuperNET/iguana |
||||
|
cp ~/scripts/install/wp_7776 . |
||||
|
source ~/SuperNET/iguana/passphrase.txt |
||||
|
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"bitcoinrpc\",\"method\":\"encryptwallet\",\"passphrase\":\"$passphrase\"}" > ~/scripts/wallet.txt |
||||
|
./wp_7776 |
||||
|
sleep 5 |
||||
|
pkill -15 iguana |
@ -0,0 +1,7 @@ |
|||||
|
cd ~/scripts |
||||
|
BTCwif=$(sed -n 's|.*"BTCwif":"\([^"]*\)".*|\1|p' wallet.txt) |
||||
|
BTCDwif=$(sed -n 's|.*"BTCDwif":"\([^"]*\)".*|\1|p' wallet.txt) |
||||
|
komodo-cli importprivkey $BTCDwif "" false |
||||
|
bitcoin-cli importprivkey $BTCwif "" false |
||||
|
chips-cli importprivkey $BTCDwif "" false |
||||
|
assets-cli 'importprivkey' $BTCDwif ' "" false' |
@ -0,0 +1,9 @@ |
|||||
|
cd ~ |
||||
|
git clone https://github.com/nanomsg/nanomsg |
||||
|
cd nanomsg |
||||
|
mkdir build |
||||
|
cd build |
||||
|
cmake .. -DNN_TESTS=OFF -DNN_ENABLE_DOC=OFF |
||||
|
cmake --build . -j$(nproc) |
||||
|
sudo cmake --build . --target install |
||||
|
sudo ldconfig |
@ -0,0 +1,6 @@ |
|||||
|
cd ~/scripts |
||||
|
sed -n 's|.*"btcpubkey":"\([^"]*\)".*|pubkey=\1|p' ~/scripts/wallet.txt > pubkey.txt |
||||
|
cp pubkey.txt ~/komodo/src |
||||
|
cp pubkey.txt ~/SuperNET/iguana |
||||
|
cd ~/SuperNET/iguana |
||||
|
echo home/$USER > userhome.txt |
@ -0,0 +1,10 @@ |
|||||
|
cd ~/scripts |
||||
|
BTCpub=$(sed -n 's|.*"BTC":"\([^"]*\)".*|\1|p' wallet.txt) |
||||
|
BTCDpub=$(sed -n 's|.*"BTCD":"\([^"]*\)".*|\1|p' wallet.txt) |
||||
|
komodo-cli validateaddress $BTCDpub |
||||
|
sleep 1 |
||||
|
chips-cli validateaddress $BTCDpub |
||||
|
sleep 1 |
||||
|
bitcoin-cli validateaddress $BTCpub |
||||
|
sleep 1 |
||||
|
assets-cli validateaddress $BTCDpub |
@ -0,0 +1,2 @@ |
|||||
|
source ~/SuperNET/iguana/passphrase.txt |
||||
|
curl --url "http://127.0.0.1:7776" --data "{\"method\":\"walletpassphrase\",\"params\":[\"$passphrase\", 9999999]}" |
@ -0,0 +1,22 @@ |
|||||
|
|
||||
|
#!/bin/bash |
||||
|
if [ "$1" = "" ] |
||||
|
then |
||||
|
echo "no coin specified" |
||||
|
echo "Enter infomation in the format:" |
||||
|
echo "./makeconf.sh datadir coinname" |
||||
|
echo "Example:" |
||||
|
echo "./makeconf.sh .dashcore dash" |
||||
|
else |
||||
|
confpath="$2.conf" |
||||
|
rpcuser=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1) |
||||
|
rpcpassword=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1) |
||||
|
mkdir "/mnt/$2_data" |
||||
|
ln -s /mnt/$2_data ~/$1 |
||||
|
cd ~/$1 |
||||
|
echo "rpcuser=$rpcuser" > $confpath |
||||
|
echo "rpcpassword=$rpcpassword" >> $confpath |
||||
|
echo "server=1" >> $confpath |
||||
|
echo "deamon=1" >> $confpath |
||||
|
echo "txindex=1" >> $confpath |
||||
|
fi |
@ -0,0 +1,49 @@ |
|||||
|
#!/bin/bash |
||||
|
#Input list of asset chains |
||||
|
source ~/scripts/testnet/testlist |
||||
|
|
||||
|
# Minimum number of UTXOs to maintain |
||||
|
MINUTXOS=100 |
||||
|
|
||||
|
# Amount of UTXOs to create at one time |
||||
|
SPLITAMNT=50 |
||||
|
|
||||
|
#Print Date and Time |
||||
|
now=$(date +"%Y-%m-%d %T%z") |
||||
|
printf "$now \n"; |
||||
|
|
||||
|
echo -n KMD |
||||
|
UTXOS="$(komodo-cli listunspent | grep .0005 | wc -l)" |
||||
|
echo -n -e '\t\t';echo -n "$UTXOS" |
||||
|
if [ "$UTXOS" -lt "$MINUTXOS" ] |
||||
|
then |
||||
|
echo -n " - SPLITFUNDING KMD" |
||||
|
RESULT="$(acsplit KMD 100)" |
||||
|
echo $RESULT |
||||
|
fi |
||||
|
echo "" |
||||
|
echo "Checking Other Coins" |
||||
|
|
||||
|
# Check the rest of the coins using a loop |
||||
|
count=0 |
||||
|
while [ "x${coinlist[count]}" != "x" ] |
||||
|
do |
||||
|
all=${coinlist[count]} |
||||
|
name=${all%% *} |
||||
|
if [ "$name" != "" ] |
||||
|
then |
||||
|
echo -n "$name" |
||||
|
UTXOS="$(komodo-cli -ac_name=$name listunspent | grep .0005 | wc -l)" |
||||
|
echo -n -e '\t\t';echo -n "$UTXOS" |
||||
|
if [ "$UTXOS" -lt "$MINUTXOS" ] |
||||
|
then |
||||
|
echo -n " - SPLIT FUNDING: $name" |
||||
|
RESULT="$(acsplit $name $SPLITAMNT)" |
||||
|
echo $RESULT |
||||
|
fi |
||||
|
fi |
||||
|
count=$(( $count +1 )) |
||||
|
echo "" |
||||
|
done |
||||
|
echo "FINISHED" |
||||
|
|
@ -0,0 +1,20 @@ |
|||||
|
#!/bin/bash |
||||
|
seed_ip=`getent hosts seed.mewhub.com | awk '{ print $1 }'` |
||||
|
source ~/komodo/src/pubkey.txt |
||||
|
source testlist |
||||
|
count=0 |
||||
|
delay=20 |
||||
|
|
||||
|
while [ "x${coinlist[count]}" != "x" ] |
||||
|
do |
||||
|
all=${coinlist[count]} |
||||
|
name=${all%% *} |
||||
|
supply=`expr "$all" : '.* \(.*\)'` |
||||
|
if [ "$name" != "" ] |
||||
|
then |
||||
|
echo $name |
||||
|
komodod -pubkey=$pubkey -ac_name=$name -ac_supply=$supply -addnode=$seed_ip & |
||||
|
sleep $delay |
||||
|
fi |
||||
|
count=$(( $count +1 )) |
||||
|
done |
@ -0,0 +1,3 @@ |
|||||
|
coinlist=( |
||||
|
'PIZZA 100000000' |
||||
|
) |
@ -0,0 +1,17 @@ |
|||||
|
#!/bin/bash |
||||
|
source testlist |
||||
|
delay=1 |
||||
|
count=0 |
||||
|
|
||||
|
while [ "x${coinlist[count]}" != "x" ] |
||||
|
do |
||||
|
all=${coinlist[count]} |
||||
|
name=${all%% *} |
||||
|
if [ "$name" != "" ] |
||||
|
then |
||||
|
echo $name |
||||
|
komodo-cli -ac_name=$name $* |
||||
|
sleep $delay |
||||
|
fi |
||||
|
count=$(( $count +1 )) |
||||
|
done |
@ -0,0 +1,2 @@ |
|||||
|
#!/bin/bash |
||||
|
komodo-cli -ac_name=${@} |
@ -0,0 +1,9 @@ |
|||||
|
#!/bin/bash |
||||
|
#set -eo pipefail |
||||
|
|
||||
|
args="$@" |
||||
|
|
||||
|
~/komodo/src/listassetchains | while read chain; do |
||||
|
echo $chain |
||||
|
komodo-cli -ac_name=$chain $args |
||||
|
done |
@ -0,0 +1,27 @@ |
|||||
|
net.core.default_qdisc=fq |
||||
|
net.core.rmem_default = 1048576 |
||||
|
net.core.wmem_default = 1048576 |
||||
|
net.core.rmem_max = 16777216 |
||||
|
net.core.wmem_max = 16777216 |
||||
|
net.ipv4.tcp_rmem = 4096 87380 16777216 |
||||
|
net.ipv4.tcp_wmem = 4096 65536 16777216 |
||||
|
net.ipv4.udp_rmem_min = 16384 |
||||
|
net.ipv4.udp_wmem_min = 16384 |
||||
|
net.core.netdev_max_backlog = 262144 |
||||
|
net.ipv4.tcp_max_orphans = 262144 |
||||
|
net.ipv4.tcp_max_syn_backlog = 262144 |
||||
|
net.ipv4.tcp_no_metrics_save = 1 |
||||
|
net.ipv4.tcp_tw_reuse = 1 |
||||
|
net.ipv4.tcp_max_tw_buckets = 2000000 |
||||
|
net.ipv4.tcp_fin_timeout = 10 |
||||
|
net.ipv4.tcp_keepalive_time = 60 |
||||
|
net.ipv4.tcp_keepalive_intvl = 10 |
||||
|
net.ipv4.tcp_keepalive_probes = 3 |
||||
|
net.ipv4.tcp_synack_retries = 2 |
||||
|
net.ipv4.tcp_syn_retries = 2 |
||||
|
net.ipv4.ip_local_port_range = 16001 65530 |
||||
|
net.core.somaxconn = 20480 |
||||
|
net.ipv4.tcp_low_latency = 1 |
||||
|
net.ipv4.tcp_slow_start_after_idle = 0 |
||||
|
net.ipv4.tcp_mtu_probing = 1 |
||||
|
net.ipv4.tcp_fastopen = 3 |
@ -0,0 +1,16 @@ |
|||||
|
#Check if BBR Module is avalible |
||||
|
sudo modprobe tcp_bbr |
||||
|
if [ $? -ne 0 ] |
||||
|
then |
||||
|
echo "tcp_bbr Module not supported, install other network tweaks" |
||||
|
sudo cp 01-notary.conf /etc/sysctl.d/ |
||||
|
else |
||||
|
echo "tcp_bbr Module is supported, install it with network tweaks." |
||||
|
echo "net.ipv4.tcp_congestion_control=bbr" | tee --append 01-notary.conf |
||||
|
sudo cp 01-notary.conf /etc/sysctl.d/ |
||||
|
echo "tcp_bbr" | sudo tee --append /etc/modules-load.d/modules.conf |
||||
|
fi |
||||
|
#Set the ulimit for open files for the user. |
||||
|
echo "$USER soft nofile 1000000" | sudo tee --append /etc/security/limits.conf |
||||
|
echo "$USER hard nofile 1000000" | sudo tee --append /etc/security/limits.conf |
||||
|
echo "session required pam_limits.so" | sudo tee --append /etc/pam.d/common-session |
@ -0,0 +1,17 @@ |
|||||
|
#Check if BBR Module is avalible |
||||
|
#sudo modprobe tcp_bbr |
||||
|
#if [ $? -ne 0 ] |
||||
|
# then |
||||
|
# echo "tcp_bbr Module not supported, install other network tweaks" |
||||
|
# sudo cp 01-notary.conf /etc/sysctl.d/ |
||||
|
# else |
||||
|
# echo "tcp_bbr Module is supported, install it with network tweaks." |
||||
|
# echo "net.ipv4.tcp_congestion_control=bbr" | tee --append 01-notary.conf |
||||
|
# sudo cp 01-notary.conf /etc/sysctl.d/ |
||||
|
# echo "tcp_bbr" | sudo tee --append /etc/modules-load.d/modules.conf |
||||
|
# fi |
||||
|
# |
||||
|
#Set the ulimit for open files for the user. |
||||
|
echo "$USER soft nofile 1000000" | sudo tee --append /etc/security/limits.conf |
||||
|
echo "$USER hard nofile 1000000" | sudo tee --append /etc/security/limits.conf |
||||
|
echo "session required pam_limits.so" | sudo tee --append /etc/pam.d/common-session |
@ -0,0 +1,23 @@ |
|||||
|
#Install Bitcoin |
||||
|
cd ~ |
||||
|
git clone https://github.com/bitcoin/bitcoin.git |
||||
|
cd bitcoin |
||||
|
#I like getinfo |
||||
|
git checkout 0.15 |
||||
|
|
||||
|
#BDB 4.8 for bitcoin |
||||
|
BTC_ROOT=$(pwd) |
||||
|
BDB_PREFIX="${BTC_ROOT}/db4" |
||||
|
mkdir -p $BDB_PREFIX |
||||
|
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' |
||||
|
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c |
||||
|
tar -xzvf db-4.8.30.NC.tar.gz |
||||
|
cd db-4.8.30.NC/build_unix/ |
||||
|
../dist/configure -enable-cxx -disable-shared -with-pic -prefix=$BDB_PREFIX |
||||
|
make -j$(nproc) |
||||
|
make install |
||||
|
|
||||
|
cd ~/bitcoin |
||||
|
./autogen.sh |
||||
|
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" -without-gui -without-miniupnpc |
||||
|
make -j$(nproc) |
@ -0,0 +1,23 @@ |
|||||
|
#Install Chips: |
||||
|
cd ~ |
||||
|
git clone https://github.com/jl777/chips3.git |
||||
|
cd chips3/ |
||||
|
git checkout dev |
||||
|
|
||||
|
#Build Berkly DB 4.8 |
||||
|
CHIPS_ROOT=$(pwd) |
||||
|
BDB_PREFIX="${CHIPS_ROOT}/db4" |
||||
|
mkdir -p $BDB_PREFIX |
||||
|
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' |
||||
|
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c |
||||
|
tar -xzvf db-4.8.30.NC.tar.gz |
||||
|
cd db-4.8.30.NC/build_unix/ |
||||
|
../dist/configure -enable-cxx -disable-shared -with-pic -prefix=$BDB_PREFIX |
||||
|
make -j$(nproc) |
||||
|
make install |
||||
|
|
||||
|
#Build Chips |
||||
|
cd ~/chips3 |
||||
|
./autogen.sh |
||||
|
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" -without-gui -without-miniupnpc |
||||
|
make -j$(nproc) |
@ -0,0 +1,40 @@ |
|||||
|
#!/bin/bash |
||||
|
# GameCredits build script for Debian 9 (c) Decker |
||||
|
# Step 1: Build BDB 4.8 |
||||
|
cd ~ |
||||
|
git clone https://github.com/gamecredits-project/GameCredits.git |
||||
|
cd GameCredits |
||||
|
|
||||
|
GAMECREDITS_ROOT=$(pwd) |
||||
|
GAMECREDITS_PREFIX="${GAMECREDITS_ROOT}/db4" |
||||
|
mkdir -p $GAMECREDITS_PREFIX |
||||
|
wget -N 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' |
||||
|
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c |
||||
|
tar -xzvf db-4.8.30.NC.tar.gz |
||||
|
cd db-4.8.30.NC/build_unix/ |
||||
|
../dist/configure -enable-cxx -disable-shared -with-pic -prefix=$GAMECREDITS_PREFIX |
||||
|
make -j$(nproc) |
||||
|
make install |
||||
|
cd $GAMECREDITS_ROOT |
||||
|
|
||||
|
# Step 2: Build OpenSSL (libssl-dev) 1.0.x |
||||
|
version=1.0.2j |
||||
|
mkdir -p openssl_build |
||||
|
wget -qO- http://www.openssl.org/source/openssl-$version.tar.gz | tar xzv |
||||
|
cd openssl-$version |
||||
|
export CFLAGS+="-fPIC" |
||||
|
./config shared --prefix=$GAMECREDITS_ROOT/openssl_build |
||||
|
make -j$(nproc) |
||||
|
make install |
||||
|
cd .. |
||||
|
|
||||
|
export PKG_CONFIG_PATH="$GAMECREDITS_ROOT/openssl_build/pkgconfig" |
||||
|
export CXXFLAGS+=" -I$GAMECREDITS_ROOT/openssl_build/include/ -I${GAMECREDITS_PREFIX}/include/" |
||||
|
export LDFLAGS+=" -L$GAMECREDITS_ROOT/openssl_build/lib -L${GAMECREDITS_PREFIX}/lib/" |
||||
|
|
||||
|
# Step 3: Build GameCredits daemon |
||||
|
./autogen.sh |
||||
|
./configure --with-gui=no --disable-tests --disable-bench --without-miniupnpc --enable-experimental-asm |
||||
|
make -j$(nproc) |
||||
|
|
||||
|
|
@ -0,0 +1,33 @@ |
|||||
|
#!/bin/bash |
||||
|
# OpeSSL 1.0.x build script (c) Decker |
||||
|
version=1.0.2j |
||||
|
BDB_PREFIX="~/chips3/db4/" |
||||
|
cd ~/GameCredits |
||||
|
|
||||
|
curdir=$(pwd) |
||||
|
mkdir build |
||||
|
wget -qO- http://www.openssl.org/source/openssl-$version.tar.gz | tar xzv |
||||
|
cd openssl-$version |
||||
|
./config --prefix=$curdir/build |
||||
|
make -j$(nproc) |
||||
|
make install |
||||
|
cd .. |
||||
|
|
||||
|
# Configure GameCredits Core to use our own-built instance of BDB |
||||
|
cd $gamecredits_ROOT |
||||
|
./autogen.sh |
||||
|
./configure LDFLAGS="-L${BDB_PREFIX}/lib/ -L${curdr}/build/export CXXFLAGS+=" -I<full_path_to_build_folder>/include/openssl-1.0" |
||||
|
export LDFLAGS+=" -L<full_path_to_build_folder>/lib/openssl-1.0 -lssl" |
||||
|
export CXXFLAGS+=" -fpic" |
||||
|
|
||||
|
./autogen.sh |
||||
|
./configure |
||||
|
make -j4" CPPFLAGS="-I${BDB_PREFIX}/include/" |
||||
|
make -j$(nproc) |
||||
|
export CXXFLAGS+=" -I<full_path_to_build_folder>/include/openssl-1.0" |
||||
|
export LDFLAGS+=" -L<full_path_to_build_folder>/lib/openssl-1.0 -lssl" |
||||
|
export CXXFLAGS+=" -fpic" |
||||
|
|
||||
|
./autogen.sh |
||||
|
./configure |
||||
|
make -j4 |
@ -0,0 +1,7 @@ |
|||||
|
#Install Komodo |
||||
|
cd ~ |
||||
|
git clone https://github.com/jl777/komodo |
||||
|
cd komodo |
||||
|
git checkout mergemaster |
||||
|
./zcutil/fetch-params.sh |
||||
|
./zcutil/build.sh -j$(nproc) |
@ -0,0 +1,7 @@ |
|||||
|
curl --url "http://127.0.0.1:7776" --data "{\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTCD\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":16,\"RELAY\":0,\"VALIDATE\":0,\"portp2p\":14631,\"rpc\":14632}" |
||||
|
curl --url "http://127.0.0.1:7776" --data "{\"prefetchlag\":5,\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTC\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":16,\"RELAY\":0,\"VALIDATE\":0,\"portp2p\":8333}" |
||||
|
cd ~/SuperNET/iguana |
||||
|
passphrase=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 128 | head -n 1) |
||||
|
echo "passphrase=$passphrase" > passphrase.txt |
||||
|
cp ~/scripts/install/wp_7776 . |
||||
|
source ~/SuperNET/iguana/passphrase.txt |
@ -0,0 +1,9 @@ |
|||||
|
curl --url "http://127.0.0.1:7776" --data "{\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTCD\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":16,\"RELAY\":0,\"VALIDATE\":0,\"portp2p\":14631,\"rpc\":14632}" |
||||
|
curl --url "http://127.0.0.1:7776" --data "{\"prefetchlag\":5,\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTC\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":16,\"RELAY\":0,\"VALIDATE\":0,\"portp2p\":8333}" |
||||
|
cd ~/SuperNET/iguana |
||||
|
cp ~/scripts/install/wp_7776 . |
||||
|
source ~/SuperNET/iguana/passphrase.txt |
||||
|
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"bitcoinrpc\",\"method\":\"encryptwallet\",\"passphrase\":\"$passphrase\"}" > ~/scripts/wallet.txt |
||||
|
./wp_7776 |
||||
|
sleep 5 |
||||
|
pkill -15 iguana |
@ -0,0 +1,7 @@ |
|||||
|
cd ~/scripts |
||||
|
BTCwif=$(sed -n 's|.*"BTCwif":"\([^"]*\)".*|\1|p' wallet.txt) |
||||
|
BTCDwif=$(sed -n 's|.*"BTCDwif":"\([^"]*\)".*|\1|p' wallet.txt) |
||||
|
komodo-cli importprivkey $BTCDwif "" false |
||||
|
bitcoin-cli importprivkey $BTCwif "" false |
||||
|
chips-cli importprivkey $BTCDwif "" false |
||||
|
assets-cli 'importprivkey' $BTCDwif ' "" false' |
@ -0,0 +1,7 @@ |
|||||
|
#!/bin/bash |
||||
|
#Dependacies without QT, DBD, vim |
||||
|
sudo apt-get install build-essential pkg-config git libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip python zlib1g-dev wget bsdmainutils automake libssl-dev libprotobuf-dev protobuf-compiler libqrencode-dev ntp ntpdate software-properties-common curl libcurl4-gnutls-dev cmake clang libevent-dev libboost-all-dev |
||||
|
./buildkomodo.sh |
||||
|
./buildchips.sh |
||||
|
./buildbitcoin.sh |
||||
|
./symlinks.sh |
@ -0,0 +1,9 @@ |
|||||
|
cd ~ |
||||
|
git clone https://github.com/nanomsg/nanomsg |
||||
|
cd nanomsg |
||||
|
mkdir build |
||||
|
cd build |
||||
|
cmake .. -DNN_TESTS=OFF -DNN_ENABLE_DOC=OFF |
||||
|
cmake --build . -j$(nproc) |
||||
|
sudo cmake --build . --target install |
||||
|
sudo ldconfig |
@ -0,0 +1,4 @@ |
|||||
|
cd ~ |
||||
|
git clone https://github.com/jl777/SuperNET |
||||
|
cd SuperNET/iguana |
||||
|
git checkout beta |
@ -0,0 +1,21 @@ |
|||||
|
#!/bin/bash |
||||
|
if [ "$1" = "" ] |
||||
|
then |
||||
|
echo "no coin specified" |
||||
|
echo "Enter infomation in the format:" |
||||
|
echo "./makeconf.sh datadir coinname" |
||||
|
echo "Example:" |
||||
|
echo "./makeconf.sh .dashcore dash" |
||||
|
else |
||||
|
confpath="$2.conf" |
||||
|
rpcuser=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1) |
||||
|
rpcpassword=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1) |
||||
|
mkdir "/mnt/$2_data" |
||||
|
ln -s /mnt/$2_data ~/$1 |
||||
|
cd ~/$1 |
||||
|
echo "rpcuser=$rpcuser" > $confpath |
||||
|
echo "rpcpassword=$rpcpassword" >> $confpath |
||||
|
echo "server=1" >> $confpath |
||||
|
echo "deamon=1" >> $confpath |
||||
|
echo "txindex=1" >> $confpath |
||||
|
fi |
@ -0,0 +1,6 @@ |
|||||
|
cd ~/scripts |
||||
|
sed -n 's|.*"btcpubkey":"\([^"]*\)".*|pubkey=\1|p' ~/scripts/wallet.txt > pubkey.txt |
||||
|
cp pubkey.txt ~/komodo/src |
||||
|
cp pubkey.txt ~/SuperNET/iguana |
||||
|
cd ~/SuperNET/iguana |
||||
|
echo home/$USER > userhome.txt |
@ -0,0 +1,26 @@ |
|||||
|
cd ~ |
||||
|
#Link Bitcoin Exec's. |
||||
|
sudo ln -sf /home/$USER/bitcoin/src/bitcoin-cli /usr/local/bin/bitcoin-cli |
||||
|
sudo ln -sf /home/$USER/bitcoin/src/bitcoind /usr/local/bin/bitcoind |
||||
|
|
||||
|
#Link Komodo Exec's. |
||||
|
sudo ln -sf /home/$USER/komodo/src/komodo-cli /usr/local/bin/komodo-cli |
||||
|
sudo ln -sf /home/$USER/komodo/src/komodod /usr/local/bin/komodod |
||||
|
|
||||
|
#Link Chips Exec's |
||||
|
sudo ln -sf /home/$USER/chips3/src/chips-cli /usr/local/bin/chips-cli |
||||
|
sudo ln -sf /home/$USER/chips3/src/chipsd /usr/local/bin/chipsd |
||||
|
|
||||
|
#Link GameCredits |
||||
|
sudo ln -sf /home/$USER/GameCredits/src/gamecredits-cli /usr/local/bin/gamecredits-cli |
||||
|
sudo ln -sf /home/$USER/GameCredits/src/gamecredits-cli /usr/local/bin/gc-cli |
||||
|
sudo ln -sf /home/$USER/GameCredits/src/gamecreditsd /usr/local/bin/gamecreditsd |
||||
|
|
||||
|
#Link scripts |
||||
|
sudo ln -sf /home/$USER/scripts/acsplit /usr/local/bin/acsplit |
||||
|
sudo ln -sf /home/$USER/scripts/assets-cli /usr/local/bin/assets-cli |
||||
|
|
||||
|
|
||||
|
#Link Hush Exec's |
||||
|
sudo ln -sf /home/$USER/hush/src/hush-cli /usr/local/bin/hush-cli |
||||
|
sudo ln -sf /home/$USER/hush/src/hushd /usr/local/bin/hushd |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue