From 81c5ec4f3c70c7a5f8a523d81b2616a884d953e4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 18 Feb 2018 12:45:22 +0200 Subject: [PATCH 01/52] Dukeleto's https://github.com/zcash/zcash/pull/2931 --- src/txdb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/txdb.cpp b/src/txdb.cpp index 868d3d4cd..9a23596d9 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -302,6 +302,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts() pindexNew->nUndoPos = diskindex.nUndoPos; pindexNew->hashAnchor = diskindex.hashAnchor; pindexNew->nVersion = diskindex.nVersion; + pindexNew->hashReserved = diskindex.hashReserved; pindexNew->hashMerkleRoot = diskindex.hashMerkleRoot; pindexNew->nTime = diskindex.nTime; pindexNew->nBits = diskindex.nBits; From 5be9870f7755995cdca31d3a78d203559c23dde8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 19 Feb 2018 00:11:38 +0200 Subject: [PATCH 02/52] A comment --- src/komodo_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 231d1a3c4..b4b5297e2 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1535,7 +1535,7 @@ void komodo_args(char *argv0) } } } - ASSETCHAINS_CC = GetArg("-ac_cc",0); + ASSETCHAINS_CC = GetArg("-ac_cc",0); // keep it outside the assetchains hashing so KMD can do it and we dont have two identical chains other than -ac_cc if ( (KOMODO_REWIND= GetArg("-rewind",0)) != 0 ) { printf("KOMODO_REWIND %d\n",KOMODO_REWIND); From 877865e3ef4068ade16e55484c169d470368317d Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 21 Feb 2018 16:13:55 +0200 Subject: [PATCH 03/52] -couldnt open printout --- src/komodo_utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 2bc6ea1e7..6c984ca0b 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1399,7 +1399,7 @@ void komodo_configfile(char *symbol,uint16_t port) sprintf(KMDUSERPASS,"%s:%s",username,password); fclose(fp); //printf("KOMODO.(%s) -> userpass.(%s)\n",fname,KMDUSERPASS); - } else printf("couldnt open.(%s)\n",fname); + } // else printf("couldnt open.(%s)\n",fname); } uint16_t komodo_userpass(char *userpass,char *symbol) @@ -1610,7 +1610,7 @@ void komodo_args(char *argv0) sprintf(iter == 0 ? KMDUSERPASS : BTCUSERPASS,"%s:%s",username,password); fclose(fp); //printf("KOMODO.(%s) -> userpass.(%s)\n",fname,KMDUSERPASS); - } else printf("couldnt open.(%s)\n",fname); + } //else printf("couldnt open.(%s)\n",fname); if ( IS_KOMODO_NOTARY == 0 ) break; } From 6ec3d43c5c199f700980260b239d43668587da59 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 21 Feb 2018 16:15:42 +0200 Subject: [PATCH 04/52] -print --- src/komodo_utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index b4b5297e2..8db610e5d 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1399,7 +1399,7 @@ void komodo_configfile(char *symbol,uint16_t port) sprintf(KMDUSERPASS,"%s:%s",username,password); fclose(fp); //printf("KOMODO.(%s) -> userpass.(%s)\n",fname,KMDUSERPASS); - } else printf("couldnt open.(%s)\n",fname); + } //else printf("couldnt open.(%s)\n",fname); } uint16_t komodo_userpass(char *userpass,char *symbol) @@ -1657,7 +1657,7 @@ void komodo_args(char *argv0) sprintf(iter == 0 ? KMDUSERPASS : BTCUSERPASS,"%s:%s",username,password); fclose(fp); //printf("KOMODO.(%s) -> userpass.(%s)\n",fname,KMDUSERPASS); - } else printf("couldnt open.(%s)\n",fname); + } //else printf("couldnt open.(%s)\n",fname); if ( IS_KOMODO_NOTARY == 0 ) break; } From 71b9e59c5af147120ae379df771ee1fb9490f9af Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Feb 2018 12:00:08 +0200 Subject: [PATCH 05/52] Guard against set generate crash in regtest --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 72f25f1fc..99d66f4a2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4216,7 +4216,9 @@ void static CheckBlockIndex() // Build forward-pointing map of the entire block tree. std::multimap forward; for (BlockMap::iterator it = mapBlockIndex.begin(); it != mapBlockIndex.end(); it++) { - forward.insert(std::make_pair(it->second->pprev, it->second)); + if ( it != 0 && it->second != 0 ) + forward.insert(std::make_pair(it->second->pprev, it->second)); + else break; } assert(forward.size() == mapBlockIndex.size()); From 58434c5c3431d6a5820d53901c6cca1687a2ef65 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Feb 2018 12:15:36 +0200 Subject: [PATCH 06/52] Revert if --- src/main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 99d66f4a2..0d9dd52b7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4216,7 +4216,6 @@ void static CheckBlockIndex() // Build forward-pointing map of the entire block tree. std::multimap forward; for (BlockMap::iterator it = mapBlockIndex.begin(); it != mapBlockIndex.end(); it++) { - if ( it != 0 && it->second != 0 ) forward.insert(std::make_pair(it->second->pprev, it->second)); else break; } From bbb8ae00adf30726bcc623612ba886b9277dcde4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 22 Feb 2018 12:17:39 +0200 Subject: [PATCH 07/52] Fix --- src/main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 0d9dd52b7..a52fd3f02 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4217,7 +4217,6 @@ void static CheckBlockIndex() std::multimap forward; for (BlockMap::iterator it = mapBlockIndex.begin(); it != mapBlockIndex.end(); it++) { forward.insert(std::make_pair(it->second->pprev, it->second)); - else break; } assert(forward.size() == mapBlockIndex.size()); From 830d5ff54e0f203c1093c687edb4653af1ff3b77 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Sun, 25 Feb 2018 03:22:03 +0300 Subject: [PATCH 08/52] vote2018 --- src/assetchains | 39 +++------------------------------------ src/assetchains.old | 4 ++-- src/dpowassets | 34 +--------------------------------- 3 files changed, 6 insertions(+), 71 deletions(-) diff --git a/src/assetchains b/src/assetchains index 1ca93b3c2..746f0d542 100755 --- a/src/assetchains +++ b/src/assetchains @@ -35,11 +35,9 @@ komodo_asset JUMBLR 999999 komodo_asset BET 999999 komodo_asset CRYPTO 999999 komodo_asset HODL 9999999 -#komodo_asset SHARK 1401 komodo_asset MSHARK 1400000 komodo_asset BOTS 999999 komodo_asset MGW 999999 -#komodo_asset MVP 1000000 komodo_asset COQUI 72000000 komodo_asset WLC 210000000 komodo_asset KV 1000000 @@ -49,37 +47,6 @@ komodo_asset MNZ 257142858 komodo_asset AXO 200000000 komodo_asset ETOMIC 100000000 komodo_asset BTCH 20998641 -komodo_asset VOTE 49999999999 - -#komodo_asset USD -#komodo_asset EUR -#komodo_asset JPY -#komodo_asset GBP -#komodo_asset AUD -#komodo_asset CAD -#komodo_asset CHF -#komodo_asset NZD -#komodo_asset CNY -#komodo_asset RUB -#komodo_asset MXN -#komodo_asset BRL -#komodo_asset INR -#komodo_asset HKD -#komodo_asset TRY -#komodo_asset ZAR -#komodo_asset PLN -#komodo_asset NOK -#komodo_asset SEK -#komodo_asset DKK -#komodo_asset CZK -#komodo_asset HUF -#komodo_asset ILS -#komodo_asset KRW -#komodo_asset MYR -#komodo_asset PHP -#komodo_asset RON -#komodo_asset SGD -#komodo_asset THB -#komodo_asset BGN -#komodo_asset IDR -#komodo_asset HRK +komodo_asset VOTE2018 600000000 +komodo_asset PIZZA 100000000 +komodo_asset BEER 100000000 diff --git a/src/assetchains.old b/src/assetchains.old index 20f47d006..ab3c152b8 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash set -x delay=60 source pubkey.txt @@ -24,7 +24,7 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=AXO -ac_supply=200000000 -addnode=78.47.196.146 & ./komodod -pubkey=$pubkey -ac_name=ETOMIC -ac_supply=100000000 -addnode=78.47.196.146 & ./komodod -pubkey=$pubkey -ac_name=BTCH -ac_supply=20998641 -addnode=78.47.196.146 & -./komodod -pubkey=$pubkey -ac_name=VOTE -ac_supply=49999999999 -addnode=78.47.196.146 & +./komodod -pubkey=$pubkey -ac_name=VOTE2018 -ac_supply=600000000 -addnode=78.47.196.146 & ./komodod -pubkey=$pubkey -ac_name=BEER -ac_supply=100000000 -addnode=24.54.206.138 & ./komodod -pubkey=$pubkey -ac_name=PIZZA -ac_supply=100000000 -addnode=24.54.206.138 & #sleep $delay diff --git a/src/dpowassets b/src/dpowassets index 3fe8aa1b0..81cb5b68e 100755 --- a/src/dpowassets +++ b/src/dpowassets @@ -27,40 +27,8 @@ curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dp 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\":\"VOTE\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"VOTE2018\",\"pubkey\":\"$pubkey\"}" #curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"USD\",\"pubkey\":\"$pubkey\"}" #curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EUR\",\"pubkey\":\"$pubkey\"}" - # -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"JPY\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GBP\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"AUD\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CAD\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHF\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NZD\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CNY\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RUB\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MXN\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BRL\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"INR\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HKD\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"TRY\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ZAR\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PLN\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NOK\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SEK\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"DKK\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CZK\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HUF\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ILS\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KRW\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MYR\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PHP\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RON\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SGD\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"THB\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BGN\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"IDR\",\"pubkey\":\"$pubkey\"}" -#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HRK\",\"pubkey\":\"$pubkey\"}" - From ec0b0757b6a3f3fbefd04e07a08206b13f12d821 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Sun, 25 Feb 2018 03:46:02 +0300 Subject: [PATCH 09/52] fiat scripts --- src/fiat-cli | 36 +----------------------------------- src/fiat/vote | 2 -- 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100755 src/fiat/vote diff --git a/src/fiat-cli b/src/fiat-cli index 81ed6b56a..d9cc68ff5 100755 --- a/src/fiat-cli +++ b/src/fiat-cli @@ -1,37 +1,5 @@ #!/bin/bash #set -x -#echo aud; fiat/aud $1 $2 $3 $4 -#echo bgn; fiat/bgn $1 $2 $3 $4 -#echo cad; fiat/cad $1 $2 $3 $4 -#echo chf; fiat/chf $1 $2 $3 $4 -#echo cny; fiat/cny $1 $2 $3 $4 -#echo czk; fiat/czk $1 $2 $3 $4 -#echo dkk; fiat/dkk $1 $2 $3 $4 -#echo eur; fiat/eur $1 $2 $3 $4 -#echo gbp; fiat/gbp $1 $2 $3 $4 -#echo hkd; fiat/hkd $1 $2 $3 $4 -#echo hrk; fiat/hrk $1 $2 $3 $4 -#echo huf; fiat/huf $1 $2 $3 $4 -#echo idr; fiat/idr $1 $2 $3 $4 -#echo ils; fiat/ils $1 $2 $3 $4 -#echo inr; fiat/inr $1 $2 $3 $4 -#echo jpy; fiat/jpy $1 $2 $3 $4 -#echo krw; fiat/krw $1 $2 $3 $4 -#echo mxn; fiat/mxn $1 $2 $3 $4 -#echo myr; fiat/myr $1 $2 $3 $4 -#echo nok; fiat/nok $1 $2 $3 $4 -#echo nzd; fiat/nzd $1 $2 $3 $4 -#echo php; fiat/php $1 $2 $3 $4 -#echo pln; fiat/pln $1 $2 $3 $4 -#echo brl; fiat/brl $1 $2 $3 $4 -#echo ron; fiat/ron $1 $2 $3 $4 -#echo rub; fiat/rub $1 $2 $3 $4 -#echo sek; fiat/sek $1 $2 $3 $4 -#echo sgd; fiat/sgd $1 $2 $3 $4 -#echo thb; fiat/thb $1 $2 $3 $4 -#echo try; fiat/try $1 $2 $3 $4 -#echo usd; fiat/usd $1 $2 $3 $4 -#echo zar; fiat/zar $1 $2 $3 $4 echo revs; fiat/revs $1 $2 $3 $4 echo supernet; fiat/supernet $1 $2 $3 $4 echo dex; fiat/dex $1 $2 $3 $4 @@ -40,11 +8,9 @@ echo jumblr; fiat/jumblr $1 $2 $3 $4 echo bet; fiat/bet $1 $2 $3 $4 echo crypto; fiat/crypto $1 $2 $3 $4 echo hodl; fiat/hodl $1 $2 $3 $4 -#echo shark; fiat/shark $1 $2 $3 $4 echo mshark; fiat/mshark $1 $2 $3 $4 echo bots; fiat/bots $1 $2 $3 $4 echo mgw; fiat/mgw $1 $2 $3 $4 -#echo mvp; fiat/mvp $1 $2 $3 $4 echo coqui; fiat/coqui $1 $2 $3 $4 echo wlc; fiat/wlc $1 $2 $3 $4 echo kv; fiat/kv $1 $2 $3 $4 @@ -56,4 +22,4 @@ echo etomic; fiat/etomic $1 $2 $3 $4 echo btch; fiat/btch $1 $2 $3 $4 echo pizza; fiat/pizza $1 $2 $3 $4 echo beer; fiat/beer $1 $2 $3 $4 -echo vote; fiat/vote $1 $2 $3 $4 +echo vote2018; fiat/vote2018 $1 $2 $3 $4 diff --git a/src/fiat/vote b/src/fiat/vote deleted file mode 100755 index 67f47953e..000000000 --- a/src/fiat/vote +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./komodo-cli -ac_name=VOTE $1 $2 $3 $4 $5 $6 From 8bf22c6fd0c9a3ea58c7101540b50d62f9df439d Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Sun, 25 Feb 2018 03:49:58 +0300 Subject: [PATCH 10/52] fiat scripts --- src/fiat/vote2018 | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 src/fiat/vote2018 diff --git a/src/fiat/vote2018 b/src/fiat/vote2018 new file mode 100755 index 000000000..4e385d76f --- /dev/null +++ b/src/fiat/vote2018 @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=VOTE2018 $1 $2 $3 $4 $5 $6 From 4afdbc9556aa92178e56c61f07b4065c4db48842 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Mon, 26 Feb 2018 02:38:59 +0300 Subject: [PATCH 11/52] New final dns names for seeds --- src/assetchains | 2 +- src/chainparams.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/assetchains b/src/assetchains index 746f0d542..ae21bdfa5 100755 --- a/src/assetchains +++ b/src/assetchains @@ -1,7 +1,7 @@ #!/bin/bash source pubkey.txt args=("$@") -seed_ip=`getent hosts seed.mewhub.com | awk '{ print $1 }'` +seed_ip=`getent hosts zero.kolo.supernet.org | awk '{ print $1 }'` komodo_binary='./komodod' delay=20 diff --git a/src/chainparams.cpp b/src/chainparams.cpp index d84278b31..1630824d7 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -98,8 +98,9 @@ public: assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b")); vFixedSeeds.clear(); vSeeds.clear(); - vSeeds.push_back(CDNSSeedData("komodoplatform.com", "seeds.komodoplatform.com")); // @kolo - vSeeds.push_back(CDNSSeedData("komodo.mewhub.com", "seeds.komodo.mewhub.com")); // @kolo + vSeeds.push_back(CDNSSeedData("komodoplatform.com", "seeds.komodoplatform.com")); // @kolo - old static dns seeds + vSeeds.push_back(CDNSSeedData("kolo.supernet.org", "static.kolo.supernet.org")); // @kolo - new static dns seeds ToDo + // vSeeds.push_back(CDNSSeedData("kolo.supernet.org", "dynamic.kolo.supernet.org")); // @kolo - crawler seeds ToDo // TODO: set up bootstrapping for mainnet base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,60); base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,85); From 94ee86f05682a7c95353106cbcf565cdb5ab23bd Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Mon, 26 Feb 2018 08:30:14 +0300 Subject: [PATCH 12/52] New docker file test --- Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 71136b3af..a549bce4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,13 @@ -FROM kolobus/ubuntu:komodo -MAINTAINER Mihail Fedorov +FROM ubuntu:16.04 +MAINTAINER Mihail Fedorov + +RUN apt-get -y update && \ + apt-get -y upgrade && \ + apt-get -y install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev \ + unzip python zlib1g-dev wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev \ + protobuf-compiler libqrencode-dev libdb++-dev software-properties-common libcurl4-openssl-dev && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ADD ./ /komodo ENV HOME /komodo From b26a0857dcb67a494d6c860b1f5717736fc954fe Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Mon, 26 Feb 2018 08:50:39 +0300 Subject: [PATCH 13/52] sleepless --- Dockerfile | 2 +- src/chainparams.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a549bce4b..92b0b779c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER Mihail Fedorov RUN apt-get -y update && \ apt-get -y upgrade && \ apt-get -y install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev \ - unzip python zlib1g-dev wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev \ + unzip python zlib1g-dev wget bsdmainutils automake libssl-dev libprotobuf-dev \ protobuf-compiler libqrencode-dev libdb++-dev software-properties-common libcurl4-openssl-dev && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 1630824d7..0f3861040 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -100,7 +100,7 @@ public: vSeeds.clear(); vSeeds.push_back(CDNSSeedData("komodoplatform.com", "seeds.komodoplatform.com")); // @kolo - old static dns seeds vSeeds.push_back(CDNSSeedData("kolo.supernet.org", "static.kolo.supernet.org")); // @kolo - new static dns seeds ToDo - // vSeeds.push_back(CDNSSeedData("kolo.supernet.org", "dynamic.kolo.supernet.org")); // @kolo - crawler seeds ToDo + vSeeds.push_back(CDNSSeedData("kolo.supernet.org", "dynamic.kolo.supernet.org")); // @kolo - crawler seeds ToDo // TODO: set up bootstrapping for mainnet base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,60); base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,85); From b56e224002eca7d8aed1af8481d70b7fc1109687 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Mon, 26 Feb 2018 09:47:59 +0300 Subject: [PATCH 14/52] Adding coin in single commit --- src/assetchains | 1 + src/assetchains.old | 1 + src/dpowassets | 2 +- src/fiat-cli | 1 + src/fiat/ninja | 2 ++ 5 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 src/fiat/ninja diff --git a/src/assetchains b/src/assetchains index ae21bdfa5..ba5dcca18 100755 --- a/src/assetchains +++ b/src/assetchains @@ -50,3 +50,4 @@ komodo_asset BTCH 20998641 komodo_asset VOTE2018 600000000 komodo_asset PIZZA 100000000 komodo_asset BEER 100000000 +komodo_asset NINJA 100000000 diff --git a/src/assetchains.old b/src/assetchains.old index ab3c152b8..030a69ebf 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -27,6 +27,7 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=VOTE2018 -ac_supply=600000000 -addnode=78.47.196.146 & ./komodod -pubkey=$pubkey -ac_name=BEER -ac_supply=100000000 -addnode=24.54.206.138 & ./komodod -pubkey=$pubkey -ac_name=PIZZA -ac_supply=100000000 -addnode=24.54.206.138 & +./komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=192.241.134.19 & #sleep $delay #./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 & diff --git a/src/dpowassets b/src/dpowassets index 81cb5b68e..4a75bbce7 100755 --- a/src/dpowassets +++ b/src/dpowassets @@ -28,7 +28,7 @@ curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dp 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\":\"VOTE2018\",\"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\":\"USD\",\"pubkey\":\"$pubkey\"}" #curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EUR\",\"pubkey\":\"$pubkey\"}" diff --git a/src/fiat-cli b/src/fiat-cli index d9cc68ff5..9e50deda7 100755 --- a/src/fiat-cli +++ b/src/fiat-cli @@ -23,3 +23,4 @@ echo btch; fiat/btch $1 $2 $3 $4 echo pizza; fiat/pizza $1 $2 $3 $4 echo beer; fiat/beer $1 $2 $3 $4 echo vote2018; fiat/vote2018 $1 $2 $3 $4 +echo ninja; fiat/ninja $1 $2 $3 $4 diff --git a/src/fiat/ninja b/src/fiat/ninja new file mode 100755 index 000000000..f7722abb0 --- /dev/null +++ b/src/fiat/ninja @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=NINJA $1 $2 $3 $4 $5 $6 From 2cd576089f1e04ea552ae5eb49671566dbab503b Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 27 Feb 2018 18:10:44 +0200 Subject: [PATCH 15/52] Separate port range for mined --- src/komodo_utils.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 8db610e5d..418a3225d 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1455,11 +1455,13 @@ uint32_t komodo_assetmagic(char *symbol,uint64_t supply,uint8_t *extraptr,int32_ return(shortflag); }*/ -uint16_t komodo_assetport(uint32_t magic) +uint16_t komodo_assetport(uint32_t magic,int32_t extralen) { if ( magic == 0x8de4eef9 ) return(7770); - else return(8000 + (magic % 7777)); + else if ( extralen == 0 ) + return(8000 + (magic % 7777)); + else return(16000 + (magic % 49500)); } uint16_t komodo_port(char *symbol,uint64_t supply,uint32_t *magicp,uint8_t *extraptr,int32_t extralen) @@ -1470,7 +1472,7 @@ uint16_t komodo_port(char *symbol,uint64_t supply,uint32_t *magicp,uint8_t *extr return(7770); } *magicp = komodo_assetmagic(symbol,supply,extraptr,extralen); - return(komodo_assetport(*magicp)); + return(komodo_assetport(*magicp,extralen)); } /*void komodo_ports(uint16_t ports[MAX_CURRENCIES]) From 9db57a0eb3876a9883784ad306109592ce2c27a1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 27 Feb 2018 18:11:11 +0200 Subject: [PATCH 16/52] Test --- src/komodo_utils.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 8db610e5d..418a3225d 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1455,11 +1455,13 @@ uint32_t komodo_assetmagic(char *symbol,uint64_t supply,uint8_t *extraptr,int32_ return(shortflag); }*/ -uint16_t komodo_assetport(uint32_t magic) +uint16_t komodo_assetport(uint32_t magic,int32_t extralen) { if ( magic == 0x8de4eef9 ) return(7770); - else return(8000 + (magic % 7777)); + else if ( extralen == 0 ) + return(8000 + (magic % 7777)); + else return(16000 + (magic % 49500)); } uint16_t komodo_port(char *symbol,uint64_t supply,uint32_t *magicp,uint8_t *extraptr,int32_t extralen) @@ -1470,7 +1472,7 @@ uint16_t komodo_port(char *symbol,uint64_t supply,uint32_t *magicp,uint8_t *extr return(7770); } *magicp = komodo_assetmagic(symbol,supply,extraptr,extralen); - return(komodo_assetport(*magicp)); + return(komodo_assetport(*magicp,extralen)); } /*void komodo_ports(uint16_t ports[MAX_CURRENCIES]) From 95c463966ae35231a49f708c0b8465360de4b4de Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 27 Feb 2018 22:25:37 +0200 Subject: [PATCH 17/52] Dont create .conf from cli --- src/bitcoin-cli.cpp | 1 + src/komodo_utils.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index cac650a00..253c49366 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -65,6 +65,7 @@ public: }; +#define FROM_CLI #include "uint256.h" #include "arith_uint256.h" diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 418a3225d..4b0521498 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1362,12 +1362,14 @@ void komodo_configfile(char *symbol,uint16_t port) #endif if ( (fp= fopen(fname,"rb")) == 0 ) { +#ifndef FROM_CLI if ( (fp= fopen(fname,"wb")) != 0 ) { fprintf(fp,"rpcuser=user%u\nrpcpassword=pass%s\nrpcport=%u\nserver=1\ntxindex=1\nrpcworkqueue=64\n",crc,password,port); fclose(fp); printf("Created (%s)\n",fname); } else printf("Couldnt create (%s)\n",fname); +#endif } else { @@ -1619,6 +1621,7 @@ void komodo_args(char *argv0) for (i=0; i<4; i++) sprintf(&magicstr[i<<1],"%02x",magic[i]); magicstr[8] = 0; +#ifndef FROM_CLI sprintf(fname,"gen%s",ASSETCHAINS_SYMBOL); if ( (fp= fopen(fname,"wb")) != 0 ) { @@ -1626,6 +1629,7 @@ void komodo_args(char *argv0) fclose(fp); //printf("created (%s)\n",fname); } else printf("error creating (%s)\n",fname); +#endif } else { From 41572034cb0854a04a87cecf17b6bc2f46609481 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Mar 2018 16:49:58 -0800 Subject: [PATCH 18/52] Fix the port in curl examples shown at the bottom of all RPC method help texts --- src/rpcserver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index 94521004d..adafcd26d 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -863,7 +863,7 @@ std::string HelpExampleCli(const std::string& methodname, const std::string& arg std::string HelpExampleRpc(const std::string& methodname, const std::string& args) { return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", " - "\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:8232/\n"; + "\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:7771/\n"; } void RPCRegisterTimerInterface(RPCTimerInterface *iface) From 589c42c1c1fc3185feb14e5dbc88c407466b0397 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Mar 2018 16:51:58 -0800 Subject: [PATCH 19/52] Make help examples show komodo-cli --- src/rpcserver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index adafcd26d..f353b9ea9 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -857,7 +857,7 @@ json_spirit::Value CRPCTable::execute(const std::string &strMethod, const json_s std::string HelpExampleCli(const std::string& methodname, const std::string& args) { - return "> zcash-cli " + methodname + " " + args + "\n"; + return "> komodo-cli " + methodname + " " + args + "\n"; } std::string HelpExampleRpc(const std::string& methodname, const std::string& args) From f37f614e247e99c45f0c55914ad83090d6ca0684 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Mar 2018 17:58:57 -0800 Subject: [PATCH 20/52] Update various references from Zcash to KMD --- doc/files.md | 6 +++--- doc/payment-api.md | 2 +- doc/tor.md | 22 +++++++++++----------- doc/zmq.md | 10 +++++----- src/rpcrawtransaction.cpp | 8 ++++---- src/wallet/rpcwallet.cpp | 6 +++--- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/doc/files.md b/doc/files.md index 2d3787912..6a60a61ee 100644 --- a/doc/files.md +++ b/doc/files.md @@ -1,12 +1,12 @@ -* zcash.conf: contains configuration settings for zcashd -* zcashd.pid: stores the process id of zcashd while running +* komodo.conf: contains configuration settings for komodod +* komodod.pid: stores the process id of komodod while running * blocks/blk000??.dat: block data (custom, 128 MiB per file) * blocks/rev000??.dat; block undo data (custom) * blocks/index/*; block index (LevelDB) * chainstate/*; block chain state database (LevelDB) * database/*: BDB database environment * db.log: wallet database log file -* debug.log: contains debug information and general logging generated by zcashd +* debug.log: contains debug information and general logging generated by komodod * fee_estimates.dat: stores statistics used to estimate minimum transaction fees and priorities required for confirmation * peers.dat: peer IP address database (custom format) * wallet.dat: personal wallet (BDB) with keys and transactions diff --git a/doc/payment-api.md b/doc/payment-api.md index c4127b223..42e325f8a 100644 --- a/doc/payment-api.md +++ b/doc/payment-api.md @@ -64,7 +64,7 @@ Command | Parameters | Description z_exportkey | zaddr | _Requires an unlocked wallet or an unencrypted wallet._

Return a zkey for a given zaddr belonging to the node’s wallet.

The key will be returned as a string formatted using Base58Check as described in the Zcash protocol spec.

Output:AKWUAkypwQjhZ6LLNaMuuuLcmZ6gt5UFyo8m3jGutvALmwZKLdR5 z_importkey | zkey [rescan=true] | _Wallet must be unlocked._

Add a zkey as returned by z_exportkey to a node's wallet.

The key should be formatted using Base58Check as described in the Zcash protocol spec.

Set rescan to true (the default) to rescan the entire local block database for transactions affecting any address or pubkey script in the wallet (including transactions affecting the newly-added address for this spending key). z_exportwallet | filename | _Requires an unlocked wallet or an unencrypted wallet._

Creates or overwrites a file with taddr private keys and zaddr private keys in a human-readable format.

Filename is the file in which the wallet dump will be placed. May be prefaced by an absolute file path. An existing file with that name will be overwritten.

No value is returned but a JSON-RPC error will be reported if a failure occurred. -z_importwallet | filename | _Requires an unlocked wallet or an unencrypted wallet._

Imports private keys from a file in wallet export file format (see z_exportwallet). These keys will be added to the keys currently in the wallet. This call may need to rescan all or parts of the block chain for transactions affecting the newly-added keys, which may take several minutes.

Filename is the file to import. The path is relative to zcashd’s working directory.

No value is returned but a JSON-RPC error will be reported if a failure occurred. +z_importwallet | filename | _Requires an unlocked wallet or an unencrypted wallet._

Imports private keys from a file in wallet export file format (see z_exportwallet). These keys will be added to the keys currently in the wallet. This call may need to rescan all or parts of the block chain for transactions affecting the newly-added keys, which may take several minutes.

Filename is the file to import. The path is relative to komodod’s working directory.

No value is returned but a JSON-RPC error will be reported if a failure occurred. ### Payment diff --git a/doc/tor.md b/doc/tor.md index ce717515a..0608eb56d 100644 --- a/doc/tor.md +++ b/doc/tor.md @@ -33,7 +33,7 @@ outgoing connections be anonymized, but more is possible. In a typical situation, this suffices to run behind a Tor proxy: - ./zcashd -proxy=127.0.0.1:9050 + ./komodod -proxy=127.0.0.1:9050 2. Run a Zcash hidden server @@ -48,7 +48,7 @@ config file): HiddenServicePort 18233 127.0.0.1:18233 The directory can be different of course, but (both) port numbers should be equal to -your zcashd's P2P listen port (8233 by default). +your komodod's P2P listen port (8233 by default). -externalip=X You can tell Zcash about its publicly reachable address using this option, and this can be a .onion address. Given the above @@ -70,7 +70,7 @@ your zcashd's P2P listen port (8233 by default). In a typical situation, where you're only reachable via Tor, this should suffice: - ./zcashd -proxy=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -listen + ./komodod -proxy=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -listen (obviously, replace the Onion address with your own). It should be noted that you still listen on all devices and another node could establish a clearnet connection, when knowing @@ -81,14 +81,14 @@ your address. To mitigate this, additionally bind the address of your Tor proxy: If you don't care too much about hiding your node, and want to be reachable on IPv4 as well, use `discover` instead: - ./zcashd ... -discover + ./komodod ... -discover and open port 8233 on your firewall (or use -upnp). If you only want to use Tor to reach onion addresses, but not use it as a proxy for normal IPv4/IPv6 communication, use: - ./zcashd -onion=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -discover + ./komodod -onion=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -discover 3. Automatically listen on Tor @@ -110,12 +110,12 @@ and, if not disabled, configured using the `-torcontrol` and `-torpassword` sett To show verbose debugging information, pass `-debug=tor`. Connecting to Tor's control socket API requires one of two authentication methods to be -configured. For cookie authentication the user running zcashd must have write access +configured. For cookie authentication the user running komodod must have write access to the `CookieAuthFile` specified in Tor configuration. In some cases this is preconfigured and the creation of a hidden service is automatic. If permission problems are seen with `-debug=tor` they can be resolved by adding both the user running tor and -the user running zcashd to the same group and setting permissions appropriately. On -Debian-based systems the user running zcashd can be added to the debian-tor group, +the user running komodod to the same group and setting permissions appropriately. On +Debian-based systems the user running komodod can be added to the debian-tor group, which has the appropriate permissions. An alternative authentication method is the use of the `-torpassword` flag and a `hash-password` which can be enabled and specified in Tor configuration. @@ -125,9 +125,9 @@ Tor configuration. ----------------------------------- To test your set-up, you might want to try connecting via Tor on a different computer to just a -a single Zcash hidden server. Launch zcashd as follows: +a single Zcash hidden server. Launch komodod as follows: - ./zcashd -onion=127.0.0.1:9050 -connect=zctestseie6wxgio.onion + ./komodod -onion=127.0.0.1:9050 -connect=zctestseie6wxgio.onion Now use zcash-cli to verify there is only a single peer connection. @@ -146,4 +146,4 @@ Now use zcash-cli to verify there is only a single peer connection. To connect to multiple Tor nodes, use: - ./zcashd -onion=127.0.0.1:9050 -addnode=zctestseie6wxgio.onion -dnsseed=0 -onlynet=onion + ./komodod -onion=127.0.0.1:9050 -addnode=zctestseie6wxgio.onion -dnsseed=0 -onlynet=onion diff --git a/doc/zmq.md b/doc/zmq.md index e23c0937c..9fee74c40 100644 --- a/doc/zmq.md +++ b/doc/zmq.md @@ -46,7 +46,7 @@ operation. By default, the ZeroMQ feature is automatically compiled in if the necessary prerequisites are found. To disable, use --disable-zmq -during the *configure* step of building zcashd: +during the *configure* step of building komodod: $ ./configure --disable-zmq (other options) @@ -67,8 +67,8 @@ address. The same address can be used in more than one notification. For instance: - $ zcashd -zmqpubhashtx=tcp://127.0.0.1:28332 \ - -zmqpubrawtx=ipc:///tmp/zcashd.tx.raw + $ komodod -zmqpubhashtx=tcp://127.0.0.1:28332 \ + -zmqpubrawtx=ipc:///tmp/komodod.tx.raw Each PUB notification has a topic and body, where the header corresponds to the notification type. For instance, for the @@ -88,9 +88,9 @@ arriving. Please see `contrib/zmq/zmq_sub.py` for a working example. ## Remarks -From the perspective of zcashd, the ZeroMQ socket is write-only; PUB +From the perspective of komodod, the ZeroMQ socket is write-only; PUB sockets don't even have a read function. Thus, there is no state -introduced into zcashd directly. Furthermore, no information is +introduced into komodod directly. Furthermore, no information is broadcast that wasn't already received from the public P2P network. No authentication or authorization is done on connecting clients; it diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index dac9d49e8..285b5b48b 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -235,8 +235,8 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp) " ],\n" " \"vjoinsplit\" : [ (array of json objects, only for version >= 2)\n" " {\n" - " \"vpub_old\" : x.xxx, (numeric) public input value in ZEC\n" - " \"vpub_new\" : x.xxx, (numeric) public output value in ZEC\n" + " \"vpub_old\" : x.xxx, (numeric) public input value in KMD\n" + " \"vpub_new\" : x.xxx, (numeric) public output value in KMD\n" " \"anchor\" : \"hex\", (string) the anchor\n" " \"nullifiers\" : [ (json array of string)\n" " \"hex\" (string) input note nullifier\n" @@ -585,8 +585,8 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp) " ],\n" " \"vjoinsplit\" : [ (array of json objects, only for version >= 2)\n" " {\n" - " \"vpub_old\" : x.xxx, (numeric) public input value in ZEC\n" - " \"vpub_new\" : x.xxx, (numeric) public output value in ZEC\n" + " \"vpub_old\" : x.xxx, (numeric) public input value in KMD\n" + " \"vpub_new\" : x.xxx, (numeric) public output value in KMD\n" " \"anchor\" : \"hex\", (string) the anchor\n" " \"nullifiers\" : [ (json array of string)\n" " \"hex\" (string) input note nullifier\n" diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index ccf4fc34a..3179e2e9e 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2508,7 +2508,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp) " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n" " \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n" " \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n" - " \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in ZEC/KB\n" + " \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in KMD/KB\n" "}\n" "\nExamples:\n" + HelpExampleCli("getwalletinfo", "") @@ -3380,7 +3380,7 @@ UniValue z_getbalance(const UniValue& params, bool fHelp) "1. \"address\" (string) The selected address. It may be a transparent or private address.\n" "2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n" "\nResult:\n" - "amount (numeric) The total amount in ZEC received for this address.\n" + "amount (numeric) The total amount in KMD received for this address.\n" "\nExamples:\n" "\nThe total amount received by address \"myaddress\"\n" + HelpExampleCli("z_getbalance", "\"myaddress\"") + @@ -3607,7 +3607,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp) "2. \"amounts\" (array, required) An array of json objects representing the amounts to send.\n" " [{\n" " \"address\":address (string, required) The address is a taddr or zaddr\n" - " \"amount\":amount (numeric, required) The numeric amount in ZEC is the value\n" + " \"amount\":amount (numeric, required) The numeric amount in KMD is the value\n" " \"memo\":memo (string, optional) If the address is a zaddr, raw data represented in hexadecimal string format\n" " }, ... ]\n" "3. minconf (numeric, optional, default=1) Only use funds confirmed at least this many times.\n" From e78e9fa3e39a554f86500141be42c1ec2533e7b1 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 4 Mar 2018 04:33:53 +0000 Subject: [PATCH 21/52] Update manpages script for komodo --- contrib/devtools/gen-manpages.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh index 245714814..b604a4c28 100755 --- a/contrib/devtools/gen-manpages.sh +++ b/contrib/devtools/gen-manpages.sh @@ -4,25 +4,25 @@ TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} SRCDIR=${SRCDIR:-$TOPDIR/src} MANDIR=${MANDIR:-$TOPDIR/doc/man} -ZCASHD=${ZCASHD:-$SRCDIR/zcashd} -ZCASHCLI=${ZCASHCLI:-$SRCDIR/zcash-cli} -ZCASHTX=${ZCASHTX:-$SRCDIR/zcash-tx} +KOMODOD=${KOMODOD:-$SRCDIR/komodod} +KOMODOCLI=${KOMODOCLI:-$SRCDIR/komodo-cli} +KOMODOTX=${KOMODOTX:-$SRCDIR/komodo-tx} -[ ! -x $ZCASHD ] && echo "$ZCASHD not found or not executable." && exit 1 +[ ! -x $KOMODOD ] && echo "$KOMODOD not found or not executable." && exit 1 # The autodetected version git tag can screw up manpage output a little bit -ZECVER=($($ZCASHCLI --version | head -n1 | awk -F'[ -]' '{ print $5, $6 }')) +KMDVER=($($KOMODOCLI --version | head -n1 | awk -F'[ -]' '{ print $5, $6 }')) # Create a footer file with copyright content. -# This gets autodetected fine for zcashd if --version-string is not set, -# but has different outcomes for zcash-cli. +# This gets autodetected fine for komodod if --version-string is not set, +# but has different outcomes for komodo-cli. echo "[COPYRIGHT]" > footer.h2m -$ZCASHD --version | sed -n '1!p' >> footer.h2m +$KOMODOD --version | sed -n '1!p' >> footer.h2m -for cmd in $ZCASHD $ZCASHCLI $ZCASHTX; do +for cmd in $KOMODOD $KOMODOCLI $KOMODOTX; do cmdname="${cmd##*/}" - help2man -N --version-string=${ZECVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd} - sed -i "s/\\\-${ZECVER[1]}//g" ${MANDIR}/${cmdname}.1 + help2man -N --version-string=${KMDVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd} + sed -i "s/\\\-${KMDVER[1]}//g" ${MANDIR}/${cmdname}.1 done rm -f footer.h2m From b65ba237f20aa95602652865f19d28d918f3d98c Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 4 Mar 2018 04:35:06 +0000 Subject: [PATCH 22/52] Update kmd man pages with bash contrib/devtools/gen-manpages.sh --- doc/man/komodo-cli.1 | 84 ++++++++ doc/man/komodo-tx.1 | 102 ++++++++++ doc/man/komodod.1 | 472 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 658 insertions(+) create mode 100644 doc/man/komodo-cli.1 create mode 100644 doc/man/komodo-tx.1 create mode 100644 doc/man/komodod.1 diff --git a/doc/man/komodo-cli.1 b/doc/man/komodo-cli.1 new file mode 100644 index 000000000..b7fdd19d6 --- /dev/null +++ b/doc/man/komodo-cli.1 @@ -0,0 +1,84 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. +.TH KOMODO-CLI "1" "March 2018" "komodo-cli v1.0.8" "User Commands" +.SH NAME +komodo-cli \- manual page for komodo-cli v1.0.8 +.SH DESCRIPTION +Komodo RPC client version v1.0.8 +.PP +In order to ensure you are adequately protecting your privacy when using Zcash, +please see . +.SS "Usage:" +.TP +komodo\-cli [options] [params] +Send command to Komodo +.TP +komodo\-cli [options] help +List commands +.TP +komodo\-cli [options] help +Get help for a command +.SH OPTIONS +.HP +\-? +.IP +This help message +.HP +\fB\-conf=\fR +.IP +Specify configuration file (default: komodo.conf) +.HP +\fB\-datadir=\fR +.IP +Specify data directory +.HP +\fB\-testnet\fR +.IP +Use the test network +.HP +\fB\-regtest\fR +.IP +Enter regression test mode, which uses a special chain in which blocks +can be solved instantly. This is intended for regression testing tools +and app development. +.HP +\fB\-rpcconnect=\fR +.IP +Send commands to node running on (default: 127.0.0.1) +.HP +\fB\-rpcport=\fR +.IP +Connect to JSON\-RPC on (default: 8232 or testnet: 18232) +.HP +\fB\-rpcwait\fR +.IP +Wait for RPC server to start +.HP +\fB\-rpcuser=\fR +.IP +Username for JSON\-RPC connections +.HP +\fB\-rpcpassword=\fR +.IP +Password for JSON\-RPC connections +.HP +\fB\-rpcclienttimeout=\fR +.IP +Timeout in seconds during HTTP requests, or 0 for no timeout. (default: +900) +.SH COPYRIGHT + +In order to ensure you are adequately protecting your privacy when using Zcash, +please see . + +Copyright (C) 2009-2017 The Bitcoin Core Developers +Copyright (C) 2015-2017 The Zcash Developers +Copyright (C) 2015-2017 jl777 and SuperNET developers + +This is experimental software. + +Distributed under the MIT software license, see the accompanying file COPYING +or . + +This product includes software developed by the OpenSSL Project for use in the +OpenSSL Toolkit and cryptographic software written +by Eric Young and UPnP software written by Thomas Bernard. diff --git a/doc/man/komodo-tx.1 b/doc/man/komodo-tx.1 new file mode 100644 index 000000000..16f4e9a8d --- /dev/null +++ b/doc/man/komodo-tx.1 @@ -0,0 +1,102 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. +.TH KOMODO-TX "1" "March 2018" "komodo-tx v1.0.8" "User Commands" +.SH NAME +komodo-tx \- manual page for komodo-tx v1.0.8 +.SH DESCRIPTION +Zcash zcash\-tx utility version v1.0.8 +.SS "Usage:" +.TP +zcash\-tx [options] [commands] +Update hex\-encoded zcash transaction +.TP +zcash\-tx [options] \fB\-create\fR [commands] +Create hex\-encoded zcash transaction +.SH OPTIONS +.HP +\-? +.IP +This help message +.HP +\fB\-create\fR +.IP +Create new, empty TX. +.HP +\fB\-json\fR +.IP +Select JSON output +.HP +\fB\-txid\fR +.IP +Output only the hex\-encoded transaction id of the resultant transaction. +.HP +\fB\-regtest\fR +.IP +Enter regression test mode, which uses a special chain in which blocks +can be solved instantly. +.HP +\fB\-testnet\fR +.IP +Use the test network +.PP +Commands: +.IP +delin=N +.IP +Delete input N from TX +.IP +delout=N +.IP +Delete output N from TX +.IP +in=TXID:VOUT +.IP +Add input to TX +.IP +locktime=N +.IP +Set TX lock time to N +.IP +nversion=N +.IP +Set TX version to N +.IP +outaddr=VALUE:ADDRESS +.IP +Add address\-based output to TX +.IP +outscript=VALUE:SCRIPT +.IP +Add raw script output to TX +.IP +sign=SIGHASH\-FLAGS +.IP +Add zero or more signatures to transaction. This command requires JSON +registers:prevtxs=JSON object, privatekeys=JSON object. See +signrawtransaction docs for format of sighash flags, JSON objects. +.PP +Register Commands: +.IP +load=NAME:FILENAME +.IP +Load JSON file FILENAME into register NAME +.IP +set=NAME:JSON\-STRING +.IP +Set register NAME to given JSON\-STRING +.SH COPYRIGHT + +In order to ensure you are adequately protecting your privacy when using Zcash, +please see . + +Copyright (C) 2009-2017 The Bitcoin Core Developers +Copyright (C) 2015-2017 The Zcash Developers +Copyright (C) 2015-2017 jl777 and SuperNET developers + +This is experimental software. + +Distributed under the MIT software license, see the accompanying file COPYING +or . + +This product includes software developed by the OpenSSL Project for use in the +OpenSSL Toolkit and cryptographic software written +by Eric Young and UPnP software written by Thomas Bernard. diff --git a/doc/man/komodod.1 b/doc/man/komodod.1 new file mode 100644 index 000000000..f79cb74de --- /dev/null +++ b/doc/man/komodod.1 @@ -0,0 +1,472 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. +.TH KOMODOD "1" "March 2018" "komodod v1.0.8" "User Commands" +.SH NAME +komodod \- manual page for komodod v1.0.8 +.SH DESCRIPTION +Komodo Daemon version v1.0.8 +.PP +In order to ensure you are adequately protecting your privacy when using Zcash, +please see . +.SS "Usage:" +.TP +komodod [options] +Start Komodo Daemon +.SH OPTIONS +.HP +\-? +.IP +This help message +.HP +\fB\-alerts\fR +.IP +Receive and display P2P network alerts (default: 1) +.HP +\fB\-alertnotify=\fR +.IP +Execute command when a relevant alert is received or we see a really +long fork (%s in cmd is replaced by message) +.HP +\fB\-blocknotify=\fR +.IP +Execute command when the best block changes (%s in cmd is replaced by +block hash) +.HP +\fB\-checkblocks=\fR +.IP +How many blocks to check at startup (default: 288, 0 = all) +.HP +\fB\-checklevel=\fR +.IP +How thorough the block verification of \fB\-checkblocks\fR is (0\-4, default: 3) +.HP +\fB\-conf=\fR +.IP +Specify configuration file (default: komodo.conf) +.HP +\fB\-daemon\fR +.IP +Run in the background as a daemon and accept commands +.HP +\fB\-datadir=\fR +.IP +Specify data directory +.HP +\fB\-exportdir=\fR +.IP +Specify directory to be used when exporting data +.HP +\fB\-dbcache=\fR +.IP +Set database cache size in megabytes (4 to 16384, default: 100) +.HP +\fB\-loadblock=\fR +.IP +Imports blocks from external blk000??.dat file on startup +.HP +\fB\-maxorphantx=\fR +.IP +Keep at most unconnectable transactions in memory (default: 100) +.HP +\fB\-par=\fR +.IP +Set the number of script verification threads (\fB\-2\fR to 16, 0 = auto, <0 = +leave that many cores free, default: 0) +.HP +\fB\-pid=\fR +.IP +Specify pid file (default: komodod.pid) +.HP +\fB\-prune=\fR +.IP +Reduce storage requirements by pruning (deleting) old blocks. This mode +disables wallet support and is incompatible with \fB\-txindex\fR. Warning: +Reverting this setting requires re\-downloading the entire blockchain. +(default: 0 = disable pruning blocks, >550 = target size in MiB to use +for block files) +.HP +\fB\-reindex\fR +.IP +Rebuild block chain index from current blk000??.dat files on startup +.HP +\fB\-sysperms\fR +.IP +Create new files with system default permissions, instead of umask 077 +(only effective with disabled wallet functionality) +.HP +\fB\-txindex\fR +.IP +Maintain a full transaction index, used by the getrawtransaction rpc +call (default: 0) +.PP +Connection options: +.HP +\fB\-addnode=\fR +.IP +Add a node to connect to and attempt to keep the connection open +.HP +\fB\-banscore=\fR +.IP +Threshold for disconnecting misbehaving peers (default: 100) +.HP +\fB\-bantime=\fR +.IP +Number of seconds to keep misbehaving peers from reconnecting (default: +86400) +.HP +\fB\-bind=\fR +.IP +Bind to given address and always listen on it. Use [host]:port notation +for IPv6 +.HP +\fB\-connect=\fR +.IP +Connect only to the specified node(s) +.HP +\fB\-discover\fR +.IP +Discover own IP addresses (default: 1 when listening and no \fB\-externalip\fR +or \fB\-proxy\fR) +.HP +\fB\-dns\fR +.IP +Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR (default: 1) +.HP +\fB\-dnsseed\fR +.IP +Query for peer addresses via DNS lookup, if low on addresses (default: 1 +unless \fB\-connect\fR) +.HP +\fB\-externalip=\fR +.IP +Specify your own public address +.HP +\fB\-forcednsseed\fR +.IP +Always query for peer addresses via DNS lookup (default: 0) +.HP +\fB\-listen\fR +.IP +Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR) +.HP +\fB\-listenonion\fR +.IP +Automatically create Tor hidden service (default: 1) +.HP +\fB\-maxconnections=\fR +.IP +Maintain at most connections to peers (default: 125) +.HP +\fB\-maxreceivebuffer=\fR +.IP +Maximum per\-connection receive buffer, *1000 bytes (default: 5000) +.HP +\fB\-maxsendbuffer=\fR +.IP +Maximum per\-connection send buffer, *1000 bytes (default: 1000) +.HP +\fB\-onion=\fR +.IP +Use separate SOCKS5 proxy to reach peers via Tor hidden services +(default: \fB\-proxy\fR) +.HP +\fB\-onlynet=\fR +.IP +Only connect to nodes in network (ipv4, ipv6 or onion) +.HP +\fB\-permitbaremultisig\fR +.IP +Relay non\-P2SH multisig (default: 1) +.HP +\fB\-port=\fR +.IP +Listen for connections on (default: 8233 or testnet: 18233) +.HP +\fB\-proxy=\fR +.IP +Connect through SOCKS5 proxy +.HP +\fB\-proxyrandomize\fR +.IP +Randomize credentials for every proxy connection. This enables Tor +stream isolation (default: 1) +.HP +\fB\-seednode=\fR +.IP +Connect to a node to retrieve peer addresses, and disconnect +.HP +\fB\-timeout=\fR +.IP +Specify connection timeout in milliseconds (minimum: 1, default: 5000) +.HP +\fB\-torcontrol=\fR: +.IP +Tor control port to use if onion listening enabled (default: +127.0.0.1:9051) +.HP +\fB\-torpassword=\fR +.IP +Tor control port password (default: empty) +.HP +\fB\-upnp\fR +.IP +Use UPnP to map the listening port (default: 0) +.HP +\fB\-whitebind=\fR +.IP +Bind to given address and whitelist peers connecting to it. Use +[host]:port notation for IPv6 +.HP +\fB\-whitelist=\fR +.IP +Whitelist peers connecting from the given netmask or IP address. Can be +specified multiple times. Whitelisted peers cannot be DoS banned and +their transactions are always relayed, even if they are already in the +mempool, useful e.g. for a gateway +.PP +Wallet options: +.HP +\fB\-disablewallet\fR +.IP +Do not load the wallet and disable wallet RPC calls +.HP +\fB\-keypool=\fR +.IP +Set key pool size to (default: 100) +.HP +\fB\-paytxfee=\fR +.IP +Fee (in BTC/kB) to add to transactions you send (default: 0.00) +.HP +\fB\-rescan\fR +.IP +Rescan the blockchain for missing wallet transactions on startup +.HP +\fB\-salvagewallet\fR +.IP +Attempt to recover private keys from a corrupt wallet.dat on startup +.HP +\fB\-sendfreetransactions\fR +.IP +Send transactions as zero\-fee transactions if possible (default: 0) +.HP +\fB\-spendzeroconfchange\fR +.IP +Spend unconfirmed change when sending transactions (default: 1) +.HP +\fB\-txconfirmtarget=\fR +.IP +If paytxfee is not set, include enough fee so transactions begin +confirmation on average within n blocks (default: 2) +.HP +\fB\-maxtxfee=\fR +.IP +Maximum total fees to use in a single wallet transaction; setting this +too low may abort large transactions (default: 0.10) +.HP +\fB\-upgradewallet\fR +.IP +Upgrade wallet to latest format on startup +.HP +\fB\-wallet=\fR +.IP +Specify wallet file (within data directory) (default: wallet.dat) +.HP +\fB\-walletbroadcast\fR +.IP +Make the wallet broadcast transactions (default: 1) +.HP +\fB\-walletnotify=\fR +.IP +Execute command when a wallet transaction changes (%s in cmd is replaced +by TxID) +.HP +\fB\-zapwallettxes=\fR +.IP +Delete all wallet transactions and only recover those parts of the +blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g. +account owner and payment request information, 2 = drop tx meta data) +.PP +ZeroMQ notification options: +.HP +\fB\-zmqpubhashblock=\fR
+.IP +Enable publish hash block in
+.HP +\fB\-zmqpubhashtx=\fR
+.IP +Enable publish hash transaction in
+.HP +\fB\-zmqpubrawblock=\fR
+.IP +Enable publish raw block in
+.HP +\fB\-zmqpubrawtx=\fR
+.IP +Enable publish raw transaction in
+.PP +Debugging/Testing options: +.HP +\fB\-debug=\fR +.IP +Output debugging information (default: 0, supplying is +optional). If is not supplied or if = 1, output +all debugging information. can be: addrman, alert, bench, +coindb, db, estimatefee, http, libevent, lock, mempool, net, +partitioncheck, pow, proxy, prune, rand, reindex, rpc, selectcoins, tor, +zmq, zrpc, zrpcunsafe (implies zrpc). +.HP +\fB\-experimentalfeatures\fR +.IP +Enable use of experimental features +.HP +\fB\-help\-debug\fR +.IP +Show all debugging options (usage: \fB\-\-help\fR \fB\-help\-debug\fR) +.HP +\fB\-logips\fR +.IP +Include IP addresses in debug output (default: 0) +.HP +\fB\-logtimestamps\fR +.IP +Prepend debug output with timestamp (default: 1) +.HP +\fB\-minrelaytxfee=\fR +.IP +Fees (in BTC/Kb) smaller than this are considered zero fee for relaying +(default: 0.000001) +.HP +\fB\-printtoconsole\fR +.IP +Send trace/debug info to console instead of debug.log file +.HP +\fB\-shrinkdebugfile\fR +.IP +Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR) +.HP +\fB\-testnet\fR +.IP +Use the test network +.PP +Node relay options: +.HP +\fB\-datacarrier\fR +.IP +Relay and mine data carrier transactions (default: 1) +.HP +\fB\-datacarriersize\fR +.IP +Maximum size of data in data carrier transactions we relay and mine +(default: 8192) +.PP +Block creation options: +.HP +\fB\-blockminsize=\fR +.IP +Set minimum block size in bytes (default: 0) +.HP +\fB\-blockmaxsize=\fR +.IP +Set maximum block size in bytes (default: 2000000) +.HP +\fB\-blockprioritysize=\fR +.IP +Set maximum size of high\-priority/low\-fee transactions in bytes +(default: 1000000) +.PP +Mining options: +.HP +\fB\-gen\fR +.IP +Generate coins (default: 0) +.HP +\fB\-genproclimit=\fR +.IP +Set the number of threads for coin generation if enabled (\fB\-1\fR = all +cores, default: 1) +.HP +\fB\-equihashsolver=\fR +.IP +Specify the Equihash solver to be used if enabled (default: "default") +.HP +\fB\-mineraddress=\fR +.IP +Send mined coins to a specific single address +.HP +\fB\-minetolocalwallet\fR +.IP +Require that mined blocks use a coinbase address in the local wallet +(default: 1) +.PP +RPC server options: +.HP +\fB\-server\fR +.IP +Accept command line and JSON\-RPC commands +.HP +\fB\-rest\fR +.IP +Accept public REST requests (default: 0) +.HP +\fB\-rpcbind=\fR +.IP +Bind to given address to listen for JSON\-RPC connections. Use +[host]:port notation for IPv6. This option can be specified multiple +times (default: bind to all interfaces) +.HP +\fB\-rpcuser=\fR +.IP +Username for JSON\-RPC connections +.HP +\fB\-rpcpassword=\fR +.IP +Password for JSON\-RPC connections +.HP +\fB\-rpcport=\fR +.IP +Listen for JSON\-RPC connections on (default: 8232 or testnet: +18232) +.HP +\fB\-rpcallowip=\fR +.IP +Allow JSON\-RPC connections from specified source. Valid for are a +single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) +or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified +multiple times +.HP +\fB\-rpcthreads=\fR +.IP +Set the number of threads to service RPC calls (default: 4) +.PP +Metrics Options (only if \fB\-daemon\fR and \fB\-printtoconsole\fR are not set): +.HP +\fB\-showmetrics\fR +.IP +Show metrics on stdout (default: 1 if running in a console, 0 otherwise) +.HP +\fB\-metricsui\fR +.IP +Set to 1 for a persistent metrics screen, 0 for sequential metrics +output (default: 1 if running in a console, 0 otherwise) +.HP +\fB\-metricsrefreshtime\fR +.IP +Number of seconds between metrics refreshes (default: 1 if running in a +console, 600 otherwise) +.SH COPYRIGHT + +In order to ensure you are adequately protecting your privacy when using Zcash, +please see . + +Copyright (C) 2009-2017 The Bitcoin Core Developers +Copyright (C) 2015-2017 The Zcash Developers +Copyright (C) 2015-2017 jl777 and SuperNET developers + +This is experimental software. + +Distributed under the MIT software license, see the accompanying file COPYING +or . + +This product includes software developed by the OpenSSL Project for use in the +OpenSSL Toolkit and cryptographic software written +by Eric Young and UPnP software written by Thomas Bernard. From 1799af96040cc047b788d5b835bed437e28f600d Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Mar 2018 20:43:14 -0800 Subject: [PATCH 23/52] Fix KMD ports in help output --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index fe10401a8..1a0657eab 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -365,7 +365,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-onion=", strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"), "-proxy")); strUsage += HelpMessageOpt("-onlynet=", _("Only connect to nodes in network (ipv4, ipv6 or onion)")); strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), 1)); - strUsage += HelpMessageOpt("-port=", strprintf(_("Listen for connections on (default: %u or testnet: %u)"), 8233, 18233)); + strUsage += HelpMessageOpt("-port=", strprintf(_("Listen for connections on (default: %u or testnet: %u)"), 7770, 17770)); strUsage += HelpMessageOpt("-proxy=", _("Connect through SOCKS5 proxy")); strUsage += HelpMessageOpt("-proxyrandomize", strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"), 1)); strUsage += HelpMessageOpt("-seednode=", _("Connect to a node to retrieve peer addresses, and disconnect")); From c2b69c7203a668b5e698ad8c715a5be8cf8d4ccc Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Mar 2018 20:47:29 -0800 Subject: [PATCH 24/52] Update tor docs some more --- doc/tor.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/tor.md b/doc/tor.md index 0608eb56d..10768ed5b 100644 --- a/doc/tor.md +++ b/doc/tor.md @@ -1,18 +1,18 @@ -*** Warning: Do not assume Tor support does the correct thing in Zcash; better Tor support is a future feature goal. *** +*** Warning: Do not assume Tor support does the correct thing in Komodo; better Tor support is a future feature goal. *** TOR SUPPORT IN ZCASH ==================== -It is possible to run Zcash as a Tor hidden service, and connect to such services. +It is possible to run Komodo as a Tor hidden service, and connect to such services. The following directions assume you have a Tor proxy running on port 9050. Many distributions default to having a SOCKS proxy listening on port 9050, but others may not. In particular, the Tor Browser Bundle defaults to listening on port 9150. See [Tor Project FAQ:TBBSocksPort](https://www.torproject.org/docs/faq.html.en#TBBSocksPort) for how to properly configure Tor. -1. Run Zcash behind a Tor proxy +1. Run Komodo behind a Tor proxy ------------------------------- -The first step is running Zcash behind a Tor proxy. This will already make all +The first step is running Komodo behind a Tor proxy. This will already make all outgoing connections be anonymized, but more is possible. -proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy @@ -36,7 +36,7 @@ In a typical situation, this suffices to run behind a Tor proxy: ./komodod -proxy=127.0.0.1:9050 -2. Run a Zcash hidden server +2. Run a Komodo hidden server ---------------------------- If you configure your Tor system accordingly, it is possible to make your node also @@ -44,13 +44,13 @@ reachable from the Tor network. Add these lines to your /etc/tor/torrc (or equiv config file): HiddenServiceDir /var/lib/tor/zcash-service/ - HiddenServicePort 8233 127.0.0.1:8233 - HiddenServicePort 18233 127.0.0.1:18233 + HiddenServicePort 7771 127.0.0.1:7771 + HiddenServicePort 17771 127.0.0.1:17771 The directory can be different of course, but (both) port numbers should be equal to -your komodod's P2P listen port (8233 by default). +your komodod's P2P listen port (7771 by default). - -externalip=X You can tell Zcash about its publicly reachable address using + -externalip=X You can tell Komodo about its publicly reachable address using this option, and this can be a .onion address. Given the above configuration, you can find your onion address in /var/lib/tor/zcash-service/hostname. Onion addresses are given @@ -83,7 +83,7 @@ as well, use `discover` instead: ./komodod ... -discover -and open port 8233 on your firewall (or use -upnp). +and open port 7771 on your firewall (or use -upnp). If you only want to use Tor to reach onion addresses, but not use it as a proxy for normal IPv4/IPv6 communication, use: @@ -96,15 +96,15 @@ for normal IPv4/IPv6 communication, use: Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket API, to create and destroy 'ephemeral' hidden services programmatically. -Zcash has been updated to make use of this. +Komodo has been updated to make use of this. This means that if Tor is running (and proper authentication has been configured), -Zcash automatically creates a hidden service to listen on. Zcash will also use Tor +Komodo automatically creates a hidden service to listen on. Komodo will also use Tor automatically to connect to other .onion nodes if the control socket can be successfully opened. This will positively affect the number of available .onion nodes and their usage. -This new feature is enabled by default if Zcash is listening (`-listen`), and +This new feature is enabled by default if Komodo is listening (`-listen`), and requires a Tor connection to work. It can be explicitly disabled with `-listenonion=0` and, if not disabled, configured using the `-torcontrol` and `-torpassword` settings. To show verbose debugging information, pass `-debug=tor`. @@ -121,22 +121,22 @@ of the `-torpassword` flag and a `hash-password` which can be enabled and specif Tor configuration. -4. Connect to a Zcash hidden server +4. Connect to a Komodo hidden server ----------------------------------- To test your set-up, you might want to try connecting via Tor on a different computer to just a -a single Zcash hidden server. Launch komodod as follows: +a single Komodo hidden server. Launch komodod as follows: ./komodod -onion=127.0.0.1:9050 -connect=zctestseie6wxgio.onion -Now use zcash-cli to verify there is only a single peer connection. +Now use komodo-cli to verify there is only a single peer connection. - zcash-cli getpeerinfo + komodo-cli getpeerinfo [ { "id" : 1, - "addr" : "zctestseie6wxgio.onion:18233", + "addr" : "zctestseie6wxgio.onion:17770", ... "version" : 170002, "subver" : "/MagicBean:1.0.0/", From 1785f62bbbe360362199df93449f897593e41c39 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Mar 2018 20:51:46 -0800 Subject: [PATCH 25/52] Fix rpc help ports --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 1a0657eab..c6a0248c6 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -485,7 +485,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-rpcbind=", _("Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)")); strUsage += HelpMessageOpt("-rpcuser=", _("Username for JSON-RPC connections")); strUsage += HelpMessageOpt("-rpcpassword=", _("Password for JSON-RPC connections")); - strUsage += HelpMessageOpt("-rpcport=", strprintf(_("Listen for JSON-RPC connections on (default: %u or testnet: %u)"), 8232, 18232)); + strUsage += HelpMessageOpt("-rpcport=", strprintf(_("Listen for JSON-RPC connections on (default: %u or testnet: %u)"), 7771, 17771)); strUsage += HelpMessageOpt("-rpcallowip=", _("Allow JSON-RPC connections from specified source. Valid for are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times")); strUsage += HelpMessageOpt("-rpcthreads=", strprintf(_("Set the number of threads to service RPC calls (default: %d)"), DEFAULT_HTTP_THREADS)); if (showDebug) { From 70df47b78bffaba86102c59283513a9af3782588 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 4 Mar 2018 06:43:17 +0000 Subject: [PATCH 26/52] Correct ports in manpages --- doc/man/komodod.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/man/komodod.1 b/doc/man/komodod.1 index f79cb74de..4c728657d 100644 --- a/doc/man/komodod.1 +++ b/doc/man/komodod.1 @@ -179,7 +179,7 @@ Relay non\-P2SH multisig (default: 1) .HP \fB\-port=\fR .IP -Listen for connections on (default: 8233 or testnet: 18233) +Listen for connections on (default: 7770 or testnet: 17770) .HP \fB\-proxy=\fR .IP @@ -424,8 +424,8 @@ Password for JSON\-RPC connections .HP \fB\-rpcport=\fR .IP -Listen for JSON\-RPC connections on (default: 8232 or testnet: -18232) +Listen for JSON\-RPC connections on (default: 7771 or testnet: +17771) .HP \fB\-rpcallowip=\fR .IP From 0df0ed0c68d2c43ac5023bbb06834918b45d3d7f Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Mar 2018 09:59:21 +0200 Subject: [PATCH 27/52] CLTV fprintf --- src/komodo_utils.h | 13 ------------- src/script/interpreter.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 4b0521498..1270b3e55 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1444,19 +1444,6 @@ uint32_t komodo_assetmagic(char *symbol,uint64_t supply,uint8_t *extraptr,int32_ return(calc_crc32(crc0,buf,len)); } -/*int32_t komodo_shortflag(char *symbol) -{ - int32_t i,shortflag = 0; - if ( symbol[0] == '-' ) - { - shortflag = 1; - for (i=0; symbol[i+1]!=0; i++) - symbol[i] = symbol[i+1]; - symbol[i] = 0; - } - return(shortflag); -}*/ - uint16_t komodo_assetport(uint32_t magic,int32_t extralen) { if ( magic == 0x8de4eef9 ) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 6c17eab70..1059cb74d 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1129,7 +1129,10 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // Now that we know we're comparing apples-to-apples, the // comparison is a simple numeric one. if (nLockTime > (int64_t)txTo->nLockTime) + { + fprintf(stderr,"CLTV error: nLockTime %u > %u txTo->nLockTime\n",(uint32_t)nLockTime,(uint32_t)txTo->nLockTime); return false; + } // Finally the nLockTime feature can be disabled and thus // CHECKLOCKTIMEVERIFY bypassed if every txin has been @@ -1142,7 +1145,10 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // inputs, but testing just this input minimizes the data // required to prove correct CHECKLOCKTIMEVERIFY execution. if (txTo->vin[nIn].IsFinal()) + { + fprintf(stderr,"CLTV error: nonfinal vin.%d\n",(int32_t)nIn); return false; + } return true; } From 5968c21549003e94c017b33eba03c7d43a748238 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Mar 2018 10:01:29 +0200 Subject: [PATCH 28/52] Test --- src/script/interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 1059cb74d..632c954af 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1130,7 +1130,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // comparison is a simple numeric one. if (nLockTime > (int64_t)txTo->nLockTime) { - fprintf(stderr,"CLTV error: nLockTime %u > %u txTo->nLockTime\n",(uint32_t)nLockTime,(uint32_t)txTo->nLockTime); + fprintf(stderr,"CLTV error: nLockTime %u > %u txTo->nLockTime\n",(uint32_t)(int64_t)nLockTime,(uint32_t)txTo->nLockTime); return false; } From fbdd7dde3310dac3ddba111caf99fc35f93f772d Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Mar 2018 10:02:44 +0200 Subject: [PATCH 29/52] Test --- src/script/interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 632c954af..52ec4f899 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1130,7 +1130,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // comparison is a simple numeric one. if (nLockTime > (int64_t)txTo->nLockTime) { - fprintf(stderr,"CLTV error: nLockTime %u > %u txTo->nLockTime\n",(uint32_t)(int64_t)nLockTime,(uint32_t)txTo->nLockTime); + fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",nLockTime,(uint32_t)txTo->nLockTime); return false; } From 67a9ed29aeae5e42e323b3d3220201607fbff5be Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Mar 2018 10:03:13 +0200 Subject: [PATCH 30/52] Test --- src/script/interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 52ec4f899..dccb4450a 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1130,7 +1130,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // comparison is a simple numeric one. if (nLockTime > (int64_t)txTo->nLockTime) { - fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",nLockTime,(uint32_t)txTo->nLockTime); + fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",(long long)nLockTime,(uint32_t)txTo->nLockTime); return false; } From ff4e7f86727ee3362da176161bfe67a2ee9de209 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Mar 2018 10:03:55 +0200 Subject: [PATCH 31/52] Test --- src/script/interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index dccb4450a..52ec4f899 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1130,7 +1130,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // comparison is a simple numeric one. if (nLockTime > (int64_t)txTo->nLockTime) { - fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",(long long)nLockTime,(uint32_t)txTo->nLockTime); + fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",nLockTime,(uint32_t)txTo->nLockTime); return false; } From b9dddf15c4b91896a69c0ad42e887ba64fb6a196 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Mar 2018 10:07:57 +0200 Subject: [PATCH 32/52] Test --- src/script/interpreter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 52ec4f899..a4deae8cf 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1130,7 +1130,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // comparison is a simple numeric one. if (nLockTime > (int64_t)txTo->nLockTime) { - fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",nLockTime,(uint32_t)txTo->nLockTime); + //fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",nLockTime,(uint32_t)txTo->nLockTime); return false; } @@ -1146,7 +1146,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // required to prove correct CHECKLOCKTIMEVERIFY execution. if (txTo->vin[nIn].IsFinal()) { - fprintf(stderr,"CLTV error: nonfinal vin.%d\n",(int32_t)nIn); + fprintf(stderr,"CLTV error: nonfinal vin.%d nSequence.%u\n",(int32_t)nIn,(uint32_t)txTo->vin[nIn].nSequence); return false; } From f8f7a4d4cd41ed51f84e25dbb67c8acbee307fbc Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Mar 2018 10:11:12 +0200 Subject: [PATCH 33/52] Test --- src/script/interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index a4deae8cf..52e788496 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1146,7 +1146,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // required to prove correct CHECKLOCKTIMEVERIFY execution. if (txTo->vin[nIn].IsFinal()) { - fprintf(stderr,"CLTV error: nonfinal vin.%d nSequence.%u\n",(int32_t)nIn,(uint32_t)txTo->vin[nIn].nSequence); + //fprintf(stderr,"CLTV error: nonfinal vin.%d nSequence.%u vs %u\n",(int32_t)nIn,(uint32_t)txTo->vin[nIn].nSequence,(uint32_t)std::numeric_limits::max()); return false; } From 7c5999c9f0a45329fcde1c1be069797c276f8b35 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Mar 2018 10:21:33 +0200 Subject: [PATCH 34/52] Prints --- src/script/interpreter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 52e788496..cd0f5eaf3 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1130,7 +1130,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // comparison is a simple numeric one. if (nLockTime > (int64_t)txTo->nLockTime) { - //fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",nLockTime,(uint32_t)txTo->nLockTime); + fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",nLockTime,(uint32_t)txTo->nLockTime); return false; } @@ -1146,7 +1146,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // required to prove correct CHECKLOCKTIMEVERIFY execution. if (txTo->vin[nIn].IsFinal()) { - //fprintf(stderr,"CLTV error: nonfinal vin.%d nSequence.%u vs %u\n",(int32_t)nIn,(uint32_t)txTo->vin[nIn].nSequence,(uint32_t)std::numeric_limits::max()); + fprintf(stderr,"CLTV error: nonfinal vin.%d nSequence.%u vs %u\n",(int32_t)nIn,(uint32_t)txTo->vin[nIn].nSequence,(uint32_t)std::numeric_limits::max()); return false; } From 7fbab03f7363bd6881dbf957879e8b20b96a242f Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Mar 2018 10:23:36 +0200 Subject: [PATCH 35/52] Test --- src/script/interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index cd0f5eaf3..10915d2ee 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1130,7 +1130,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // comparison is a simple numeric one. if (nLockTime > (int64_t)txTo->nLockTime) { - fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",nLockTime,(uint32_t)txTo->nLockTime); + fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",*(long long *)&nLockTime,(uint32_t)txTo->nLockTime); return false; } From 2458b054ecf026204e1110ae8448d0aef4974cdc Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Mar 2018 10:36:35 +0200 Subject: [PATCH 36/52] Test --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index a52fd3f02..4277beabd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -737,7 +737,7 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime) } else if (!txin.IsFinal()) { - //printf("non-final txin seq.%x locktime.%u vs nTime.%u\n",txin.nSequence,(uint32_t)tx.nLockTime,(uint32_t)nBlockTime); + printf("non-final txin seq.%x locktime.%u vs nTime.%u\n",txin.nSequence,(uint32_t)tx.nLockTime,(uint32_t)nBlockTime); return false; } } From ff0e23d17e83d58de02f64ad56f87c985db75113 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Mar 2018 10:39:54 +0200 Subject: [PATCH 37/52] Test --- src/script/interpreter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 10915d2ee..1e236634a 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1130,7 +1130,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // comparison is a simple numeric one. if (nLockTime > (int64_t)txTo->nLockTime) { - fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",*(long long *)&nLockTime,(uint32_t)txTo->nLockTime); + //fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",*(long long *)&nLockTime,(uint32_t)txTo->nLockTime); return false; } @@ -1146,7 +1146,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // required to prove correct CHECKLOCKTIMEVERIFY execution. if (txTo->vin[nIn].IsFinal()) { - fprintf(stderr,"CLTV error: nonfinal vin.%d nSequence.%u vs %u\n",(int32_t)nIn,(uint32_t)txTo->vin[nIn].nSequence,(uint32_t)std::numeric_limits::max()); + //fprintf(stderr,"CLTV error: nonfinal vin.%d nSequence.%u vs %u\n",(int32_t)nIn,(uint32_t)txTo->vin[nIn].nSequence,(uint32_t)std::numeric_limits::max()); return false; } From 47ca6eb3c2f1ad9e87d2e2cfda33840f6e73eb85 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 5 Mar 2018 10:23:01 +0200 Subject: [PATCH 38/52] Remove -Werror to allow compile on more OS variants --- zcutil/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zcutil/build.sh b/zcutil/build.sh index 2e3837f3a..f789c7a8d 100755 --- a/zcutil/build.sh +++ b/zcutil/build.sh @@ -88,5 +88,5 @@ PREFIX="$(pwd)/depends/$BUILD/" HOST="$HOST" BUILD="$BUILD" NO_RUST="$RUST_ARG" "$MAKE" "$@" -C ./depends/ V=1 ./autogen.sh -CC="$CC" CXX="$CXX" ./configure --prefix="${PREFIX}" --host="$HOST" --build="$BUILD" "$RUST_ARG" "$HARDENING_ARG" "$LCOV_ARG" "$TEST_ARG" "$MINING_ARG" CXXFLAGS='-fwrapv -fno-strict-aliasing -Werror -g' +CC="$CC" CXX="$CXX" ./configure --prefix="${PREFIX}" --host="$HOST" --build="$BUILD" "$RUST_ARG" "$HARDENING_ARG" "$LCOV_ARG" "$TEST_ARG" "$MINING_ARG" CXXFLAGS='-fwrapv -fno-strict-aliasing -g' "$MAKE" "$@" V=1 From 17abd35a71c033e77b744893cf7e71b1bfe3f3ad Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Mar 2018 00:57:48 +0200 Subject: [PATCH 39/52] Dont write rpcport into .conf --- src/komodo_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 1270b3e55..8b12646ed 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1365,7 +1365,7 @@ void komodo_configfile(char *symbol,uint16_t port) #ifndef FROM_CLI if ( (fp= fopen(fname,"wb")) != 0 ) { - fprintf(fp,"rpcuser=user%u\nrpcpassword=pass%s\nrpcport=%u\nserver=1\ntxindex=1\nrpcworkqueue=64\n",crc,password,port); + fprintf(fp,"rpcuser=user%u\nrpcpassword=pass%s\nserver=1\ntxindex=1\nrpcworkqueue=64\n",crc,password); fclose(fp); printf("Created (%s)\n",fname); } else printf("Couldnt create (%s)\n",fname); From 63998b663451794eaff3c7e4013e3919c677643d Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Mar 2018 00:58:36 +0200 Subject: [PATCH 40/52] revert --- src/komodo_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 8b12646ed..1270b3e55 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1365,7 +1365,7 @@ void komodo_configfile(char *symbol,uint16_t port) #ifndef FROM_CLI if ( (fp= fopen(fname,"wb")) != 0 ) { - fprintf(fp,"rpcuser=user%u\nrpcpassword=pass%s\nserver=1\ntxindex=1\nrpcworkqueue=64\n",crc,password); + fprintf(fp,"rpcuser=user%u\nrpcpassword=pass%s\nrpcport=%u\nserver=1\ntxindex=1\nrpcworkqueue=64\n",crc,password,port); fclose(fp); printf("Created (%s)\n",fname); } else printf("Couldnt create (%s)\n",fname); From e2c2f297d11f57f72d0bab7e9bb33c907fda36dc Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Mar 2018 20:32:08 +0200 Subject: [PATCH 41/52] Accept pre-notarization block that matches --- src/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 4277beabd..b0d20b7c5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3372,7 +3372,14 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta if (pcheckpoint && (nHeight < pcheckpoint->nHeight || nHeight == 1 && chainActive.Tip() != 0 && chainActive.Tip()->nHeight > 1) ) return state.DoS(100, error("%s: forked chain older than last checkpoint (height %d) vs %d", __func__, nHeight,pcheckpoint->nHeight)); else if ( komodo_checkpoint(¬arized_height,nHeight,hash) < 0 ) - return state.DoS(100, error("%s: forked chain %d older than last notarized (height %d) vs %d", __func__,nHeight, notarized_height)); + { + CBlockIndex *heightblock = chainActive[nHeight]; + if ( heightblock != 0 && pblockindex->GetBlockHash() == hash ) + { + fprintf(stderr,"got a pre notarization block that matches height.%d\n",(int32_t)nHeight); + return true; + } else return state.DoS(100, error("%s: forked chain %d older than last notarized (height %d) vs %d", __func__,nHeight, notarized_height)); + } } // Reject block.nVersion < 4 blocks if (block.nVersion < 4) From cc07ad72d7719cf2d4bb69776f5adedeed059a44 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Mar 2018 20:50:07 +0200 Subject: [PATCH 42/52] Test --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index b0d20b7c5..fc1d3fdd0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3374,7 +3374,7 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta else if ( komodo_checkpoint(¬arized_height,nHeight,hash) < 0 ) { CBlockIndex *heightblock = chainActive[nHeight]; - if ( heightblock != 0 && pblockindex->GetBlockHash() == hash ) + if ( heightblock != 0 && heightblock->GetBlockHash() == hash ) { fprintf(stderr,"got a pre notarization block that matches height.%d\n",(int32_t)nHeight); return true; From beb911ecb4b760399f67f23b8eba4c905247117b Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Mar 2018 00:30:41 +0200 Subject: [PATCH 43/52] Prints --- src/komodo_bitcoind.h | 9 +++++---- src/main.cpp | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index d4364a3ea..bec7bf161 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -814,16 +814,17 @@ int32_t komodo_checkpoint(int32_t *notarized_heightp,int32_t nHeight,uint256 has { if ( nHeight < notarized_height ) { - fprintf(stderr,"nHeight.%d < NOTARIZED_HEIGHT.%d\n",nHeight,notarized_height); + fprintf(stderr,"[%s] nHeight.%d < NOTARIZED_HEIGHT.%d\n",ASSETCHAINS_SYMBOL,nHeight,notarized_height); return(-1); } else if ( nHeight == notarized_height && memcmp(&hash,¬arized_hash,sizeof(hash)) != 0 ) { - fprintf(stderr,"nHeight.%d == NOTARIZED_HEIGHT.%d, diff hash\n",nHeight,notarized_height); + fprintf(stderr,"[%s] nHeight.%d == NOTARIZED_HEIGHT.%d, diff hash\n",ASSETCHAINS_SYMBOL,nHeight,notarized_height); return(-1); } - } else fprintf(stderr,"unexpected error notary_hash %s ht.%d at ht.%d\n",notarized_hash.ToString().c_str(),notarized_height,notary->nHeight); - } else if ( notarized_height > 0 && notarized_height != 73880 && notarized_height >= 170000 ) + } else fprintf(stderr,"[%s] unexpected error notary_hash %s ht.%d at ht.%d\n",ASSETCHAINS_SYMBOL,notarized_hash.ToString().c_str(),notarized_height,notary->nHeight); + } + else if ( notarized_height > 0 && notarized_height != 73880 && notarized_height >= 170000 ) fprintf(stderr,"[%s] couldnt find notarized.(%s %d) ht.%d\n",ASSETCHAINS_SYMBOL,notarized_hash.ToString().c_str(),notarized_height,pindex->nHeight); return(0); } diff --git a/src/main.cpp b/src/main.cpp index fc1d3fdd0..ee90b74bd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3448,7 +3448,9 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc if (hash != chainparams.GetConsensus().hashGenesisBlock) { BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock); if (mi == mapBlockIndex.end()) + { return state.DoS(10, error("%s: prev block not found", __func__), 0, "bad-prevblk"); + } pindexPrev = (*mi).second; if (pindexPrev == 0 || (pindexPrev->nStatus & BLOCK_FAILED_MASK) ) return state.DoS(100, error("%s: prev block invalid", __func__), REJECT_INVALID, "bad-prevblk"); From 3ecbf9013400e6981990450949a298c5fddfb9f2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Mar 2018 01:15:08 +0200 Subject: [PATCH 44/52] Test already existing block --- src/main.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index ee90b74bd..6a7dd95de 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3437,6 +3437,36 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc *ppindex = pindex; if (pindex != 0 && pindex->nStatus & BLOCK_FAILED_MASK) return state.Invalid(error("%s: block is marked invalid", __func__), 0, "duplicate"); + if ( pindex != 0 ) // jl777 debug test + { + if (!CheckBlockHeader(*ppindex!=0?(*ppindex)->nHeight:0,*ppindex, block, state)) + { + fprintf(stderr,"known block failing CheckBlockHeader %d\n",(int32_t)pindex->nHeight); + return false; + } + CBlockIndex* pindexPrev = NULL; + if (hash != chainparams.GetConsensus().hashGenesisBlock) + { + BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock); + if (mi == mapBlockIndex.end()) + { + fprintf(stderr,"known block.%d failing to find prevblock\n",(int32_t)pindex->nHeight); + return state.DoS(10, error("%s: prev block not found", __func__), 0, "bad-prevblk"); + } + pindexPrev = (*mi).second; + if (pindexPrev == 0 || (pindexPrev->nStatus & BLOCK_FAILED_MASK) ) + { + fprintf(stderr,"known block.%d found invalid prevblock\n",(int32_t)pindex->nHeight); + return state.DoS(100, error("%s: prev block invalid", __func__), REJECT_INVALID, "bad-prevblk"); + } + } + if (!ContextualCheckBlockHeader(block, state, pindexPrev)) + { + fprintf(stderr,"known block.%d failing ContextualCheckBlockHeader\n",(int32_t)pindex->nHeight); + return false; + } + } + return true; } From a36a3726cf93180c83cd4e0f95773d567a1af86b Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Mar 2018 01:28:39 +0200 Subject: [PATCH 45/52] Mark failed blocks due to changed state --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 6a7dd95de..ec94f1e4e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3439,8 +3439,9 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc return state.Invalid(error("%s: block is marked invalid", __func__), 0, "duplicate"); if ( pindex != 0 ) // jl777 debug test { - if (!CheckBlockHeader(*ppindex!=0?(*ppindex)->nHeight:0,*ppindex, block, state)) + if (!CheckBlockHeader(pindex->nHeight:0,pindex, block, state)) { + pindex->nStatus |= BLOCK_FAILED_MASK; fprintf(stderr,"known block failing CheckBlockHeader %d\n",(int32_t)pindex->nHeight); return false; } @@ -3450,18 +3451,21 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock); if (mi == mapBlockIndex.end()) { + pindex->nStatus |= BLOCK_FAILED_MASK; fprintf(stderr,"known block.%d failing to find prevblock\n",(int32_t)pindex->nHeight); return state.DoS(10, error("%s: prev block not found", __func__), 0, "bad-prevblk"); } pindexPrev = (*mi).second; if (pindexPrev == 0 || (pindexPrev->nStatus & BLOCK_FAILED_MASK) ) { + pindex->nStatus |= BLOCK_FAILED_MASK; fprintf(stderr,"known block.%d found invalid prevblock\n",(int32_t)pindex->nHeight); return state.DoS(100, error("%s: prev block invalid", __func__), REJECT_INVALID, "bad-prevblk"); } } if (!ContextualCheckBlockHeader(block, state, pindexPrev)) { + pindex->nStatus |= BLOCK_FAILED_MASK; fprintf(stderr,"known block.%d failing ContextualCheckBlockHeader\n",(int32_t)pindex->nHeight); return false; } From 2c5af2cd09e96f89cf12e330434a89caede7b3f3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Mar 2018 01:47:06 +0200 Subject: [PATCH 46/52] -print --- src/komodo_bitcoind.h | 2 +- src/main.cpp | 68 +++++++++++++++++++++---------------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index bec7bf161..76f6765ad 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -814,7 +814,7 @@ int32_t komodo_checkpoint(int32_t *notarized_heightp,int32_t nHeight,uint256 has { if ( nHeight < notarized_height ) { - fprintf(stderr,"[%s] nHeight.%d < NOTARIZED_HEIGHT.%d\n",ASSETCHAINS_SYMBOL,nHeight,notarized_height); + //fprintf(stderr,"[%s] nHeight.%d < NOTARIZED_HEIGHT.%d\n",ASSETCHAINS_SYMBOL,nHeight,notarized_height); return(-1); } else if ( nHeight == notarized_height && memcmp(&hash,¬arized_hash,sizeof(hash)) != 0 ) diff --git a/src/main.cpp b/src/main.cpp index ec94f1e4e..99a5133d3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3376,7 +3376,7 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta CBlockIndex *heightblock = chainActive[nHeight]; if ( heightblock != 0 && heightblock->GetBlockHash() == hash ) { - fprintf(stderr,"got a pre notarization block that matches height.%d\n",(int32_t)nHeight); + //fprintf(stderr,"got a pre notarization block that matches height.%d\n",(int32_t)nHeight); return true; } else return state.DoS(100, error("%s: forked chain %d older than last notarized (height %d) vs %d", __func__,nHeight, notarized_height)); } @@ -3437,39 +3437,39 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc *ppindex = pindex; if (pindex != 0 && pindex->nStatus & BLOCK_FAILED_MASK) return state.Invalid(error("%s: block is marked invalid", __func__), 0, "duplicate"); - if ( pindex != 0 ) // jl777 debug test - { - if (!CheckBlockHeader(pindex->nHeight:0,pindex, block, state)) - { - pindex->nStatus |= BLOCK_FAILED_MASK; - fprintf(stderr,"known block failing CheckBlockHeader %d\n",(int32_t)pindex->nHeight); - return false; - } - CBlockIndex* pindexPrev = NULL; - if (hash != chainparams.GetConsensus().hashGenesisBlock) - { - BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock); - if (mi == mapBlockIndex.end()) - { - pindex->nStatus |= BLOCK_FAILED_MASK; - fprintf(stderr,"known block.%d failing to find prevblock\n",(int32_t)pindex->nHeight); - return state.DoS(10, error("%s: prev block not found", __func__), 0, "bad-prevblk"); - } - pindexPrev = (*mi).second; - if (pindexPrev == 0 || (pindexPrev->nStatus & BLOCK_FAILED_MASK) ) - { - pindex->nStatus |= BLOCK_FAILED_MASK; - fprintf(stderr,"known block.%d found invalid prevblock\n",(int32_t)pindex->nHeight); - return state.DoS(100, error("%s: prev block invalid", __func__), REJECT_INVALID, "bad-prevblk"); - } - } - if (!ContextualCheckBlockHeader(block, state, pindexPrev)) - { - pindex->nStatus |= BLOCK_FAILED_MASK; - fprintf(stderr,"known block.%d failing ContextualCheckBlockHeader\n",(int32_t)pindex->nHeight); - return false; - } - } + if ( pindex != 0 ) // jl777 debug test + { + if (!CheckBlockHeader(pindex->nHeight:0,pindex, block, state)) + { + pindex->nStatus |= BLOCK_FAILED_MASK; + fprintf(stderr,"known block failing CheckBlockHeader %d\n",(int32_t)pindex->nHeight); + return false; + } + CBlockIndex* pindexPrev = NULL; + if (hash != chainparams.GetConsensus().hashGenesisBlock) + { + BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock); + if (mi == mapBlockIndex.end()) + { + pindex->nStatus |= BLOCK_FAILED_MASK; + fprintf(stderr,"known block.%d failing to find prevblock\n",(int32_t)pindex->nHeight); + return state.DoS(10, error("%s: prev block not found", __func__), 0, "bad-prevblk"); + } + pindexPrev = (*mi).second; + if (pindexPrev == 0 || (pindexPrev->nStatus & BLOCK_FAILED_MASK) ) + { + pindex->nStatus |= BLOCK_FAILED_MASK; + fprintf(stderr,"known block.%d found invalid prevblock\n",(int32_t)pindex->nHeight); + return state.DoS(100, error("%s: prev block invalid", __func__), REJECT_INVALID, "bad-prevblk"); + } + } + if (!ContextualCheckBlockHeader(block, state, pindexPrev)) + { + pindex->nStatus |= BLOCK_FAILED_MASK; + fprintf(stderr,"known block.%d failing ContextualCheckBlockHeader\n",(int32_t)pindex->nHeight); + return false; + } + } return true; } From 6dc496fb3de759c879e5340eafe016aec092cd7e Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Mar 2018 01:47:56 +0200 Subject: [PATCH 47/52] Test --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 99a5133d3..ce157f411 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3439,7 +3439,7 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc return state.Invalid(error("%s: block is marked invalid", __func__), 0, "duplicate"); if ( pindex != 0 ) // jl777 debug test { - if (!CheckBlockHeader(pindex->nHeight:0,pindex, block, state)) + if (!CheckBlockHeader(pindex->nHeight,pindex, block, state)) { pindex->nStatus |= BLOCK_FAILED_MASK; fprintf(stderr,"known block failing CheckBlockHeader %d\n",(int32_t)pindex->nHeight); From 4e0d20786bb07aa4472ed89320e577450bc89b9c Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Mar 2018 02:37:17 +0200 Subject: [PATCH 48/52] Test --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index ce157f411..9cfc4e5b6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3437,7 +3437,7 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc *ppindex = pindex; if (pindex != 0 && pindex->nStatus & BLOCK_FAILED_MASK) return state.Invalid(error("%s: block is marked invalid", __func__), 0, "duplicate"); - if ( pindex != 0 ) // jl777 debug test + if ( pindex != 0 && IsInitialBlockDownload() == 0 ) // jl777 debug test { if (!CheckBlockHeader(pindex->nHeight,pindex, block, state)) { From 1931844a9c2882feaf33dd8cee07480dc861c10e Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Mar 2018 05:30:26 +0200 Subject: [PATCH 49/52] Change IsInitialBlockDownload for asset chains to match KMD --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 9cfc4e5b6..86b52495a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1602,10 +1602,10 @@ bool IsInitialBlockDownload() ptr = pindexBestHeader; else if ( pindexBestHeader != 0 && pindexBestHeader->nHeight > ptr->nHeight ) ptr = pindexBestHeader; - if ( ASSETCHAINS_SYMBOL[0] == 0 ) + //if ( ASSETCHAINS_SYMBOL[0] == 0 ) state = ((chainActive.Height() < ptr->nHeight - 24*60) || ptr->GetBlockTime() < (GetTime() - chainParams.MaxTipAge())); - else state = (chainActive.Height() < ptr->nHeight - 10); + //else state = (chainActive.Height() < ptr->nHeight - 24*60); //fprintf(stderr,"state.%d ht.%d vs %d, t.%u %u\n",state,(int32_t)chainActive.Height(),(uint32_t)ptr->nHeight,(int32_t)ptr->GetBlockTime(),(uint32_t)(GetTime() - chainParams.MaxTipAge())); if (!state) { From ca65f7ab1e45f2e7274d0ec981a64c4e53ccc91f Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Mar 2018 05:40:10 +0200 Subject: [PATCH 50/52] Test --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 86b52495a..476519399 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3437,7 +3437,7 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc *ppindex = pindex; if (pindex != 0 && pindex->nStatus & BLOCK_FAILED_MASK) return state.Invalid(error("%s: block is marked invalid", __func__), 0, "duplicate"); - if ( pindex != 0 && IsInitialBlockDownload() == 0 ) // jl777 debug test + if ( pindex != 0 )//&& IsInitialBlockDownload() == 0 ) // jl777 debug test { if (!CheckBlockHeader(pindex->nHeight,pindex, block, state)) { From f233f9b156e6e89a34ece4eecec08a2005f61c40 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 8 Mar 2018 05:46:26 +0200 Subject: [PATCH 51/52] Revert --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 476519399..86b52495a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3437,7 +3437,7 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc *ppindex = pindex; if (pindex != 0 && pindex->nStatus & BLOCK_FAILED_MASK) return state.Invalid(error("%s: block is marked invalid", __func__), 0, "duplicate"); - if ( pindex != 0 )//&& IsInitialBlockDownload() == 0 ) // jl777 debug test + if ( pindex != 0 && IsInitialBlockDownload() == 0 ) // jl777 debug test { if (!CheckBlockHeader(pindex->nHeight,pindex, block, state)) { From 14a73f038879b4dfe6024ba64b853f76ba1e45e4 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Thu, 8 Mar 2018 19:00:32 +0300 Subject: [PATCH 52/52] OOT coin --- src/assetchains | 1 + src/assetchains.old | 7 ++++--- src/dpowassets | 1 + src/fiat-cli | 1 + src/fiat/oot | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) create mode 100755 src/fiat/oot diff --git a/src/assetchains b/src/assetchains index ba5dcca18..d6e60be12 100755 --- a/src/assetchains +++ b/src/assetchains @@ -51,3 +51,4 @@ komodo_asset VOTE2018 600000000 komodo_asset PIZZA 100000000 komodo_asset BEER 100000000 komodo_asset NINJA 100000000 +komodo_asset OOT 216000000 diff --git a/src/assetchains.old b/src/assetchains.old index 030a69ebf..94c0c8e6e 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -25,9 +25,10 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=ETOMIC -ac_supply=100000000 -addnode=78.47.196.146 & ./komodod -pubkey=$pubkey -ac_name=BTCH -ac_supply=20998641 -addnode=78.47.196.146 & ./komodod -pubkey=$pubkey -ac_name=VOTE2018 -ac_supply=600000000 -addnode=78.47.196.146 & -./komodod -pubkey=$pubkey -ac_name=BEER -ac_supply=100000000 -addnode=24.54.206.138 & -./komodod -pubkey=$pubkey -ac_name=PIZZA -ac_supply=100000000 -addnode=24.54.206.138 & -./komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=192.241.134.19 & +./komodod -pubkey=$pubkey -ac_name=BEER -ac_supply=100000000 -addnode=78.47.196.146 & +./komodod -pubkey=$pubkey -ac_name=PIZZA -ac_supply=100000000 -addnode=78.47.196.146 & +./komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=78.47.196.146 & +./komodod -pubkey=$pubkey -ac_name=OOT -ac_supply=216000000-addnode=174.138.107.226 & #sleep $delay #./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 & diff --git a/src/dpowassets b/src/dpowassets index 4a75bbce7..d2f0006ff 100755 --- a/src/dpowassets +++ b/src/dpowassets @@ -29,6 +29,7 @@ curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dp #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\":\"VOTE2018\",\"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\":\"USD\",\"pubkey\":\"$pubkey\"}" #curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EUR\",\"pubkey\":\"$pubkey\"}" diff --git a/src/fiat-cli b/src/fiat-cli index 9e50deda7..89f82c632 100755 --- a/src/fiat-cli +++ b/src/fiat-cli @@ -24,3 +24,4 @@ echo pizza; fiat/pizza $1 $2 $3 $4 echo beer; fiat/beer $1 $2 $3 $4 echo vote2018; fiat/vote2018 $1 $2 $3 $4 echo ninja; fiat/ninja $1 $2 $3 $4 +echo oot; fiat/oot $1 $2 $3 $4 diff --git a/src/fiat/oot b/src/fiat/oot new file mode 100755 index 000000000..4c7c6b683 --- /dev/null +++ b/src/fiat/oot @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=OOT $1 $2 $3 $4 $5 $6