From 236ab3d3a0e3b15258fc2cb35684d24c1e224ea7 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 24 Jun 2019 15:18:42 +0800 Subject: [PATCH] initial commit for dual iguanas --- iguana/add_coins | 18 ++------ iguana/build_iguana | 14 ------- iguana/coins/{chips_7776 => chips_7779} | 2 +- iguana/coins/{emc2_7776 => emc2_7779} | 3 +- iguana/coins/{game_7776 => game_7779} | 2 +- iguana/coins/{gin_7776 => gin_7779} | 2 +- iguana/dpowassets | 56 +++---------------------- iguana/m_notary_3rdparty | 38 +++++++++++++++++ iguana/m_notary_KMD | 24 +++++++++++ iguana/m_notary_black | 32 -------------- iguana/m_notary_build | 5 ++- iguana/main.c | 8 ++-- 12 files changed, 82 insertions(+), 122 deletions(-) delete mode 100755 iguana/build_iguana rename iguana/coins/{chips_7776 => chips_7779} (83%) rename iguana/coins/{emc2_7776 => emc2_7779} (93%) rename iguana/coins/{game_7776 => game_7779} (93%) rename iguana/coins/{gin_7776 => gin_7779} (86%) create mode 100755 iguana/m_notary_3rdparty create mode 100755 iguana/m_notary_KMD delete mode 100755 iguana/m_notary_black diff --git a/iguana/add_coins b/iguana/add_coins index 134b4c4c1..c683257ab 100755 --- a/iguana/add_coins +++ b/iguana/add_coins @@ -1,30 +1,20 @@ #!/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") +# add KMD coins/kmd_7776 +# Unlock wallet. ./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 +# Add VRSC/HUSH3 manually as its not listed in the assetchains.json coins/vrsc_7776 -coins/hush_7776 -coins/emc2_7776 -coins/gin_7776 +coins/hush3_7776 diff --git a/iguana/build_iguana b/iguana/build_iguana deleted file mode 100755 index fdb85a100..000000000 --- a/iguana/build_iguana +++ /dev/null @@ -1,14 +0,0 @@ -#!/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 *.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 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 -lsodium diff --git a/iguana/coins/chips_7776 b/iguana/coins/chips_7779 similarity index 83% rename from iguana/coins/chips_7776 rename to iguana/coins/chips_7779 index 38f1e5f1c..1af9dc6b9 100755 --- a/iguana/coins/chips_7776 +++ b/iguana/coins/chips_7779 @@ -1,2 +1,2 @@ #!/bin/bash -curl --url "http://127.0.0.1:7776" --data "{\"conf\":\"chips.conf\",\"path\":\"${HOME#"/"}/.chips\",\"prefetchlag\":-1,\"poll\":1,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"CHIPS\",\"startpend\":64,\"endpend\":64,\"services\":0,\"maxpeers\":512,\"RELAY\":-1,\"VALIDATE\":0,\"portp2p\":57777,\"minconfirms\":1,\"pubval\":60,\"p2shval\":85,\"wifval\":188}" +curl --url "http://127.0.0.1:7779" --data "{\"conf\":\"chips.conf\",\"path\":\"${HOME#"/"}/.chips\",\"prefetchlag\":-1,\"poll\":1,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"CHIPS\",\"startpend\":64,\"endpend\":64,\"services\":0,\"maxpeers\":512,\"RELAY\":-1,\"VALIDATE\":0,\"portp2p\":57777,\"minconfirms\":1,\"pubval\":60,\"p2shval\":85,\"wifval\":188}" diff --git a/iguana/coins/emc2_7776 b/iguana/coins/emc2_7779 similarity index 93% rename from iguana/coins/emc2_7776 rename to iguana/coins/emc2_7779 index 0a3724132..e7a2896d4 100755 --- a/iguana/coins/emc2_7776 +++ b/iguana/coins/emc2_7779 @@ -1,4 +1,3 @@ #!/bin/bash -curl --url "http://127.0.0.1:7776" --data "{\"txfee\":0.01,\"conf\":\"einsteinium.conf\",\"path\":\"${HOME#"/"}/.einsteinium\",\"RELAY\":-1,\"VALIDATE\":0,\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":68,\"endpend\":68,\"services\":129,\"maxpeers\":256,\"newcoin\":\"EMC2\",\"name\":\"Einsteinium\",\"hasheaders\":1,\"useaddmultisig\":0,\"netmagic\":\"e8f1c4ac\",\"p2p\":41878,\"rpc\":41879,\"pubval\":33,\"p2shval\":5,\"wifval\":176,\"txfee_satoshis\":\"1000000\",\"isPoS\":0,\"minoutput\":10000,\"minconfirms\":2,\"genesishash\":\"4e56204bb7b8ac06f860ff1c845f03f984303b5b97eb7b42868f714611aed94b\",\"genesis\":{\"version\":1,\"timestamp\":1392841423,\"nBits\":\"1e0ffff0\",\"nonce\":3236648,\"merkle_root\":\"b3e47e8776012ee4352acf603e6b9df005445dcba85c606697f422be3cc26f9b\"},\"alertpubkey\":\"040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9\",\"protover\":70015}" - +curl --url "http://127.0.0.1:7779" --data "{\"txfee\":0.01,\"conf\":\"einsteinium.conf\",\"path\":\"${HOME#"/"}/.einsteinium\",\"RELAY\":-1,\"VALIDATE\":0,\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":68,\"endpend\":68,\"services\":129,\"maxpeers\":256,\"newcoin\":\"EMC2\",\"name\":\"Einsteinium\",\"hasheaders\":1,\"useaddmultisig\":0,\"netmagic\":\"e8f1c4ac\",\"p2p\":41878,\"rpc\":41879,\"pubval\":33,\"p2shval\":5,\"wifval\":176,\"txfee_satoshis\":\"1000000\",\"isPoS\":0,\"minoutput\":10000,\"minconfirms\":2,\"genesishash\":\"4e56204bb7b8ac06f860ff1c845f03f984303b5b97eb7b42868f714611aed94b\",\"genesis\":{\"version\":1,\"timestamp\":1392841423,\"nBits\":\"1e0ffff0\",\"nonce\":3236648,\"merkle_root\":\"b3e47e8776012ee4352acf603e6b9df005445dcba85c606697f422be3cc26f9b\"},\"alertpubkey\":\"040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9\",\"protover\":70015}" diff --git a/iguana/coins/game_7776 b/iguana/coins/game_7779 similarity index 93% rename from iguana/coins/game_7776 rename to iguana/coins/game_7779 index 655fae616..fdbe9a3ba 100755 --- a/iguana/coins/game_7776 +++ b/iguana/coins/game_7779 @@ -1,2 +1,2 @@ #!/bin/bash -curl --url "http://127.0.0.1:7776" --data "{\"txfee\":0.01,\"conf\":\"gamecredits.conf\",\"path\":\"${HOME#"/"}/.gamecredits\",\"startpend\":8,\"endpend\":4,\"services\":129,\"RELAY\":-1,\"VALIDATE\":0,\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"maxpeers\":256,\"newcoin\":\"GAME\",\"name\":\"gamecredits\",\"netmagic\":\"fbc0b6db\",\"p2p\":40002,\"rpc\":40001,\"pubval\":38,\"p2shval\":5,\"wifval\":166,\"txfee_satoshis\":\"1000000\",\"minconfirms\":2,\"genesishash\":\"91ec5f25ee9a0ffa1af7d4da4db9a552228dd2dc77cdb15b738be4e1f55f30ee\",\"genesis\":{\"hashalgo\":\"scrypt\",\"version\":1,\"timestamp\":1392757140,\"nBits\":\"1e0ffff0\",\"nonce\":2084565393,\"merkle_root\":\"d849db99a14164f4b4c8ad6d2d8d7e2b1ba7f89963e9f4bf9fad5ff1a4754429\"},\"alertpubkey\":\"04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284\",\"auxpow\":1,\"protover\":80006,\"isPoS\":0,\"fixit\":0}" +curl --url "http://127.0.0.1:7779" --data "{\"txfee\":0.01,\"conf\":\"gamecredits.conf\",\"path\":\"${HOME#"/"}/.gamecredits\",\"startpend\":8,\"endpend\":4,\"services\":129,\"RELAY\":-1,\"VALIDATE\":0,\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"maxpeers\":256,\"newcoin\":\"GAME\",\"name\":\"gamecredits\",\"netmagic\":\"fbc0b6db\",\"p2p\":40002,\"rpc\":40001,\"pubval\":38,\"p2shval\":5,\"wifval\":166,\"txfee_satoshis\":\"1000000\",\"minconfirms\":2,\"genesishash\":\"91ec5f25ee9a0ffa1af7d4da4db9a552228dd2dc77cdb15b738be4e1f55f30ee\",\"genesis\":{\"hashalgo\":\"scrypt\",\"version\":1,\"timestamp\":1392757140,\"nBits\":\"1e0ffff0\",\"nonce\":2084565393,\"merkle_root\":\"d849db99a14164f4b4c8ad6d2d8d7e2b1ba7f89963e9f4bf9fad5ff1a4754429\"},\"alertpubkey\":\"04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284\",\"auxpow\":1,\"protover\":80006,\"isPoS\":0,\"fixit\":0}" diff --git a/iguana/coins/gin_7776 b/iguana/coins/gin_7779 similarity index 86% rename from iguana/coins/gin_7776 rename to iguana/coins/gin_7779 index 4ce284809..f11a96beb 100755 --- a/iguana/coins/gin_7776 +++ b/iguana/coins/gin_7779 @@ -1,2 +1,2 @@ #!/bin/bash -curl --url "http://127.0.0.1:7776" --data "{\"conf\":\"gincoin.conf\",\"path\":\"${HOME#"/"}/.gincoincore\",\"prefetchlag\":-1,\"poll\":1,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"GIN\",\"startpend\":64,\"endpend\":64,\"services\":0,\"maxpeers\":512,\"RELAY\":-1,\"VALIDATE\":0,\"portp2p\":10111,\"minconfirms\":1,\"name\":\"gincoin\",\"netmagic\":\"bf0c6bbd\",\"p2p\":10111,\"rpc\":10211,\"pubval\":38,\"p2shval\":10,\"wifval\":198}" +curl --url "http://127.0.0.1:7779" --data "{\"conf\":\"gincoin.conf\",\"path\":\"${HOME#"/"}/.gincoincore\",\"prefetchlag\":-1,\"poll\":1,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"GIN\",\"startpend\":64,\"endpend\":64,\"services\":0,\"maxpeers\":512,\"RELAY\":-1,\"VALIDATE\":0,\"portp2p\":10111,\"minconfirms\":1,\"name\":\"gincoin\",\"netmagic\":\"bf0c6bbd\",\"p2p\":10111,\"rpc\":10211,\"pubval\":38,\"p2shval\":10,\"wifval\":198}" diff --git a/iguana/dpowassets b/iguana/dpowassets index 10ec7f97b..732734bb8 100755 --- a/iguana/dpowassets +++ b/iguana/dpowassets @@ -4,56 +4,12 @@ source pubkey.txt echo $pubkey sleep 3 -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"REVS\",\"pubkey\":\"$pubkey\"}" - -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SUPERNET\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"DEX\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PANGEA\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"JUMBLR\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BET\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CRYPTO\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HODL\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MSHARK\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BOTS\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MGW\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"COQUI\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"WLC\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KV\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CEAL\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MESH\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"AXO\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ETOMIC\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BTCH\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHAIN\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NINJA\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"OOT\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BNTN\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PRLPAY\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"DSEC\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GLXT\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EQL\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ZILLA\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHIPS\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GAME\",\"freq\":5,\"pubkey\":\"$pubkey\"}" +# add non default assetchains here, VRSC and HUSH because not in assetchains.json, and RFOX because its freq=10. curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RFOX\",\"freq\":10,\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"VRSC\",\"freq\":10,\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SEC\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CCL\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HUSH\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PIRATE\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MGNX\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EMC2\",\"freq\":5,\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PGT\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KMDICE\",\"freq\":2,\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"DION\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KSB\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"OUR\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GIN\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ILN\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RICK\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MORTY\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"VOTE2019\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HUSH3\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KOIN\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ZEXO\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"K64\",\"pubkey\":\"$pubkey\"}" + +# Loop through assetchains.json and call dpow for them. ROFX will not add a second time. +~/komodo/src/listassetchains | while read chain; do + curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"$chain\",\"pubkey\":\"$pubkey\"}" +done diff --git a/iguana/m_notary_3rdparty b/iguana/m_notary_3rdparty new file mode 100755 index 000000000..5b55af114 --- /dev/null +++ b/iguana/m_notary_3rdparty @@ -0,0 +1,38 @@ +#!/bin/bash +# manually kill the iguana you need to restart first! +# unlock any locked utxos. This will unlcok utxos for both pubkeys, need a filter for address to only unlock the pubkey you need to restart. +komodo-cli lockunspent true `komodo-cli listlockunspent | jq -c .` + +# Start 3rd party iguana, no split is default on this branch. This uses RPC port 7779, allows 2 iguana on same OS, incase OP does not have capacity to use 2 VM or 2 servers. +stdbuf -oL $1 ../agents/iguana 3rd_party & #> iguana.log 2> error.log & + +myip=`curl -s4 checkip.amazonaws.com` +source pubkey.txt + +sleep 4 +curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"SuperNET\",\"method\":\"myipaddr\",\"ipaddr\":\"$myip\"}" +sleep 3 + +# TODO: Need to get some seeds for both networks. +curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"103.6.12.117\"}" + + +# unlock wallet +./wp_7779 + +# add 3rd party coins to iguana +coins/chips_7779 +coins/game_7779 +coins/emc2_7779 +coins/gin_7779 + +sleep 30 + +# dpow for 3rd party coins. +source pubkey.txt +echo $pubkey +sleep 3 +curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHIPS\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GAME\",\"freq\":5,\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EMC2\",\"freq\":5,\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GIN\",\"pubkey\":\"$pubkey\"}" diff --git a/iguana/m_notary_KMD b/iguana/m_notary_KMD new file mode 100755 index 000000000..7ac5b560c --- /dev/null +++ b/iguana/m_notary_KMD @@ -0,0 +1,24 @@ +#!/bin/bash +# manually kill the iguana you need to restart first! +# unlock any locked utxos. This will unlock utxos for both iguans, need a filter for address to only unlock the pubkey you need to restart. +komodo-cli lockunspent true `komodo-cli listlockunspent | jq -c .` + +# Start normally, no split is default on this branch. +stdbuf -oL $1 ../agents/iguana notary & #> iguana.log 2> error.log & + +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 + +# TODO: Need to get some seeds for both networks. +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"103.6.12.105\"}" + +# This will add all KMD assetchains from assetchains.json. +./add_coins + +sleep 30 +# dpow for KMD-> BTC. +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KMD\",\"pubkey\":\"$pubkey\"}" diff --git a/iguana/m_notary_black b/iguana/m_notary_black deleted file mode 100755 index 927912bd4..000000000 --- a/iguana/m_notary_black +++ /dev/null @@ -1,32 +0,0 @@ -#!/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\"}" diff --git a/iguana/m_notary_build b/iguana/m_notary_build index c752f97ce..50f919039 100755 --- a/iguana/m_notary_build +++ b/iguana/m_notary_build @@ -1,8 +1,9 @@ #!/bin/bash +rm -f ../agents/iguana *.o 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 +clang -g -Wno-deprecated -c -O2 -DISNOTARYNODE=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 -Wno-deprecated -c -DISNOTARYNODE=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 -lsodium diff --git a/iguana/main.c b/iguana/main.c index 0cadb8437..cb337c4e4 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -2250,17 +2250,15 @@ void iguana_main(void *arg) } else if ( strncmp((char *)arg,"notary",strlen("notary")) == 0 ) // must be second to last { - if ( strcmp((char *)arg,"notary_thirdparty") == 0 ) - myinfo->rpcport = IGUANA_NOTARYPORT2; - else - myinfo->rpcport = IGUANA_NOTARYPORT; + myinfo->rpcport = IGUANA_NOTARYPORT; myinfo->nosplit = 1; myinfo->IAMNOTARY = 1; myinfo->DEXEXPLORER = 0;//1; disable as SPV is used now } else { - myinfo->rpcport = IGUANA_NOTARYPORT; + // this means that an elected file was specified for 3rd party network, so use diffrent RPC port. + myinfo->rpcport = IGUANA_NOTARYPORT2; myinfo->IAMNOTARY = 1; myinfo->DEXEXPLORER = 0;//1; disable as SPV is used now elected = (char *)arg;