Browse Source

new file: a-team/README.md

new file:   a-team/scripts/acsplit
	new file:   a-team/scripts/assets-cli
	new file:   a-team/scripts/coinlist
	new file:   a-team/scripts/coinlist.dpow
	new file:   a-team/scripts/cron_splitfunds
	new file:   a-team/scripts/install/01-notary.conf
	new file:   a-team/scripts/install/applytweaks.sh
	new file:   a-team/scripts/install/buildbitcoin.sh
	new file:   a-team/scripts/install/buildchips.sh
	new file:   a-team/scripts/install/buildkomodo.sh
	new file:   a-team/scripts/install/genwallet.sh
	new file:   a-team/scripts/install/genwallet2.sh
	new file:   a-team/scripts/install/importprivkeys.sh
	new file:   a-team/scripts/install/install.sh
	new file:   a-team/scripts/install/installnanomsg.sh
	new file:   a-team/scripts/install/installsupernet.sh
	new file:   a-team/scripts/install/maketxt.sh
	new file:   a-team/scripts/install/symlinks.sh
	new file:   a-team/scripts/install/test.sh
	new file:   a-team/scripts/install/validateaddress.sh
	new file:   a-team/scripts/install/wp_7776
	new file:   a-team/scripts/mineassets
	new file:   a-team/scripts/rescan
	new file:   a-team/scripts/start
	new file:   a-team/scripts/start.first
	new file:   a-team/scripts/startassets
	new file:   a-team/scripts/stats
	new file:   a-team/scripts/stop
	new file:   a-team/scripts/sync_assets
	new file:   a-team/scripts/testnet/Nstats
	new file:   a-team/scripts/testnet/acsplit
	new file:   a-team/scripts/testnet/cron_splitfund
	new file:   a-team/scripts/testnet/genBEER
	new file:   a-team/scripts/testnet/genPIZZA
	new file:   a-team/scripts/testnet/genVOTE2018
	new file:   a-team/scripts/testnet/mineassets
	new file:   a-team/scripts/testnet/pubkey.txt
	new file:   a-team/scripts/testnet/start
	new file:   a-team/scripts/testnet/startassets
	new file:   a-team/scripts/testnet/stats
	new file:   a-team/scripts/testnet/stats.new
	new file:   a-team/scripts/testnet/testlist
	new file:   a-team/scripts/testnet/testnet-cli
revert-24-test_rpcbind_to_assetname
blackjok3r 7 years ago
parent
commit
ccbe73320d
  1. 164
      a-team/README.md
  2. 2
      a-team/scripts/acsplit
  3. 18
      a-team/scripts/assets-cli
  4. 27
      a-team/scripts/coinlist
  5. 25
      a-team/scripts/coinlist.dpow
  6. 73
      a-team/scripts/cron_splitfunds
  7. 28
      a-team/scripts/install/01-notary.conf
  8. 5
      a-team/scripts/install/applytweaks.sh
  9. 23
      a-team/scripts/install/buildbitcoin.sh
  10. 22
      a-team/scripts/install/buildchips.sh
  11. 7
      a-team/scripts/install/buildkomodo.sh
  12. 7
      a-team/scripts/install/genwallet.sh
  13. 9
      a-team/scripts/install/genwallet2.sh
  14. 7
      a-team/scripts/install/importprivkeys.sh
  15. 7
      a-team/scripts/install/install.sh
  16. 9
      a-team/scripts/install/installnanomsg.sh
  17. 4
      a-team/scripts/install/installsupernet.sh
  18. 6
      a-team/scripts/install/maketxt.sh
  19. 24
      a-team/scripts/install/symlinks.sh
  20. 4
      a-team/scripts/install/test.sh
  21. 10
      a-team/scripts/install/validateaddress.sh
  22. 2
      a-team/scripts/install/wp_7776
  23. 20
      a-team/scripts/mineassets
  24. 12
      a-team/scripts/rescan
  25. 10
      a-team/scripts/start
  26. 6
      a-team/scripts/start.first
  27. 25
      a-team/scripts/startassets
  28. 27
      a-team/scripts/stats
  29. 9
      a-team/scripts/stop
  30. 19
      a-team/scripts/sync_assets
  31. 2
      a-team/scripts/testnet/Nstats
  32. 2
      a-team/scripts/testnet/acsplit
  33. 49
      a-team/scripts/testnet/cron_splitfund
  34. 1
      a-team/scripts/testnet/genBEER
  35. 1
      a-team/scripts/testnet/genPIZZA
  36. 1
      a-team/scripts/testnet/genVOTE2018
  37. 20
      a-team/scripts/testnet/mineassets
  38. 1
      a-team/scripts/testnet/pubkey.txt
  39. 11
      a-team/scripts/testnet/start
  40. 19
      a-team/scripts/testnet/startassets
  41. 18
      a-team/scripts/testnet/stats
  42. 11
      a-team/scripts/testnet/stats.new
  43. 4
      a-team/scripts/testnet/testlist
  44. 17
      a-team/scripts/testnet/testnet-cli

164
a-team/README.md

@ -0,0 +1,164 @@
# Install Instructions:
- Install [Debian9](https://www.debian.org/distrib/netinst), with only the SSH server and "system utilities"
- Create your user in the install
- On reboot login as your user, then:
- ` export EDITOR=nano #skip if you can use vi `
- `visudo`
- Add your user to the Allow members of group etc line, replace $USER with your user name.
` $USER ALL=(ALL:ALL) ALL `
Save and Exit
Close SSH Session
On your local machine, assuming you have [created an SSH key pair](https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server):
> ` ssh-copy-id $USER@"ip address of your node" `
Answer yes then type the current user's password.
#### SSH to your node:
>` ssh $USER@IPADDRESS`
If it logs in without a password prompt, your key pair is installed and we can go ahead and disable password login (this disables root login by default because root has no key pair) and change the default SSH port. For our production Node, the SSH port will also be changed to a completely separate public internet IP address for security. You should do the same.
> `sudo nano /etc/ssh/sshd_config`
Scroll down to
>` #Port 22`
Remove the '#' and change the port, scroll down to
>`#PasswordAuthentication yes `
Remove the '#' and change 'yes' to 'no'
Save and Exit, then run the following commands to restart ssh server.
>` sudo systemctl stop sshd`
>`sudo systemctl start sshd`
>` logout `
#### Upload the scripts folder
Open a local terminal in the folder where the scripts.tar is located
>`sftp -P "ssh port" $USER@IPADDRESS`
> `put scripts.tar`
> `exit`
Login and extract the scripts so we can go ahead and install everything.
> ` ssh -p "ssh port" $USER@IPADDRESS`
> `tar -xvf scripts.tar`
#### Run the install script
>`cd ~/scripts/install`
>`./install.sh`
Enter your users password and answer `Y` to install the dependencies.
> Wait...... Be ready to enter user password again at sudo prompts at the end of the compilation. This will add sym-links for us for commands like:
> >komodo-cli
> chips-cli
> bitcoin-cli
> assets-cli
> acsplit
#### Sync all chains up to date.
> `cd ~/scripts`
`./start.first`
Wait a few min's... Start next one in new ssh session
`./sync_assets`
While this is running we can install nanomsg and iguana in another ssh session:
>`cd ~/scripts/install`
`./installnanomsg.sh`
`./installsupernet.sh`
Stop all chains after they have synced, you cannot proceed further until all chains are synced, this is important.
>`cd ~/scripts`
`./stop`
## Create the Wallet for your node.
In one SSH session run the following commands
>`cd ~/SuperNET/iguana`
`./m_LP`
`../agents/iguana elected`
##### Open a new SSH session for the following section.
The `genwallet.sh` script will create a random passphrase into ~/SuperNET/iguana/passphrase.txt, **if you have a passphrase already skip this step**.
>`cd ~/scripts/install`
`./genwallet.sh`
If you have a passphrase already create passphrase.txt with it.
>`cd ~/scripts/install`
`echo passphrase="your passphrase in quotes" > ~/SuperNET/iguana/passphrase.txt`
Generate the wallet.txt file
>`./genwallet2.sh`
Create pubkey and userhome txt files
>`./maketxt.sh`
Apply Cipi's network tweaks and increase open file limit
>`./applytweaks.sh`
Restart the OS to apply the tweaks and close all SSH sessions.
>`sudo reboot`
### SSH back into your node
At this point I like to use tmux as per advice of ns408.
>`sudo apt-get install tmux`
`tmux`
Split your screen into 4 terminals at least.
>`ctrl + b then press "`
`ctrl + b then press %`
`ctrl + b then press "up arrow key"`
`ctrl + b then press %`
If you lose SSH session or want to logout and resume session later, you can use: `tmux attach `after you ssh back in to resume this screen. My actual tmux setup has the top right screen split into 3. But set it up however you like. Here are some links I found helpful:
>> [A Gentle Introduction to tmux – Hacker Noon](https://hackernoon.com/a-gentle-introduction-to-tmux-8d784c404340)
>[Read The Tao of tmux | Leanpub](https://leanpub.com/the-tao-of-tmux/read)
Now we need to start all the coins and import our private keys. All the blockchains should be synced so this should not take long, provided your wallets are empty.
If you are importing a used passphrase and it has a balance, you need to either restore wallet.dat files here or importprivkey and then restart with a rescan.
>`./start.first `
Wait until komodod has finished loading blocks. On my node this takes about 5mins. Do this in another tmux terminal.
>`./sync_assets`
Wait until assetchains are all synced up. Could take about 15mins.
#### Now ready to start importing private keys
>`cd ~/scripts/install`
`./importprivkeys.sh`
Check the keys were validated, look for ismine: true. There is a 1s delay between each coin to make it easy to read.
>`./validateaddress.sh`
If everything went well you can now stop the node and we can get it running.
>`cd ~/scripts`
`./stop`
If your passphrase is new and there have never been any funds sent to them. You can now start the node! Skip this step.
**ONLY PREFORM THIS STEP IF YOU ALREADY HAVE FUNDS IN YOUR NODE WALLET IT WILL TAKE A LONG TIME**
>`cd ~/scripts`
`./rescan`
This could take some hours, unless you are using *shossain's* server from the future. To check progress use something like:
>`tail ~/.komodo/debug.log -f`
`tail ~/.komodo/OOT/debug.log -f`
Once its all finished stop everything again.
>`~/scripts/stop`
We are all finished installing and are now ready to start the node, up to you but I find each command in a new tmux terminal best so you can monitor the outputs.
>`./start `
Start assets mines 10% of assets randomly, mine assets mines them all. Use this option if you have a server from the future.
>`./startassets or ./mineassets`
Once everything is loaded and synced up we can launch iguana and start dpow
>`cd ~/SuperNET/iguana`
`git checkout beta && ./m_notary && cd ~/komodo/src && ./dpowassets`
Congrats, you have installed your Notary Node and it should be running. Other things maybe to look at are setting up `ufw` for a software firewall to block all ports that are not being used. A sample script is included in the scripts folder from node operator *karasugoi*, called PORT_LIST.txt.
The wallet.txt file in the scripts folder is no longer required. You should write its contents down or encrypt it and keep a copy along with passphrase.txt somewhere very safe in case your node dies and you need to recover the funds in the address or migrate to a new server.
The passphrase.txt file is used by `wp_7776` to unlock the iguana wallet on node start-up. In the old guide, this passphrase was entered into the file directly, I just moved it to its own file. If anyone has a better or more secure way of doing this step please let me know. I am open to any collaboration to improve this document.

2
a-team/scripts/acsplit

@ -0,0 +1,2 @@
#!/bin/bash
curl --url "http://127.0.0.1:7776" --data "{\"coin\":\""${1}"\",\"agent\":\"iguana\",\"method\":\"splitfunds\",\"satoshis\":\"50000\",\"sendflag\":1,\"duplicates\":"${2}"}"

18
a-team/scripts/assets-cli

@ -0,0 +1,18 @@
#!/bin/bash
cd ~/scripts/
source coinlist
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 $1 $2 $3 $4 $5 $6
sleep $delay
fi
count=$(( $count +1 ))
done

27
a-team/scripts/coinlist

@ -0,0 +1,27 @@
coinlist=(
'REVS 1300000'
'SUPERNET 816061'
'DEX 999999'
'PANGEA 999999'
'JUMBLR 999999'
'BET 999999'
'CRYPTO 999999'
'HODL 9999999'
'MSHARK 1400000'
'BOTS 999999'
'MGW 999999'
'COQUI 72000000'
'WLC 210000000'
'KV 1000000'
'CEAL 366666666'
'MESH 1000007'
'MNZ 257142858'
'AXO 200000000'
'ETOMIC 100000000'
'BTCH 20998641'
'VOTE2018 600000000'
'PIZZA 100000000'
'BEER 100000000'
'NINJA 100000000'
'OOT 216000000'
)

25
a-team/scripts/coinlist.dpow

@ -0,0 +1,25 @@
coinlist=(
'REVS 1300000'
'SUPERNET 816061'
'DEX 999999'
'PANGEA 999999'
'JUMBLR 999999'
'BET 999999'
'CRYPTO 999999'
'HODL 9999999'
'MSHARK 1400000'
'BOTS 999999'
'MGW 999999'
'COQUI 72000000'
'WLC 210000000'
'KV 1000000'
'CEAL 366666666'
'MESH 1000007'
'MNZ 257142858'
'AXO 200000000'
'ETOMIC 100000000'
'BTCH 20998641'
'VOTE2018 600000000'
'NINJA 100000000'
'OOT 216000000'
)

73
a-team/scripts/cron_splitfunds

@ -0,0 +1,73 @@
#!/bin/bash
#Input list of asset chains
source ~/scripts/coinlist.dpow
# Minimum number of UTXOs to maintain
MINUTXOS=100
# Amount of UTXOs to create at one time
SPLITAMNT=75
#Print Date and Time
now=$(date +"%Y-%m-%d %T%z")
printf "$now \n";
# Manual Check of BTC, CHIPS, KMD
echo "Checking BTC, CHIPS, KMD"
cd ~
echo -n BTC
UTXOS="$(bitcoin-cli listunspent | grep .0005 | wc -l)"
echo -n -e '\t\t';echo -n "$UTXOS"
if [ "$UTXOS" -lt "$MINUTXOS" ]
then
echo -n " - SPLITFUNDING BTC"
RESULT="$(acsplit BTC $SPLITAMNT)"
echo $RESULT
fi
echo ""
echo -n CHIPS
UTXOS="$(chips-cli listunspent | grep .0005 | wc -l)"
echo -n -e '\t\t';echo -n "$UTXOS"
if [ "$UTXOS" -lt "$MINUTXOS" ]
then
echo -n "SPLITFUNDING CHIPS"
RESULT="$(acsplit CHIPS $SPLITAMNT)"
echo $RESULT
fi
echo ""
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"

28
a-team/scripts/install/01-notary.conf

@ -0,0 +1,28 @@
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
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

5
a-team/scripts/install/applytweaks.sh

@ -0,0 +1,5 @@
sudo cp 01-notary.conf /etc/sysctl.d/
echo "tcp_bbr" | sudo tee --append /etc/modules-load.d/modules.conf
echo "* soft nofile 1000000" | sudo tee --append /etc/security/limits.conf
echo "* hard nofile 1000000" | sudo tee --append /etc/security/limits.conf
echo "session required pam_limits.so" | sudo tee --append /etc/pam.d/common-session

23
a-team/scripts/install/buildbitcoin.sh

@ -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)

22
a-team/scripts/install/buildchips.sh

@ -0,0 +1,22 @@
#Install Chips:
cd ~
git clone https://github.com/jl777/chips3.git
cd chips3/
#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)

7
a-team/scripts/install/buildkomodo.sh

@ -0,0 +1,7 @@
#Install Komodo
cd ~
git clone https://github.com/jl777/komodo
cd komodo
git checkout beta
./zcutil/fetch-params.sh
./zcutil/build.sh -j$(nproc)

7
a-team/scripts/install/genwallet.sh

@ -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

9
a-team/scripts/install/genwallet2.sh

@ -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

7
a-team/scripts/install/importprivkeys.sh

@ -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'

7
a-team/scripts/install/install.sh

@ -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

9
a-team/scripts/install/installnanomsg.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

4
a-team/scripts/install/installsupernet.sh

@ -0,0 +1,4 @@
cd ~
git clone https://github.com/jl777/SuperNET
cd SuperNET/iguana
git checkout beta

6
a-team/scripts/install/maketxt.sh

@ -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

24
a-team/scripts/install/symlinks.sh

@ -0,0 +1,24 @@
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
sudo chmod +x /usr/local/bin/bitcoin-cli
sudo chmod +x /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
sudo chmod +x /usr/local/bin/komodo-cli
sudo chmod +x /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
sudo chmod +x /usr/local/bin/chips-cli
sudo chmod +x /usr/local/bin/chipsd
#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 chmod +x /usr/local/bin/acsplit
sudo chmod +x /usr/local/bin/assets-cli

4
a-team/scripts/install/test.sh

@ -0,0 +1,4 @@
cd ~/scripts
BTCDwif=$(sed -n 's|.*"BTCDwif":"\([^"]*\)".*|\1|p' wallet.txt)
assets-cli 'importprivkey' $BTCDwif ' "" false'

10
a-team/scripts/install/validateaddress.sh

@ -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

2
a-team/scripts/install/wp_7776

@ -0,0 +1,2 @@
source ~/SuperNET/iguana/passphrase.txt
curl --url "http://127.0.0.1:7776" --data "{\"method\":\"walletpassphrase\",\"params\":[\"$passphrase\", 9999999]}"

20
a-team/scripts/mineassets

@ -0,0 +1,20 @@
#!/bin/bash
seed_ip=`getent hosts seed.mewhub.com | awk '{ print $1 }'`
source coinlist
source pubkey.txt
args=("$@")
count=0
delay=20
while [ "x${coinlist[count]}" != "x" ]
do
all=${coinlist[count]}
name=${all%% *}
supply=`expr "$all" : '.* \(.*\)'`
if [ "$name" != "" ]
then
gen=" -gen"
komodod -pubkey=$pubkey -ac_name=$name -ac_supply=$supply -addnode=$seed_ip $gen $args &
sleep $delay
fi
count=$(( $count +1 ))
done

12
a-team/scripts/rescan

@ -0,0 +1,12 @@
#!/bin/bash
echo "Rescanning Bitcoin"
bitcoind -rescan &
sleep 120
echo "Rescanning Chips"
chipsd -rescan &
sleep 120
echo "Rescanning Komodo"
komodod -rescan &
sleep 3600
echo "Rescanning Assets"
./sync_assets -rescan

10
a-team/scripts/start

@ -0,0 +1,10 @@
#!/bin/bash
source ~/komodo/src/pubkey.txt
echo "Starting Bitcoin"
bitcoind &
sleep 10
echo "Starting Chips"
chipsd &
sleep 10
echo "Starting Komodo"
komodod -gen -genproclimit=2 -notary -pubkey=$pubkey &

6
a-team/scripts/start.first

@ -0,0 +1,6 @@
#!/bin/bash
bitcoind &
sleep 10
chipsd &
sleep 10
komodod &

25
a-team/scripts/startassets

@ -0,0 +1,25 @@
#!/bin/bash
seed_ip=`getent hosts seed.mewhub.com | awk '{ print $1 }'`
source coinlist
source pubkey.txt
args=("$@")
count=0
delay=20
while [ "x${coinlist[count]}" != "x" ]
do
all=${coinlist[count]}
name=${all%% *}
supply=`expr "$all" : '.* \(.*\)'`
if [ "$name" != "" ]
then
if [ $[RANDOM % 10] == 1 ]
then
gen=" -gen"
else
gen=""
fi
komodod -pubkey=$pubkey -ac_name=$name -ac_supply=$supply -addnode=$seed_ip $gen $args &
sleep $delay
fi
count=$(( $count +1 ))
done

27
a-team/scripts/stats

@ -0,0 +1,27 @@
#!/bin/bash
cd ~/scripts/
source coinlist
count=0
IFS=
now=$(date +"%Y-%m-%d %T%z")
btcinfo=$(bitcoin-cli getinfo)
kmdinfo=$(komodo-cli getinfo)
chipsinfo=$(chips-cli getinfo)
printf "$now \n";
format="%-10s %8s %8s %8s %12s\n"
printf "$format" "-ASSET-" "-NTRZd-" "-UTXOs-" "-BLOX-" "-BAL-";
printf "$format" "BTC" "$(bitcoin-cli listtransactions "" 77777 | grep -- -0.00418000 | wc -l)" "$(bitcoin-cli listunspent | grep .0005 | wc -l)" "$(echo $btcinfo | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" "$(echo $btcinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')"
printf "$format" "KMD" "$(komodo-cli listtransactions "" 77777 | grep -- -0.00418000 | wc -l)" "$(komodo-cli listunspent | grep .0005 | wc -l)" "$(echo $kmdinfo | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" "$(echo $kmdinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')"
printf "$format" "CHIPS" "$(chips-cli listtransactions "" 77777 | grep -- -0.00418000 | wc -l)" "$(chips-cli listunspent | grep .0005 | wc -l)" "$(echo $chipsinfo | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" "$(echo $chipsinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')"
while [ "x${coinlist[count]}" != "x" ]
do
all=${coinlist[count]}
name=${all%% *}
if [ "$name" != "" ]
then
info=$(komodo-cli -ac_name=$name getinfo)
printf "$format" "$name" "$(komodo-cli -ac_name=$name listtransactions "" 77777 | grep -- -0.00418000 | wc -l)" "$(komodo-cli -ac_name=$name listunspent | grep .0005 | wc -l)" "$(echo $info | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" "$(echo $info | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')"
fi
count=$(( $count +1 ))
done

9
a-team/scripts/stop

@ -0,0 +1,9 @@
echo "Stopping Iguana"
pkill -15 iguana
assets-cli stop
echo "Stopping Komodo"
komodo-cli stop
echo "Stopping Chips"
chips-cli stop
echo "Stopping Bitcoin"
bitcoin-cli stop

19
a-team/scripts/sync_assets

@ -0,0 +1,19 @@
#!/bin/bash
seed_ip=`getent hosts seed.mewhub.com | awk '{ print $1 }'`
source coinlist
count=0
delay=20
while [ "x${coinlist[count]}" != "x" ]
do
all=${coinlist[count]}
name=${all%% *}
supply=`expr "$all" : '.* \(.*\)'`
if [ "$name" != "" ]
then
echo $name
komodod -ac_name=$name -ac_supply=$supply -addnode=$seed_ip $1 &
sleep $delay
fi
count=$(( $count +1 ))
done

2
a-team/scripts/testnet/Nstats

@ -0,0 +1,2 @@
curl --url "http://127.0.0.1:7776" --data "{\"pubkey\":\"$pubkey\",\"agent\":\"dpow\",\"method\":\"notarizations\",\"symbol\":\"PIZZA\",\"height\":5000,\"numblocks\":1000}"

2
a-team/scripts/testnet/acsplit

@ -0,0 +1,2 @@
#!/bin/bash
curl --url "http://127.0.0.1:7776" --data "{\"coin\":\""${1}"\",\"agent\":\"iguana\",\"method\":\"splitfunds\",\"satoshis\":\"50000\",\"sendflag\":1,\"duplicates\":"${2}"}"

49
a-team/scripts/testnet/cron_splitfund

@ -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"

1
a-team/scripts/testnet/genBEER

@ -0,0 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"conf\":\"BEER.conf\",\"path\":\"${HOME#"/"}/.komodo/BEER\",\"unitval\":\"20\",\"zcash\":1,\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":4,\"endpend\":4,\"services\":129,\"maxpeers\":8,\"newcoin\":\"BEER\",\"name\":\"BEER\",\"hasheaders\":1,\"useaddmultisig\":0,\"netmagic\":\"9fecbb6e\",\"p2p\":8922,\"rpc\":8923,\"pubval\":60,\"p2shval\":85,\"wifval\":188,\"txfee_satoshis\":\"10000\",\"isPoS\":0,\"minoutput\":10000,\"minconfirms\":2,\"genesishash\":\"027e3758c3a65b12aa1046462b486d0a63bfa1beae327897f56c5cfb7daaae71\",\"protover\":170002,\"genesisblock\":\"0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000000000000000000000000000000000000000000000000000000000000029ab5f490f0f0f200b00000000000000000000000000000000000000000000000000000000000000fd4005000d5ba7cda5d473947263bf194285317179d2b0d307119c2e7cc4bd8ac456f0774bd52b0cd9249be9d40718b6397a4c7bbd8f2b3272fed2823cd2af4bd1632200ba4bf796727d6347b225f670f292343274cc35099466f5fb5f0cd1c105121b28213d15db2ed7bdba490b4cedc69742a57b7c25af24485e523aadbb77a0144fc76f79ef73bd8530d42b9f3b9bed1c135ad1fe152923fafe98f95f76f1615e64c4abb1137f4c31b218ba2782bc15534788dda2cc08a0ee2987c8b27ff41bd4e31cd5fb5643dfe862c9a02ca9f90c8c51a6671d681d04ad47e4b53b1518d4befafefe8cadfb912f3d03051b1efbf1dfe37b56e93a741d8dfd80d576ca250bee55fab1311fc7b3255977558cdda6f7d6f875306e43a14413facdaed2f46093e0ef1e8f8a963e1632dcbeebd8e49fd16b57d49b08f9762de89157c65233f60c8e38a1f503a48c555f8ec45dedecd574a37601323c27be597b956343107f8bd80f3a925afaf30811df83c402116bb9c1e5231c70fff899a7c82f73c902ba54da53cc459b7bf1113db65cc8f6914d3618560ea69abd13658fa7b6af92d374d6eca9529f8bd565166e4fcbf2a8dfb3c9b69539d4d2ee2e9321b85b331925df195915f2757637c2805e1d4131e1ad9ef9bc1bb1c732d8dba4738716d351ab30c996c8657bab39567ee3b29c6d054b711495c0d52e1cd5d8e55b4f0f0325b97369280755b46a02afd54be4ddd9f77c22272b8bbb17ff5118fedbae2564524e797bd28b5f74f7079d532ccc059807989f94d267f47e724b3f1ecfe00ec9e6541c961080d8891251b84b4480bc292f6a180bea089fef5bbda56e1e41390d7c0e85ba0ef530f7177413481a226465a36ef6afe1e2bca69d2078712b3912bba1a99b1fbff0d355d6ffe726d2bb6fbc103c4ac5756e5bee6e47e17424ebcbf1b63d8cb90ce2e40198b4f4198689daea254307e52a25562f4c1455340f0ffeb10f9d8e914775e37d0edca019fb1b9c6ef81255ed86bc51c5391e0591480f66e2d88c5f4fd7277697968656a9b113ab97f874fdd5f2465e5559533e01ba13ef4a8f7a21d02c30c8ded68e8c54603ab9c8084ef6d9eb4e92c75b078539e2ae786ebab6dab73a09e0aa9ac575bcefb29e930ae656e58bcb513f7e3c17e079dce4f05b5dbc18c2a872b22509740ebe6a3903e00ad1abc55076441862643f93606e3dc35e8d9f2caef3ee6be14d513b2e062b21d0061de3bd56881713a1a5c17f5ace05e1ec09da53f99442df175a49bd154aa96e4949decd52fed79ccf7ccbce32941419c314e374e4a396ac553e17b5340336a1a25c22f9e42a243ba5404450b650acfc826a6e432971ace776e15719515e1634ceb9a4a35061b668c74998d3dfb5827f6238ec015377e6f9c94f38108768cf6e5c8b132e0303fb5a200368f845ad9d46343035a6ff94031df8d8309415bb3f6cd5ede9c135fdabcc030599858d803c0f85be7661c88984d88faa3d26fb0e9aac0056a53f1b5d0baed713c853c4a2726869a0a124a8a5bbc0fc0ef80c8ae4cb53636aa02503b86a1eb9836fcc259823e2692d921d88e1ffc1e6cb2bde43939ceb3f32a611686f539f8f7c9f0bf00381f743607d40960f06d347d1cd8ac8a51969c25e37150efdf7aa4c2037a2fd0516fb444525ab157a0ed0a7412b2fa69b217fe397263153782c0f64351fbdf2678fa0dc8569912dcd8e3ccad38f34f23bbbce14c6a26ac24911b308b82c7e43062d180baeac4ba7153858365c72c63dcf5f6a5b08070b730adb017aeae925b7d0439979e2679f45ed2f25a7edcfd2fb77a8794630285ccb0a071f5cce410b46dbf9750b0354aae8b65574501cc69efb5b6a43444074fee116641bb29da56c2b4a7f456991fc92b2\",\"debug\":0,\"seedipaddr\":\"78.47.196.146\"}"

1
a-team/scripts/testnet/genPIZZA

@ -0,0 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"conf\":\"PIZZA.conf\",\"path\":\"${HOME#"/"}/.komodo/PIZZA\",\"unitval\":\"20\",\"zcash\":1,\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":4,\"endpend\":4,\"services\":129,\"maxpeers\":8,\"newcoin\":\"PIZZA\",\"name\":\"PIZZA\",\"hasheaders\":1,\"useaddmultisig\":0,\"netmagic\":\"adbe523c\",\"p2p\":11607,\"rpc\":11608,\"pubval\":60,\"p2shval\":85,\"wifval\":188,\"txfee_satoshis\":\"10000\",\"isPoS\":0,\"minoutput\":10000,\"minconfirms\":2,\"genesishash\":\"027e3758c3a65b12aa1046462b486d0a63bfa1beae327897f56c5cfb7daaae71\",\"protover\":170002,\"genesisblock\":\"0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000000000000000000000000000000000000000000000000000000000000029ab5f490f0f0f200b00000000000000000000000000000000000000000000000000000000000000fd4005000d5ba7cda5d473947263bf194285317179d2b0d307119c2e7cc4bd8ac456f0774bd52b0cd9249be9d40718b6397a4c7bbd8f2b3272fed2823cd2af4bd1632200ba4bf796727d6347b225f670f292343274cc35099466f5fb5f0cd1c105121b28213d15db2ed7bdba490b4cedc69742a57b7c25af24485e523aadbb77a0144fc76f79ef73bd8530d42b9f3b9bed1c135ad1fe152923fafe98f95f76f1615e64c4abb1137f4c31b218ba2782bc15534788dda2cc08a0ee2987c8b27ff41bd4e31cd5fb5643dfe862c9a02ca9f90c8c51a6671d681d04ad47e4b53b1518d4befafefe8cadfb912f3d03051b1efbf1dfe37b56e93a741d8dfd80d576ca250bee55fab1311fc7b3255977558cdda6f7d6f875306e43a14413facdaed2f46093e0ef1e8f8a963e1632dcbeebd8e49fd16b57d49b08f9762de89157c65233f60c8e38a1f503a48c555f8ec45dedecd574a37601323c27be597b956343107f8bd80f3a925afaf30811df83c402116bb9c1e5231c70fff899a7c82f73c902ba54da53cc459b7bf1113db65cc8f6914d3618560ea69abd13658fa7b6af92d374d6eca9529f8bd565166e4fcbf2a8dfb3c9b69539d4d2ee2e9321b85b331925df195915f2757637c2805e1d4131e1ad9ef9bc1bb1c732d8dba4738716d351ab30c996c8657bab39567ee3b29c6d054b711495c0d52e1cd5d8e55b4f0f0325b97369280755b46a02afd54be4ddd9f77c22272b8bbb17ff5118fedbae2564524e797bd28b5f74f7079d532ccc059807989f94d267f47e724b3f1ecfe00ec9e6541c961080d8891251b84b4480bc292f6a180bea089fef5bbda56e1e41390d7c0e85ba0ef530f7177413481a226465a36ef6afe1e2bca69d2078712b3912bba1a99b1fbff0d355d6ffe726d2bb6fbc103c4ac5756e5bee6e47e17424ebcbf1b63d8cb90ce2e40198b4f4198689daea254307e52a25562f4c1455340f0ffeb10f9d8e914775e37d0edca019fb1b9c6ef81255ed86bc51c5391e0591480f66e2d88c5f4fd7277697968656a9b113ab97f874fdd5f2465e5559533e01ba13ef4a8f7a21d02c30c8ded68e8c54603ab9c8084ef6d9eb4e92c75b078539e2ae786ebab6dab73a09e0aa9ac575bcefb29e930ae656e58bcb513f7e3c17e079dce4f05b5dbc18c2a872b22509740ebe6a3903e00ad1abc55076441862643f93606e3dc35e8d9f2caef3ee6be14d513b2e062b21d0061de3bd56881713a1a5c17f5ace05e1ec09da53f99442df175a49bd154aa96e4949decd52fed79ccf7ccbce32941419c314e374e4a396ac553e17b5340336a1a25c22f9e42a243ba5404450b650acfc826a6e432971ace776e15719515e1634ceb9a4a35061b668c74998d3dfb5827f6238ec015377e6f9c94f38108768cf6e5c8b132e0303fb5a200368f845ad9d46343035a6ff94031df8d8309415bb3f6cd5ede9c135fdabcc030599858d803c0f85be7661c88984d88faa3d26fb0e9aac0056a53f1b5d0baed713c853c4a2726869a0a124a8a5bbc0fc0ef80c8ae4cb53636aa02503b86a1eb9836fcc259823e2692d921d88e1ffc1e6cb2bde43939ceb3f32a611686f539f8f7c9f0bf00381f743607d40960f06d347d1cd8ac8a51969c25e37150efdf7aa4c2037a2fd0516fb444525ab157a0ed0a7412b2fa69b217fe397263153782c0f64351fbdf2678fa0dc8569912dcd8e3ccad38f34f23bbbce14c6a26ac24911b308b82c7e43062d180baeac4ba7153858365c72c63dcf5f6a5b08070b730adb017aeae925b7d0439979e2679f45ed2f25a7edcfd2fb77a8794630285ccb0a071f5cce410b46dbf9750b0354aae8b65574501cc69efb5b6a43444074fee116641bb29da56c2b4a7f456991fc92b2\",\"debug\":0,\"seedipaddr\":\"78.47.196.146\"}"

1
a-team/scripts/testnet/genVOTE2018

@ -0,0 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"conf\":\"VOTE2018.conf\",\"path\":\"${HOME#"/"}/.komodo/VOTE2018\",\"unitval\":\"20\",\"zcash\":1,\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":100,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":4,\"endpend\":4,\"services\":129,\"maxpeers\":8,\"newcoin\":\"VOTE2018\",\"name\":\"VOTE2018\",\"hasheaders\":1,\"useaddmultisig\":0,\"netmagic\":\"e6f918ae\",\"p2p\":10316,\"rpc\":10317,\"pubval\":60,\"p2shval\":85,\"wifval\":188,\"txfee_satoshis\":\"10000\",\"isPoS\":0,\"minoutput\":10000,\"minconfirms\":2,\"genesishash\":\"027e3758c3a65b12aa1046462b486d0a63bfa1beae327897f56c5cfb7daaae71\",\"protover\":170002,\"genesisblock\":\"0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000000000000000000000000000000000000000000000000000000000000029ab5f490f0f0f200b00000000000000000000000000000000000000000000000000000000000000fd4005000d5ba7cda5d473947263bf194285317179d2b0d307119c2e7cc4bd8ac456f0774bd52b0cd9249be9d40718b6397a4c7bbd8f2b3272fed2823cd2af4bd1632200ba4bf796727d6347b225f670f292343274cc35099466f5fb5f0cd1c105121b28213d15db2ed7bdba490b4cedc69742a57b7c25af24485e523aadbb77a0144fc76f79ef73bd8530d42b9f3b9bed1c135ad1fe152923fafe98f95f76f1615e64c4abb1137f4c31b218ba2782bc15534788dda2cc08a0ee2987c8b27ff41bd4e31cd5fb5643dfe862c9a02ca9f90c8c51a6671d681d04ad47e4b53b1518d4befafefe8cadfb912f3d03051b1efbf1dfe37b56e93a741d8dfd80d576ca250bee55fab1311fc7b3255977558cdda6f7d6f875306e43a14413facdaed2f46093e0ef1e8f8a963e1632dcbeebd8e49fd16b57d49b08f9762de89157c65233f60c8e38a1f503a48c555f8ec45dedecd574a37601323c27be597b956343107f8bd80f3a925afaf30811df83c402116bb9c1e5231c70fff899a7c82f73c902ba54da53cc459b7bf1113db65cc8f6914d3618560ea69abd13658fa7b6af92d374d6eca9529f8bd565166e4fcbf2a8dfb3c9b69539d4d2ee2e9321b85b331925df195915f2757637c2805e1d4131e1ad9ef9bc1bb1c732d8dba4738716d351ab30c996c8657bab39567ee3b29c6d054b711495c0d52e1cd5d8e55b4f0f0325b97369280755b46a02afd54be4ddd9f77c22272b8bbb17ff5118fedbae2564524e797bd28b5f74f7079d532ccc059807989f94d267f47e724b3f1ecfe00ec9e6541c961080d8891251b84b4480bc292f6a180bea089fef5bbda56e1e41390d7c0e85ba0ef530f7177413481a226465a36ef6afe1e2bca69d2078712b3912bba1a99b1fbff0d355d6ffe726d2bb6fbc103c4ac5756e5bee6e47e17424ebcbf1b63d8cb90ce2e40198b4f4198689daea254307e52a25562f4c1455340f0ffeb10f9d8e914775e37d0edca019fb1b9c6ef81255ed86bc51c5391e0591480f66e2d88c5f4fd7277697968656a9b113ab97f874fdd5f2465e5559533e01ba13ef4a8f7a21d02c30c8ded68e8c54603ab9c8084ef6d9eb4e92c75b078539e2ae786ebab6dab73a09e0aa9ac575bcefb29e930ae656e58bcb513f7e3c17e079dce4f05b5dbc18c2a872b22509740ebe6a3903e00ad1abc55076441862643f93606e3dc35e8d9f2caef3ee6be14d513b2e062b21d0061de3bd56881713a1a5c17f5ace05e1ec09da53f99442df175a49bd154aa96e4949decd52fed79ccf7ccbce32941419c314e374e4a396ac553e17b5340336a1a25c22f9e42a243ba5404450b650acfc826a6e432971ace776e15719515e1634ceb9a4a35061b668c74998d3dfb5827f6238ec015377e6f9c94f38108768cf6e5c8b132e0303fb5a200368f845ad9d46343035a6ff94031df8d8309415bb3f6cd5ede9c135fdabcc030599858d803c0f85be7661c88984d88faa3d26fb0e9aac0056a53f1b5d0baed713c853c4a2726869a0a124a8a5bbc0fc0ef80c8ae4cb53636aa02503b86a1eb9836fcc259823e2692d921d88e1ffc1e6cb2bde43939ceb3f32a611686f539f8f7c9f0bf00381f743607d40960f06d347d1cd8ac8a51969c25e37150efdf7aa4c2037a2fd0516fb444525ab157a0ed0a7412b2fa69b217fe397263153782c0f64351fbdf2678fa0dc8569912dcd8e3ccad38f34f23bbbce14c6a26ac24911b308b82c7e43062d180baeac4ba7153858365c72c63dcf5f6a5b08070b730adb017aeae925b7d0439979e2679f45ed2f25a7edcfd2fb77a8794630285ccb0a071f5cce410b46dbf9750b0354aae8b65574501cc69efb5b6a43444074fee116641bb29da56c2b4a7f456991fc92b2\",\"debug\":0,\"seedipaddr\":\"78.47.196.146\"}"

20
a-team/scripts/testnet/mineassets

@ -0,0 +1,20 @@
#!/bin/bash
seed_ip=`getent hosts seed.mewhub.com | awk '{ print $1 }'`
source testlist
source pubkey.txt
args=("$@")
count=0
delay=20
while [ "x${coinlist[count]}" != "x" ]
do
all=${coinlist[count]}
name=${all%% *}
supply=`expr "$all" : '.* \(.*\)'`
if [ "$name" != "" ]
then
gen=" -gen"
komodod -pubkey=$pubkey -ac_name=$name -ac_supply=$supply -addnode=$seed_ip $gen $args &
sleep $delay
fi
count=$(( $count +1 ))
done

1
a-team/scripts/testnet/pubkey.txt

@ -0,0 +1 @@
pubkey=0244ef4a6b38ed112a0c50754cfe9eca8ecbef15c87cda86c1b2157e1a4545c962

11
a-team/scripts/testnet/start

@ -0,0 +1,11 @@
#!/bin/bash
source ~/komodo/src/pubkey.txt
echo "Starting Bitcoin"
bitcoind &
sleep 10
echo "Starting Chips"
chipsd &
sleep 10
echo "Starting Komodo"
komodod
#-notary -pubkey=$pubkey

19
a-team/scripts/testnet/startassets

@ -0,0 +1,19 @@
#!/bin/bash
seed_ip=`getent hosts seed.mewhub.com | awk '{ print $1 }'`
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 -ac_name=$name -ac_supply=$supply -addnode=$seed_ip &
sleep $delay
fi
count=$(( $count +1 ))
done

18
a-team/scripts/testnet/stats

@ -0,0 +1,18 @@
#!/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 .0005 | wc -l)%s\t\t-\t\t$(bitcoin-cli getwalletinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')\n";
kmdinfo=$(./komodo-cli getinfo)
beerinfo=$(./komodo-cli -ac_name=BEER getinfo)
pizzainfo=$(./komodo-cli -ac_name=PIZZA getinfo)
printf "KMD%s\t\t-\t\t$(./komodo-cli listunspent | grep .0005 | 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 "BEER%s\t\t$(./komodo-cli -ac_name=BEER listtransactions "" 77777 | grep -- -0.00418000 | wc -l)%s\t\t$(./komodo-cli -ac_name=BEER listunspent | grep .0005 | wc -l)%s\t\t"; printf "$beerinfo" | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//'; printf "%s\t\t"; printf "$beerinfo" | awk ' /\"balance\"/ {print $2}' | sed 's/,//';
printf "PIZZA%s\t\t$(./komodo-cli -ac_name=PIZZA listtransactions "" 77777 | grep -- -0.00418000 | wc -l)%s\t\t$(./komodo-cli -ac_name=PIZZA listunspent | grep .0005 | 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

11
a-team/scripts/testnet/stats.new

@ -0,0 +1,11 @@
#!/bin/bash
IFS=
cd ~/komodo/src
now=$(date +"%Y-%m-%d %T%z")
printf "$now \n";
format="%-10s %8s %8s %8s %12s\n"
printf "$format" "-ASSET-" "-NTRZd-" "-UTXOs-" "-BLOX-" "-BAL-";
printf "$format" "BTC" "-" "$(bitcoin-cli listunspent | grep .0005 | wc -l)" "-" "$(bitcoin-cli getwalletinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')";
printf "$format" "KMD" "-" "$(./komodo-cli listunspent | grep .0005 | wc -l)" "$(./komodo-cli getinfo | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" "$(./komodo-cli getinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')"
printf "$format" "BEER" "$(./komodo-cli -ac_name=BEER listtransactions "" 77777 | grep -- -0.00418000 | wc -l)" "$(./komodo-cli -ac_name=BEER listunspent | grep .0005 | wc -l)" "$(./komodo-cli -ac_name=BEER getinfo | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" "$(./komodo-cli -ac_name=BEER getinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')"
printf "$format" "PIZZA" "$(./komodo-cli -ac_name=PIZZA listtransactions "" 77777 | grep -- -0.00418000 | wc -l)" "$(./komodo-cli -ac_name=PIZZA listunspent | grep .0005 | wc -l)" "$(./komodo-cli -ac_name=PIZZA getinfo | awk ' /\"blocks\"/ {printf $2}' | sed 's/,//')" "$(./komodo-cli -ac_name=PIZZA getinfo | awk ' /\"balance\"/ {printf $2}' | sed 's/,//')"

4
a-team/scripts/testnet/testlist

@ -0,0 +1,4 @@
coinlist=(
'PIZZA 100000000'
'BEER 100000000'
)

17
a-team/scripts/testnet/testnet-cli

@ -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
Loading…
Cancel
Save