Browse Source

add start iguana scripts of mine

blackjok3r
blackjok3r 6 years ago
parent
commit
a1898a1976
  1. 29
      iguana/add_coins
  2. 14
      iguana/build_iguana
  3. 32
      iguana/m_notary_black

29
iguana/add_coins

@ -0,0 +1,29 @@
#!/bin/bash
# We don't add BEER/PIZZA to iguana so skip them, more skips can be added, mauybe this can be pulled as a prarm from assetchains.json?
declare -a skip=("BEER" "PIZZA")
coins/kmd_7776
./wp_7776
# external coins.
coins/btc_7776
coins/chips_7776
coins/game_7776
# Unlock wallet. Does it have the be here exactly? Or can we call this somewhere else?
# Loop through assetchains.json and build the path to the approptiate coins file and run it.
~/komodo/src/listassetchains | while read chain; do
if [[ " ${skip[@]} " =~ " ${chain} " ]]; then
pointless=0
else
coin="coins/$(echo $chain | awk '{print tolower($0)}')_7776"
$coin
fi
done
# Add VRSC manually as its not listed in the assetchains.json
coins/vrsc_7776
coins/hush_7776
coins/emc2_7776

14
iguana/build_iguana

@ -0,0 +1,14 @@
#!/bin/bash
# I added to command to remove iguana executable here, for simplification. Do all things related to this in one script.
rm -f ../agents/iguana *.o
# the build options, for SHA256 a seperate build script can be made? eg. ./build_iguana_HWSHA256
cd secp256k1; ./m_unix; cd ..
cd ../crypto777; ./m_LP; cd ../iguana
#gcc -g -fno-aggressive-loop-optimizations -Wno-deprecated -c -O2 -DISNOTARYNODE=1 -DLIQUIDITY_PROVIDER=1 *.c ../basilisk/basilisk.c ../gecko/gecko.c ../datachain/datachain.c
clang -g -Wno-deprecated -c -O2 -DISNOTARYNODE=1 -DLIQUIDITY_PROVIDER=1 *.c ../basilisk/basilisk.c ../gecko/gecko.c ../datachain/datachain.c
#gcc -g -fno-aggressive-loop-optimizations -Wno-deprecated -c -DISNOTARYNODE=1 -DLIQUIDITY_PROVIDER=1 main.c iguana777.c iguana_bundles.c ../basilisk/basilisk.c
clang -g -Wno-deprecated -c -DISNOTARYNODE=1 -DLIQUIDITY_PROVIDER=1 main.c iguana777.c iguana_bundles.c ../basilisk/basilisk.c
clang -g -o ../agents/iguana *.o ../agents/libcrypto777.a -lnanomsg -lcurl -lssl -lcrypto -lpthread -lz -lm

32
iguana/m_notary_black

@ -0,0 +1,32 @@
#!/bin/bash
# I have extra changes here, on how I launch iguana, if you have a custom build script for SHA256 hardware instructions etc, you cal call this first, then run either the default sript or your own one like I do here.
komodo-cli lockunspent true `komodo-cli listlockunspent | jq -c .`
pkill -15 iguana
sleep 2
# Start normally with nosplit
#stdbuf -oL $1 ../agents/iguana notary_nosplit & #> iguana.log 2> error.log &
# Start with -19 nice on all threads (might not be optimal, could slow down listunspent on komodod)
sudo nice -n -19 su -c "stdbuf -oL $1 ../agents/iguana notary_nosplit" node &
sleep 1
# Set main iguana process as -19 nice, this does help.
#sudo renice -19 $(pidof iguana)
myip=`curl -s4 checkip.amazonaws.com`
source pubkey.txt
sleep 4
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"SuperNET\",\"method\":\"myipaddr\",\"ipaddr\":\"$myip\"}"
sleep 3
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"145.239.204.33\"}"
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"74.208.211.94\"}"
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"138.121.203.210\"}"
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"37.9.62.186\"}"
# All the coins to be activated are moved to a new script, and will be standard for all nodes, you just call this scipt after any special changes.When new coins are added, you don't need to check ot change anything in your own scripts.
./add_coins
sleep 30
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KMD\",\"pubkey\":\"$pubkey\"}"
Loading…
Cancel
Save