From 98418663807eed79f6b43c2dfed28002a1df5127 Mon Sep 17 00:00:00 2001 From: Jorian Date: Mon, 20 May 2019 12:05:09 +0200 Subject: [PATCH 01/65] add K64 --- src/ac/k64 | 2 ++ src/assetchains.json | 7 +++++++ src/assetchains.old | 1 + src/fiat/k64 | 2 ++ 4 files changed, 12 insertions(+) create mode 100755 src/ac/k64 create mode 100755 src/fiat/k64 diff --git a/src/ac/k64 b/src/ac/k64 new file mode 100755 index 000000000..a3b3bc835 --- /dev/null +++ b/src/ac/k64 @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=K64 $1 $2 $3 $4 $5 $6 diff --git a/src/assetchains.json b/src/assetchains.json index 683b791ad..54814245e 100644 --- a/src/assetchains.json +++ b/src/assetchains.json @@ -273,5 +273,12 @@ "195.201.20.230", "80.240.17.222" ] + }, + { + "ac_name": "K64", + "ac_reward": "0", + "ac_supply": "64000777", + "ac_staked": "10", + "addnode": ["18.197.20.21"] } ] diff --git a/src/assetchains.old b/src/assetchains.old index 424d411ca..664df7e0a 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -51,3 +51,4 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=VOTE2019 -ac_supply=123651638 -ac_public=1 -addnode=95.213.238.98 & ./komodod -pubkey=$pubkey -ac_name=KOIN -ac_supply=125000000 -addnode=3.0.32.10 & ./komodod -pubkey=$pubkey -ac_name=ZEXO -ac_supply=100000000 -ac_reward=1478310502 -ac_halving=525600 -ac_cc=42 -ac_ccenable=236 -ac_perc=77700 -ac_staked=93 -ac_pubkey=02713bd85e054db923694b6b7a85306264edf4d6bd6d331814f2b40af444b3ebbc -ac_public=1 -addnode=80.240.17.222 & +./komodod -pubkey=$pubkey -ac_name=K64 -ac_supply=64000777 -ac_reward=0 -ac_staked=10 -addnode=18.197.20.211 & diff --git a/src/fiat/k64 b/src/fiat/k64 new file mode 100755 index 000000000..a3b3bc835 --- /dev/null +++ b/src/fiat/k64 @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=K64 $1 $2 $3 $4 $5 $6 From 581b6411d63fecf83c97b30e5264774b2c3accb1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 22 May 2019 21:56:58 -1100 Subject: [PATCH 02/65] Ignore a.out --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 6cebf87fe..d139071e0 100644 --- a/.gitignore +++ b/.gitignore @@ -155,3 +155,5 @@ src/rogue.scr src/cc/rogue/confdefs.h src/cc/rogue/x64 + +src/cc/dapps/a.out From 373b02e03f2bc67179262c39219b0a5fa5b69f0e Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 25 Jan 2019 17:14:15 -1100 Subject: [PATCH 03/65] Adjust for network header --- src/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.h b/src/net.h index 02714e20f..996dcd2b2 100644 --- a/src/net.h +++ b/src/net.h @@ -48,7 +48,7 @@ static const unsigned int MAX_INV_SZ = 50000; /** The maximum number of new addresses to accumulate before announcing. */ static const unsigned int MAX_ADDR_TO_SEND = 1000; /** Maximum length of incoming protocol messages (no message over 2 MiB is currently acceptable). */ -static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 4 * 1024 * 1024; +static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 4 * 1024 * 1024 + 24; /** Maximum length of strSubVer in `version` message */ static const unsigned int MAX_SUBVERSION_LENGTH = 256; /** -listen default */ From cf81bdb5f6dbe6441d31526b6c0fcc9bc3d18396 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 22 May 2019 21:59:50 -1100 Subject: [PATCH 04/65] Ignores --- .gitignore | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitignore b/.gitignore index cd2641c22..59269eb37 100644 --- a/.gitignore +++ b/.gitignore @@ -126,3 +126,21 @@ src/komodo-tx.exe src/cryptoconditions/compile + +src/cc/dapps/a.out + +src/checkfile + +src/foo.zip + +src/log + +src/rogue.530623577502174316.0 + +src/rogue.530623577502174316.pack + +src/rogue.530623577502174316.player + +src/ROGUE.conf + +src/rogue.scr From 90f6d123adca067618208cb942c1175f73f41223 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Sun, 26 May 2019 23:43:27 +0800 Subject: [PATCH 05/65] fix build --- src/cc/makecclib | 2 +- src/wallet/db.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cc/makecclib b/src/cc/makecclib index 5241ea675..e9a015e2f 100755 --- a/src/cc/makecclib +++ b/src/cc/makecclib @@ -7,7 +7,7 @@ make -f Makefile_rogue rm ../libcc.so cp librogue.so ../libcc.so -#exit 0 +exit 0 echo sudoku/musig/dilithium gcc -O3 -std=c++11 -I../secp256k1/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -c -o sudokucc.so cclib.cpp diff --git a/src/wallet/db.h b/src/wallet/db.h index e1ae52909..f23122830 100644 --- a/src/wallet/db.h +++ b/src/wallet/db.h @@ -34,8 +34,8 @@ #include // If CCLIB fails to compile with this, use the one below. -#include -//#include "../depends/x86_64-unknown-linux-gnu/include/db_cxx.h" +//#include +#include "../depends/x86_64-unknown-linux-gnu/include/db_cxx.h" extern unsigned int nWalletDBUpdated; From 784679fff6564757b761d9af6aedfd5fc1169f6b Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 27 May 2019 02:51:11 +0800 Subject: [PATCH 06/65] This kind of works, result comes out as negative number though. --- src/rpc/mining.cpp | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index c95d7b891..8e5de0f53 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -59,6 +59,20 @@ arith_uint256 komodo_PoWtarget(int32_t *percPoSp,arith_uint256 target,int32_t he * Return average network hashes per second based on the last 'lookup' blocks, * or over the difficulty averaging window if 'lookup' is nonpositive. * If 'height' is nonnegative, compute the estimate at the time when a given block was found. +time =0, lastBlockTime=time_of_last_block, PoWblocks=0 +for x = 1 to 100 +get block info +if PoS then + lastBlockTime = ThisBlockTime + next x +else + PoWblocks += 1 + some var/array about diff + newTime = timeNow - lastBlockTime + totalTime = totalTime + newTime + lastBlockTime = newTime +next x +do math of num PoW blocks over PoW active Time with stored diff info */ int64_t GetNetworkHashPS(int lookup, int height) { CBlockIndex *pb = chainActive.LastTip(); @@ -79,21 +93,36 @@ int64_t GetNetworkHashPS(int lookup, int height) { CBlockIndex *pb0 = pb; int64_t minTime = pb0->GetBlockTime(); + int64_t timeoffset = 0, n=0,i=0; int64_t maxTime = minTime; - for (int i = 0; i < lookup; i++) { + for (i = 0; i < lookup; i++) { pb0 = pb0->pprev; + // if PoW block save block time, and skip the hash. + if ( pb0->segid >= 0 && pb0->segid != -2 ) + { + n++; + // only staking chains should ever set this. + + timeoffset += pb0->GetBlockTime() - pb0->pprev->GetBlockTime(); + //fprintf(stderr, "staking tx.%li segid.%i blocktime.%li\n", n, pb0->segid, (pb0->GetBlockTime() - pb0->pprev->GetBlockTime())); + if ( lookup > pb->GetHeight() ) + break; + lookup++; + continue; + } int64_t time = pb0->GetBlockTime(); minTime = std::min(time, minTime); maxTime = std::max(time, maxTime); } + //fprintf(stderr, "number blocks scanned.%li\n",i ); // In case there's a situation where minTime == maxTime, we don't want a divide by zero exception. if (minTime == maxTime) return 0; arith_uint256 workDiff = pb->chainPower.chainWork - pb0->chainPower.chainWork; - int64_t timeDiff = maxTime - minTime; - + int64_t timeDiff = maxTime - minTime;// - timeoffset; + fprintf(stderr, "timediff.%li timeoffset.%li mintime.%li maxtime.%li\n", timeDiff, timeoffset, minTime, maxTime); return (int64_t)(workDiff.getdouble() / timeDiff); } From 1c6723b9f1428f3e79ed614275a1863d556ee77f Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 27 May 2019 16:22:43 +0800 Subject: [PATCH 07/65] for gcharang --- src/rpc/blockchain.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 76d35ff61..ddb5dab12 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -51,6 +51,7 @@ using namespace std; extern int32_t KOMODO_INSYNC; extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry); void ScriptPubKeyToJSON(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex); +int32_t komodo_notarized_height(int32_t *prevMoMheightp,uint256 *hashp,uint256 *txidp); #include "komodo_defs.h" #include "komodo_structs.h" @@ -133,6 +134,9 @@ UniValue blockheaderToJSON(const CBlockIndex* blockindex) result.push_back(Pair("error", "null blockhash")); return(result); } + uint256 notarized_hash,notarized_desttxid; int32_t prevMoMheight,notarized_height; + notarized_height = komodo_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid); + result.push_back(Pair("last_notarized_height", notarized_height)); result.push_back(Pair("hash", blockindex->GetBlockHash().GetHex())); int confirmations = -1; // Only report confirmations if the block is on the main chain @@ -284,6 +288,9 @@ UniValue blockToDeltasJSON(const CBlock& block, const CBlockIndex* blockindex) UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false) { UniValue result(UniValue::VOBJ); + uint256 notarized_hash,notarized_desttxid; int32_t prevMoMheight,notarized_height; + notarized_height = komodo_notarized_height(&prevMoMheight,¬arized_hash,¬arized_desttxid); + result.push_back(Pair("last_notarized_height", notarized_height)); result.push_back(Pair("hash", block.GetHash().GetHex())); int confirmations = -1; // Only report confirmations if the block is on the main chain From f08a7d2d03f47036f25845931faa2a060cd04a32 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 27 May 2019 17:58:23 +0800 Subject: [PATCH 08/65] add ENABLE LABS global var to build cclib correctly with start.sh. --- src/cc/makecclib | 5 ++++- src/wallet/db.h | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/cc/makecclib b/src/cc/makecclib index e9a015e2f..0d82463c4 100755 --- a/src/cc/makecclib +++ b/src/cc/makecclib @@ -7,7 +7,10 @@ make -f Makefile_rogue rm ../libcc.so cp librogue.so ../libcc.so -exit 0 +if [ "${LABS_FLAGS}" = "ENABLE_LABS" ] +then + exit +fi echo sudoku/musig/dilithium gcc -O3 -std=c++11 -I../secp256k1/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -c -o sudokucc.so cclib.cpp diff --git a/src/wallet/db.h b/src/wallet/db.h index f23122830..3aaf3d34b 100644 --- a/src/wallet/db.h +++ b/src/wallet/db.h @@ -33,9 +33,11 @@ #include -// If CCLIB fails to compile with this, use the one below. -//#include -#include "../depends/x86_64-unknown-linux-gnu/include/db_cxx.h" +#ifdef BUILD_ROGUE + #include "../depends/x86_64-unknown-linux-gnu/include/db_cxx.h" +#else + #include +#endif extern unsigned int nWalletDBUpdated; From 8c9fc38a928cbd21b9034dd9a12fa07a5cc0ce73 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Thu, 30 May 2019 21:19:15 +0800 Subject: [PATCH 09/65] fix --- src/cc/makecclib | 5 ----- src/cc/makerogue | 3 +++ zcutil/build.sh | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/cc/makecclib b/src/cc/makecclib index 0d82463c4..e4816c55c 100755 --- a/src/cc/makecclib +++ b/src/cc/makecclib @@ -7,11 +7,6 @@ make -f Makefile_rogue rm ../libcc.so cp librogue.so ../libcc.so -if [ "${LABS_FLAGS}" = "ENABLE_LABS" ] -then - exit -fi - echo sudoku/musig/dilithium gcc -O3 -std=c++11 -I../secp256k1/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -c -o sudokucc.so cclib.cpp diff --git a/src/cc/makerogue b/src/cc/makerogue index ff16cbb16..a389ba2dd 100755 --- a/src/cc/makerogue +++ b/src/cc/makerogue @@ -35,3 +35,6 @@ else echo ROGUE BUILD FAILED exit 1 fi + +rm ../libcc.so +cp librogue.so ../libcc.so diff --git a/zcutil/build.sh b/zcutil/build.sh index dc4d027b1..df3dfa234 100755 --- a/zcutil/build.sh +++ b/zcutil/build.sh @@ -106,7 +106,7 @@ CONFIG_SITE="$PWD/depends/$HOST/share/config.site" ./configure "$HARDENING_ARG" WD=$PWD cd src/cc echo $PWD -./makecclib +./makerogue cd $WD "$MAKE" "$@" V=1 From 5e6d7bad4b8f47aed3eac35c68665a17a789a1a2 Mon Sep 17 00:00:00 2001 From: ca333 Date: Fri, 31 May 2019 03:11:54 +0200 Subject: [PATCH 10/65] fix OSX this fixes the faulty OSX patch --- src/cc/Makefile_rogue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cc/Makefile_rogue b/src/cc/Makefile_rogue index baf8767aa..3b2f65e00 100644 --- a/src/cc/Makefile_rogue +++ b/src/cc/Makefile_rogue @@ -1,6 +1,6 @@ SHELL = /bin/sh CC = gcc -CC_DARWIN = g++-6 +CC_DARWIN = g++-8 CC_WIN = x86_64-w64-mingw32-gcc-posix CFLAGS_DARWIN = -DBUILD_ROGUE -std=c++11 -arch x86_64 -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -Wl,-undefined -Wl,dynamic_lookup -Wno-write-strings -shared -dynamiclib CFLAGS = -Wno-write-strings -DBUILD_ROGUE -std=c++11 -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared @@ -14,7 +14,7 @@ TARGET = librogue.so TARGET_DARWIN = librogue.dylib TARGET_WIN = librogue.dll SOURCES = cclib.cpp -#HEADERS = $(shell echo ../cryptoconditions/include/*.h) -I/usr/local/Cellar/gcc\@6/6.4.0_2/include/c++/6.4.0/ +#HEADERS = $(shell echo ../cryptoconditions/include/*.h) -I/usr/local/Cellar/gcc\@8/8.3.0/include/c++/8.3.0/ all: $(TARGET) From 43d3043d34e08eb631938e1826da489ef74ae304 Mon Sep 17 00:00:00 2001 From: ca333 Date: Fri, 31 May 2019 03:12:33 +0200 Subject: [PATCH 11/65] fix OSX this fixes the faulty OSX patch --- depends/hosts/darwin.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index d01e8b5a3..7be744aeb 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -1,9 +1,9 @@ -OSX_MIN_VERSION=10.8 -OSX_SDK_VERSION=10.11 +OSX_MIN_VERSION=10.12 +OSX_SDK_VERSION=10.12 OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk LD64_VERSION=253.9 -darwin_CC=gcc-6 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -darwin_CXX=g++-6 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) +darwin_CC=gcc-8 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) +darwin_CXX=g++-8 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) darwin_CFLAGS=-pipe darwin_CXXFLAGS=$(darwin_CFLAGS) From 2d5a95ca8886e4650e33dea861347aa57a46ce45 Mon Sep 17 00:00:00 2001 From: ca333 Date: Fri, 31 May 2019 03:12:58 +0200 Subject: [PATCH 12/65] fix OSX --- zcutil/build-mac.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zcutil/build-mac.sh b/zcutil/build-mac.sh index 5f1817e9e..89847ddac 100755 --- a/zcutil/build-mac.sh +++ b/zcutil/build-mac.sh @@ -1,6 +1,6 @@ #!/bin/bash -export CC=gcc-6 -export CXX=g++-6 +export CC=gcc-8 +export CXX=g++-8 export LIBTOOL=libtool export AR=ar export RANLIB=ranlib @@ -52,7 +52,7 @@ cd $WD ./autogen.sh CPPFLAGS="-I$PREFIX/include -arch x86_64" LDFLAGS="-L$PREFIX/lib -arch x86_64 -Wl,-no_pie" \ -CXXFLAGS='-arch x86_64 -I/usr/local/Cellar/gcc\@6/6.4.0_2/include/c++/6.4.0/ -I$PREFIX/include -fwrapv -fno-strict-aliasing -Wno-builtin-declaration-mismatch -Werror -g -Wl,-undefined -Wl,dynamic_lookup' \ +CXXFLAGS='-arch x86_64 -I/usr/local/Cellar/gcc\@8/8.3.0/include/c++/8.3.0/ -I$PREFIX/include -fwrapv -fno-strict-aliasing -Wno-builtin-declaration-mismatch -Werror -g -Wl,-undefined -Wl,dynamic_lookup' \ ./configure --prefix="${PREFIX}" --with-gui=no "$HARDENING_ARG" "$LCOV_ARG" make "$@" V=1 NO_GTEST=1 STATIC=1 From df7f46285ae0525bbfbb00da481033cd8b836756 Mon Sep 17 00:00:00 2001 From: ca333 Date: Fri, 31 May 2019 03:14:38 +0200 Subject: [PATCH 13/65] fix OSX --- toolchain-info.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain-info.sh b/toolchain-info.sh index 0bb39c19b..6a0fc7e75 100755 --- a/toolchain-info.sh +++ b/toolchain-info.sh @@ -1,6 +1,6 @@ #!/bin/bash -tools=("gcc-6" "g++-6" "otool" "nm") +tools=("gcc-8" "g++-8" "otool" "nm") echo "Platform: `uname -a`" echo "-------------------------------------" From 01fb676782b5a0c26ca165c49ce5b2690d73f670 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Fri, 31 May 2019 10:53:02 +0200 Subject: [PATCH 14/65] Allow duplicate receivers in z_sendmany --- src/wallet/rpcwallet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index e9a9e38c6..ffec43355 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4353,8 +4353,9 @@ UniValue z_sendmany(const UniValue& params, bool fHelp) //else if ( ASSETCHAINS_PRIVATE != 0 && komodo_isnotaryvout((char *)address.c_str()) == 0 ) // throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "cant use transparent addresses in private chain"); - if (setAddress.count(address)) - throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+address); + // Allowing duplicate receivers helps various HushList protocol operations + //if (setAddress.count(address)) + // throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+address); setAddress.insert(address); UniValue memoValue = find_value(o, "memo"); From f5d4ff421e035592a21cff2f42811652bb2cfe64 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Mon, 3 Jun 2019 02:04:54 +0300 Subject: [PATCH 15/65] Notaries 2019 --- src/komodo_defs.h | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/src/komodo_defs.h b/src/komodo_defs.h index cf15f0b19..656c20c53 100644 --- a/src/komodo_defs.h +++ b/src/komodo_defs.h @@ -178,6 +178,72 @@ static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"webworker01_NA", "03bb7d005e052779b1586f071834c5facbb83470094cff5112f0072b64989f97d7" }, {"xrobesx_NA", "03f0cc6d142d14a40937f12dbd99dbd9021328f45759e26f1877f2a838876709e1" }, }, + { + {"madmax_NA", "02016371f90f195ed9aeaf37be06f3fbbfbfe2ef8a4fd66378378289476e7751db", "03489b67faabdf450c9661ca386ba8a65eca859f39b3ec4c7a6be40c9c7bf153b7" }, + {"alright_AR", "020566fe2fb3874258b2d3cf1809a5d650e0edc7ba746fa5eec72750c5188c9cc9", "036a6bca1c2a8166f79fa8a979662892742346cc972b432f8e61950a358d705517" }, + {"strob_NA", "0206f7a2e972d9dfef1c424c731503a0a27de1ba7a15a91a362dc7ec0d0fb47685", "02049202f3872877e81035549f6f3a0f868d0ad1c9b0e0d2b48b1f30324255d26d" }, + {"dwy_EU", "020a77f454a1d3fcdc0312048fc58d713fe6153189e0c59cdd12fedbf09553d4b0", "021a7e11182f3603720436daea4e9a2ad5a9990943f0c96d6bcb5d7823040317fa" }, + {"phm87_SH", "021773a38db1bc3ede7f28142f901a161c7b7737875edbb40082a201c55dcf0add", "03889a10f9df2caef57220628515693cf25316fe1b0693b0241419e75d0d0e66ed" }, + {"chainmakers_NA", "021ad488cc063e17d0f1a2aade6be65ef8b5ff879987cb0b86bb700733099fe524", "0369aa258f317f028afd3acbe74658c4b483b7e0069107c5885ac49128dd18a13d" }, + {"indenodes_EU", "0221387ff95c44cb52b86552e3ec118a3c311ca65b75bf807c6c07eaeb1be8303c", "03a416533cace0814455a1bb1cd7861ce825a543c6f6284a432c4c8d8875b7ace9" }, + {"blackjok3r_SH", "0226293d7644e1380555ecc2d385ba038a66f4202b24b643ab31bcad0dc1474de2", "03c90bee400010904acb42464807feb0039ab42cc86d5401222299280b876b52e3" }, + {"chainmakers_EU", "022a6b583e8820d14d911a11820fd80853c5b8406e91a0a6fcac1f133d098d75cb", "034a6ae969bbd13258f9b7d3bbbdb81c93f2914d3fdb01ce31ad1d2a9078ef5fcd" }, + {"titomane_AR", "023e3aa9834c46971ff3e7cb86a200ec9c8074a9566a3ea85d400d5739662ee989", "0358cd6d7460654a0ddd5125dd6fa0402d0719999444c6cc3888689a0b4446136a" }, + {"fullmoon_SH", "02639998420688ee935d279d1cd52f1c6f3ae12c1f3afc20b3bf7ece1057f8b93b", "0370f07837cfefe1542f030b80e8fffa57218f4b7fff2dd181b0e21700c5480a7b" }, // 10 + {"indenodes_NA", "02698c6f1c9e43b66e82dbb163e8df0e5a2f62f3a7a882ca387d82f86e0b3fa988", "02b3908eda4078f0e9b6704451cdc24d418e899c0f515fab338d7494da6f0a647b" }, + {"chmex_EU", "0281304ebbcc39e4f09fda85f4232dd8dacd668e20e5fc11fba6b985186c90086e", "03e5b7ab96b7271ecd585d6f22807fa87da374210a843ec3a90134cbf4a62c3db1" }, + {"metaphilibert_SH", "0284af1a5ef01503e6316a2ca4abf8423a794e9fc17ac6846f042b6f4adedc3309", "03b21ff042bf1730b28bde43f44c064578b41996117ac7634b567c3773089e3be3" }, + {"ca333_DEV", "02856843af2d9457b5b1c907068bef6077ea0904cc8bd4df1ced013f64bf267958", "029c0342ce2a4f9146c7d1ee012b26f5c2df78b507fb4461bf48df71b4e3031b56" }, + {"cipi_NA", "02858904a2a1a0b44df4c937b65ee1f5b66186ab87a751858cf270dee1d5031f18", "034406ac4cf94e84561c5d3f25384dd59145e92fefc5972a037dc6a44bfa286688" }, + {"pungocloud_SH", "02863628f842a8aa424daf745cf43a1717cfcd571338ba87bfcec4d340703d01d6", "03f42c8052decf9a9d2eba60b1c8cd8b2b8e858d6b1ef0e5f09ba8a9ac1b1ced62" }, + {"voskcoin_EU", "028cfb0bbce2207425bc8d40fff634269bb61aade2d1d03883398275550b465600", "037135718fa54e59bcb71f9f9e9c4ab43daa86be50dbaadce10bc176a4f611d546" }, + {"decker_DEV", "028eea44a09674dda00d88ffd199a09c9b75ba9782382cc8f1e97c0fd565fe5707", "02fca8ee50e49f480de275745618db7b0b3680b0bdcce7dcae7d2e0fd5c3345744" }, + {"cryptoeconomy_EU", "0290ab4937e85246e048552df3e9a66cba2c1602db76e03763e16c671e750145d1", "037d04b7d16de61a44a3fc766bea4b7791023a36675d6cee862fe53defd04dd8f2" }, + {"etszombi_EU", "0293ea48d8841af7a419a24d9da11c34b39127ef041f847651bae6ab14dcd1f6b4", "02f65da26061d1b9f1756a274918a37e83086dbfe9a43d2f0b35b9d2f593b31907" }, // 20 + {"karasugoi_NA", "02a348b03b9c1a8eac1b56f85c402b041c9bce918833f2ea16d13452309052a982", "024ba10f7f5325fd6ec6cab50c5242d142d00fab3537c0002097c0e98f72014177" }, + {"pirate_AR", "02a5e865af771eee0c6bd3bd238f01f5eb589907ba52efa9f37e5102375c8eb7a0", "0228431427395f0cefdb0d10402d0d726119508945eb66ca9c0bba5d64df79832c" }, + {"metaphilibert_AR", "02adad675fae12b25fdd0f57250b0caf7f795c43f346153a31fe3e72e7db1d6ac6", "0239e34ad22957bbf4c8df824401f237b2afe8d40f7a645ecd43e8f27dde1ab0da" }, + {"zatjum_SH", "02b315714f99fdd70bafd50a4c3aa4b9db0fd8d63978bd8d47763773400b28734c", "031675aae243d2e4f3e8b67dbc4a68f50f487a37df959d739b26a80ce917b10d84" }, + {"madmax_AR", "02b37913ac0250d17cca5bb94ef65928b1515f13f839075446db73b9b067c13aa0", "032f5fc01607c2e82417cfe822b981116262961c0a66f715fbb7e84614aadfe5df" }, + {"lukechilds_NA", "02c191a085bbb0bd86d126c62d3e801c503038b69c0c2de121c9a7abe3e6684420", "03dbda3ea207b1aca24803fa53f990402b0bea9ec6bdc4486d9878add7623faf35" }, + {"cipi_AR", "02c4f89a5b382750836cb787880d30e23502265054e1c327a5bfce67116d757ce8", "025b7655826f5fd3a807cbb4918ef9f02fe64661153ca170db981e9b0861f8c5ad" }, + {"tonyl_AR", "02cc8bc862f2b65ad4f99d5f68d3011c138bf517acdc8d4261166b0be8f64189e1", "03a8db38075c80348889871b4318b0a79a1fd7e9e21daefb4ca6e4f05e5963569c" }, + {"infotech_DEV", "02d7d63ac441dbcd5535bcad741701519c190e89e17e4180aa0f61fdda0b6195ea", "032a8265e3c5029d17bbb5a46da81aedd81dad74c152a21568ef082d3d497dcada" }, + {"fullmoon_NA", "02da228a67e519b21bca6426ed982509a21d24d45f1ac1bdf698b6083fed442ec3", "0291038301dea2ec683a3f686579dcebe37b2113cc6137ef0bfe87b505bcd16016" }, // 30 + {"etszombi_AR", "02e55e104aa94f70cde68165d7df3e162d4410c76afd4643b161dea044aa6d06ce", "03c786702b81e0122157739c8e2377cf945998d36c0d187ec5c5ff95855848dfdd" }, + {"node-9_EU", "02e90f0528f8fd7d2b7f28d53ed7368cc4b1dfc5814c70c486c533862ee05e37dc", "03a48773670b53e7d139182e1be70b8b3deeb38298af1950f7f9e9061a78156032" }, + {"phba2061_EU", "02eaa599f5434039adc5748b3b830f605342e11b51273046b04f24acc5bcecc74a", "03f1bc7f22f3895069ba11442f8868211dd5953105dd6a65862775c8f033535f32" }, + {"indenodes_AR", "02ec0fa5a40f47fd4a38ea5c89e375ad0b6ddf4807c99733c9c3dc15fb978ee147", "0242778789986d614f75bcf629081651b851a12ab1cc10c73995b27b90febb75a2" }, + {"and1-89_EU", "02f2af778c62888cfb106c0ef5c89cefe012ef3e6abed3ef28425092637d7ae3cc", "02bca5e635c2d1c3506510c3c662e317636e41495688fa8f37cff42737fe048565" }, + {"komodopioneers_SH", "02ffde73d51b56bf9e23b6f03008ac7916cacd3be090f44eab59877792e08b6751", "02805ef7a915c90d0719d83f1287b9509c481be735d019df212b71002a21bb860f" }, + {"komodopioneers_EU", "03014f3fceb9f851f9dba5f5b371c7758b3f1fe44a70b4e60e3d6c70d1e5265358", "0222a74c839d67346250b953a790abcb3d92cb5187f1c25f02d193f8d10d04ed64" }, + {"d0ct0r_NA", "0303725d8525b6f969122faf04152653eb4bf34e10de92182263321769c334bf58", "0235b211469d7c1881d30ab647e0d6ddb4daf9466f60e85e6a33a92e39dedde3a7" }, + {"kolo_DEV", "030f34af4b908fb8eb2099accb56b8d157d49f6cfb691baa80fdd34f385efed961", "0292cec4c966787ebd436bc2af6fc375a8292b6d368385ce717f27fac64c1a9ed4" }, + {"peer2cloud_AR", "030fe3c77db0f91d79c26f951b674bba557b899f16570cd75332829a07031b0097", "03e63fbeff5db594b6903128b38630abc1b89bb1995ef76d0f5f5b7f88f473df78" }, // 40 + {"webworker01_SH", "031e50ba6de3c16f99d414bb89866e578d963a54bde7916c810608966fb5700776", "0221365d89a6f6373b15daa4a50d56d34ad1b4b8a48a7fd090163b6b5a5ecd7a0a" }, + {"webworker01_NA", "032735e9cad1bb00eaababfa6d27864fa4c1db0300c85e01e52176be2ca6a243ce", "03bfc36a60194b495c075b89995f307bec68c1bcbe381b6b29db47af23494430f9" }, + {"pbca26_NA", "0331c51abb78a9891d1b9483747a7fd9bbbbdd5256f40af23c87384e3d9a974289", "0371bf57314b24a0e4dfc31e8df83fb76231173912d962172600a5c395d59312f3" }, + {"indenodes_SH", "0334e6e1ec8285c4b85bd6dae67e17d67d1f20e7328efad17ce6fd24ae97cdd65e", "031d1584cf0eb4a2d314465e49e2677226b1615c3718013b8d6b4854c15676a58c" }, + {"pirate_NA", "033c8cef71f704f357c9ac1aeaafde3acd7bbfd0a09494e5e129ee0999fb2bc368", "035f1d94fd43ce3bf334c493cab29ab0635f75704650aaadb1d476a2bb3d74f34f" }, + {"lukechilds_AR", "035004d780316008c8afd5ac28d08aae56f4746bf70eb2c999e3c7d9a7a50ca8b6", "02b1a3fb6e47f566f96efc4dcd450abe370692806dff9090c24733c46728e9a342" }, + {"dragonhound_NA", "0354c779b9b111fdc825ee0250b33a79a837e0775a111a89916853d02a8999285c", "03c0d07f0b9932d5db003fe047e328f2bfd61fc24e19db79ef9471efd10ea4c102" }, + {"fullmoon_AR", "035673e913d603137f7f517d88bf316e51d408e0ec2b2cdcbfbdd5c0b553fc9351", "022e316df71f51f2bda83318aaeaebe7a12514429e85ba4f5402b1478c6d7873a4" }, + {"chainzilla_SH", "0360804b8817fd25ded6e9c0b50e3b0782ac666545b5416644198e18bc3903d9f9", "03fe36ff13cb224217898682ce8b87ba6e3cdd4a98941bb7060c04508b57a6b014" }, + {"titomane_EU", "03772ac0aad6b0e9feec5e591bff5de6775d6132e888633e73d3ba896bdd8e0afb", "03d691cd0914a711f651082e2b7b27bee778c1309a38840e40a6cf650682d17bb5" }, // 50 + {"jeezy_EU", "037f182facbad35684a6e960699f5da4ba89e99f0d0d62a87e8400dd086c8e5dd7", "022bca828b572cb2b3daff713ed2eb0bbc7378df20f799191eebecf3ef319509cd" }, + {"titomane_SH", "03850fdddf2413b51790daf51dd30823addb37313c8854b508ea6228205047ef9b", "038c2a64f7647633c0e74eec93f9a668d4bf80214a43ed7cd08e4e30d3f2f7acfb" }, + {"alien_AR", "03911a60395801082194b6834244fa78a3c30ff3e888667498e157b4aa80b0a65f", "024f20c096b085308e21893383f44b4faf1cdedea9ad53cc7d7e7fbfa0c30c1e71" }, + {"pirate_EU", "03986339bebe3891e369a528356a220bc17a5bef3d337edfcf0114e66e6b1c120f", "0377d4ed0264ad80fea05b3cd68cb1700404c0c08981830ba8ffae56b944e2ee77" }, + {"thegaltmines_NA", "03b113c7aa1042c965154bf791713f562891ac75e60ab78886205535bcaabb5013", "022138be032da85227fde7d1d5cc665ea21ba3f149601e8c23db269750991bc0c3" }, + {"computergenie_NA", "03b41c764c8cd63b48b79f15f112a9b5105a0dce35df7d6990d6919503a1f3f245", "02e01fe2bc6fd6eeeda6e84fdd67647b94058ee4ffd090d3ac67fd546f8bced39a" }, + {"nutellalicka_SH", "03b422ec85a8465ae42e7004bc6d0856a458f0f920ec0f58fd4d5613994f3faa5b", "03c8220bb835791b875f4060ff2d40c2dcc9346cc3390c04f5e202d207a1980b59" }, + {"chainstrike_SH", "03b806be3bf7a1f2f6290ec5c1ea7d3ea57774dcfcf2129a82b2569e585100e1cb", "0221f9dee04b7da1f3833c6ea7f7325652c951b1c239052b0dadb57209084ca6a8" }, + {"dwy_SH", "03b9162f9713d7cddd89aaad0398b67f66377cc17547ec0643a67c2d6fb099ecf0", "02f221458f84a3cf918cae6ec7fe553eff20bbed9fc4289e75af69b69478ccf0a4" }, // 60 + {"alien_EU", "03bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cd", "022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236" }, + {"gt_AR", "03e22a6aad65c9a4c2ce2e724b26edf631b5f41253449dd5feaeba68e7c0cf3058", "038b4f509468bfe51937bdce3f4529702d806b0e8fd4f7c487235d06d9c1b411ef" }, + {"patchkez_SH", "03f45e9beb5c4cd46525db8195eb05c1db84ae7ef3603566b3d775770eba3b96ee", "03d7c187689bf829ca076a30bbf36d2e67bb74e16a3290d8a55df21d6cb15c80c1" }, + {"decker_AR", "03ffdf1a116300a78729608d9930742cd349f11a9d64fcc336b8f18592dd9c91bc", "02a85540db8d41c7e60bf0d33d1364b4151cad883dd032878ea4c037f67b769635" }, + }, { {"webworker01_NA", "03bb7d005e052779b1586f071834c5facbb83470094cff5112f0072b64989f97d7" } } From c62ddda360ab44527702d7029212e574fe0ffea4 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Mon, 3 Jun 2019 17:36:28 +0300 Subject: [PATCH 16/65] Notaries 2019 --- src/komodo_defs.h | 131 ++++++++++++++++++++++------------------------ 1 file changed, 64 insertions(+), 67 deletions(-) diff --git a/src/komodo_defs.h b/src/komodo_defs.h index 656c20c53..b3e4d7ad2 100644 --- a/src/komodo_defs.h +++ b/src/komodo_defs.h @@ -179,73 +179,70 @@ static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"xrobesx_NA", "03f0cc6d142d14a40937f12dbd99dbd9021328f45759e26f1877f2a838876709e1" }, }, { - {"madmax_NA", "02016371f90f195ed9aeaf37be06f3fbbfbfe2ef8a4fd66378378289476e7751db", "03489b67faabdf450c9661ca386ba8a65eca859f39b3ec4c7a6be40c9c7bf153b7" }, - {"alright_AR", "020566fe2fb3874258b2d3cf1809a5d650e0edc7ba746fa5eec72750c5188c9cc9", "036a6bca1c2a8166f79fa8a979662892742346cc972b432f8e61950a358d705517" }, - {"strob_NA", "0206f7a2e972d9dfef1c424c731503a0a27de1ba7a15a91a362dc7ec0d0fb47685", "02049202f3872877e81035549f6f3a0f868d0ad1c9b0e0d2b48b1f30324255d26d" }, - {"dwy_EU", "020a77f454a1d3fcdc0312048fc58d713fe6153189e0c59cdd12fedbf09553d4b0", "021a7e11182f3603720436daea4e9a2ad5a9990943f0c96d6bcb5d7823040317fa" }, - {"phm87_SH", "021773a38db1bc3ede7f28142f901a161c7b7737875edbb40082a201c55dcf0add", "03889a10f9df2caef57220628515693cf25316fe1b0693b0241419e75d0d0e66ed" }, - {"chainmakers_NA", "021ad488cc063e17d0f1a2aade6be65ef8b5ff879987cb0b86bb700733099fe524", "0369aa258f317f028afd3acbe74658c4b483b7e0069107c5885ac49128dd18a13d" }, - {"indenodes_EU", "0221387ff95c44cb52b86552e3ec118a3c311ca65b75bf807c6c07eaeb1be8303c", "03a416533cace0814455a1bb1cd7861ce825a543c6f6284a432c4c8d8875b7ace9" }, - {"blackjok3r_SH", "0226293d7644e1380555ecc2d385ba038a66f4202b24b643ab31bcad0dc1474de2", "03c90bee400010904acb42464807feb0039ab42cc86d5401222299280b876b52e3" }, - {"chainmakers_EU", "022a6b583e8820d14d911a11820fd80853c5b8406e91a0a6fcac1f133d098d75cb", "034a6ae969bbd13258f9b7d3bbbdb81c93f2914d3fdb01ce31ad1d2a9078ef5fcd" }, - {"titomane_AR", "023e3aa9834c46971ff3e7cb86a200ec9c8074a9566a3ea85d400d5739662ee989", "0358cd6d7460654a0ddd5125dd6fa0402d0719999444c6cc3888689a0b4446136a" }, - {"fullmoon_SH", "02639998420688ee935d279d1cd52f1c6f3ae12c1f3afc20b3bf7ece1057f8b93b", "0370f07837cfefe1542f030b80e8fffa57218f4b7fff2dd181b0e21700c5480a7b" }, // 10 - {"indenodes_NA", "02698c6f1c9e43b66e82dbb163e8df0e5a2f62f3a7a882ca387d82f86e0b3fa988", "02b3908eda4078f0e9b6704451cdc24d418e899c0f515fab338d7494da6f0a647b" }, - {"chmex_EU", "0281304ebbcc39e4f09fda85f4232dd8dacd668e20e5fc11fba6b985186c90086e", "03e5b7ab96b7271ecd585d6f22807fa87da374210a843ec3a90134cbf4a62c3db1" }, - {"metaphilibert_SH", "0284af1a5ef01503e6316a2ca4abf8423a794e9fc17ac6846f042b6f4adedc3309", "03b21ff042bf1730b28bde43f44c064578b41996117ac7634b567c3773089e3be3" }, - {"ca333_DEV", "02856843af2d9457b5b1c907068bef6077ea0904cc8bd4df1ced013f64bf267958", "029c0342ce2a4f9146c7d1ee012b26f5c2df78b507fb4461bf48df71b4e3031b56" }, - {"cipi_NA", "02858904a2a1a0b44df4c937b65ee1f5b66186ab87a751858cf270dee1d5031f18", "034406ac4cf94e84561c5d3f25384dd59145e92fefc5972a037dc6a44bfa286688" }, - {"pungocloud_SH", "02863628f842a8aa424daf745cf43a1717cfcd571338ba87bfcec4d340703d01d6", "03f42c8052decf9a9d2eba60b1c8cd8b2b8e858d6b1ef0e5f09ba8a9ac1b1ced62" }, - {"voskcoin_EU", "028cfb0bbce2207425bc8d40fff634269bb61aade2d1d03883398275550b465600", "037135718fa54e59bcb71f9f9e9c4ab43daa86be50dbaadce10bc176a4f611d546" }, - {"decker_DEV", "028eea44a09674dda00d88ffd199a09c9b75ba9782382cc8f1e97c0fd565fe5707", "02fca8ee50e49f480de275745618db7b0b3680b0bdcce7dcae7d2e0fd5c3345744" }, - {"cryptoeconomy_EU", "0290ab4937e85246e048552df3e9a66cba2c1602db76e03763e16c671e750145d1", "037d04b7d16de61a44a3fc766bea4b7791023a36675d6cee862fe53defd04dd8f2" }, - {"etszombi_EU", "0293ea48d8841af7a419a24d9da11c34b39127ef041f847651bae6ab14dcd1f6b4", "02f65da26061d1b9f1756a274918a37e83086dbfe9a43d2f0b35b9d2f593b31907" }, // 20 - {"karasugoi_NA", "02a348b03b9c1a8eac1b56f85c402b041c9bce918833f2ea16d13452309052a982", "024ba10f7f5325fd6ec6cab50c5242d142d00fab3537c0002097c0e98f72014177" }, - {"pirate_AR", "02a5e865af771eee0c6bd3bd238f01f5eb589907ba52efa9f37e5102375c8eb7a0", "0228431427395f0cefdb0d10402d0d726119508945eb66ca9c0bba5d64df79832c" }, - {"metaphilibert_AR", "02adad675fae12b25fdd0f57250b0caf7f795c43f346153a31fe3e72e7db1d6ac6", "0239e34ad22957bbf4c8df824401f237b2afe8d40f7a645ecd43e8f27dde1ab0da" }, - {"zatjum_SH", "02b315714f99fdd70bafd50a4c3aa4b9db0fd8d63978bd8d47763773400b28734c", "031675aae243d2e4f3e8b67dbc4a68f50f487a37df959d739b26a80ce917b10d84" }, - {"madmax_AR", "02b37913ac0250d17cca5bb94ef65928b1515f13f839075446db73b9b067c13aa0", "032f5fc01607c2e82417cfe822b981116262961c0a66f715fbb7e84614aadfe5df" }, - {"lukechilds_NA", "02c191a085bbb0bd86d126c62d3e801c503038b69c0c2de121c9a7abe3e6684420", "03dbda3ea207b1aca24803fa53f990402b0bea9ec6bdc4486d9878add7623faf35" }, - {"cipi_AR", "02c4f89a5b382750836cb787880d30e23502265054e1c327a5bfce67116d757ce8", "025b7655826f5fd3a807cbb4918ef9f02fe64661153ca170db981e9b0861f8c5ad" }, - {"tonyl_AR", "02cc8bc862f2b65ad4f99d5f68d3011c138bf517acdc8d4261166b0be8f64189e1", "03a8db38075c80348889871b4318b0a79a1fd7e9e21daefb4ca6e4f05e5963569c" }, - {"infotech_DEV", "02d7d63ac441dbcd5535bcad741701519c190e89e17e4180aa0f61fdda0b6195ea", "032a8265e3c5029d17bbb5a46da81aedd81dad74c152a21568ef082d3d497dcada" }, - {"fullmoon_NA", "02da228a67e519b21bca6426ed982509a21d24d45f1ac1bdf698b6083fed442ec3", "0291038301dea2ec683a3f686579dcebe37b2113cc6137ef0bfe87b505bcd16016" }, // 30 - {"etszombi_AR", "02e55e104aa94f70cde68165d7df3e162d4410c76afd4643b161dea044aa6d06ce", "03c786702b81e0122157739c8e2377cf945998d36c0d187ec5c5ff95855848dfdd" }, - {"node-9_EU", "02e90f0528f8fd7d2b7f28d53ed7368cc4b1dfc5814c70c486c533862ee05e37dc", "03a48773670b53e7d139182e1be70b8b3deeb38298af1950f7f9e9061a78156032" }, - {"phba2061_EU", "02eaa599f5434039adc5748b3b830f605342e11b51273046b04f24acc5bcecc74a", "03f1bc7f22f3895069ba11442f8868211dd5953105dd6a65862775c8f033535f32" }, - {"indenodes_AR", "02ec0fa5a40f47fd4a38ea5c89e375ad0b6ddf4807c99733c9c3dc15fb978ee147", "0242778789986d614f75bcf629081651b851a12ab1cc10c73995b27b90febb75a2" }, - {"and1-89_EU", "02f2af778c62888cfb106c0ef5c89cefe012ef3e6abed3ef28425092637d7ae3cc", "02bca5e635c2d1c3506510c3c662e317636e41495688fa8f37cff42737fe048565" }, - {"komodopioneers_SH", "02ffde73d51b56bf9e23b6f03008ac7916cacd3be090f44eab59877792e08b6751", "02805ef7a915c90d0719d83f1287b9509c481be735d019df212b71002a21bb860f" }, - {"komodopioneers_EU", "03014f3fceb9f851f9dba5f5b371c7758b3f1fe44a70b4e60e3d6c70d1e5265358", "0222a74c839d67346250b953a790abcb3d92cb5187f1c25f02d193f8d10d04ed64" }, - {"d0ct0r_NA", "0303725d8525b6f969122faf04152653eb4bf34e10de92182263321769c334bf58", "0235b211469d7c1881d30ab647e0d6ddb4daf9466f60e85e6a33a92e39dedde3a7" }, - {"kolo_DEV", "030f34af4b908fb8eb2099accb56b8d157d49f6cfb691baa80fdd34f385efed961", "0292cec4c966787ebd436bc2af6fc375a8292b6d368385ce717f27fac64c1a9ed4" }, - {"peer2cloud_AR", "030fe3c77db0f91d79c26f951b674bba557b899f16570cd75332829a07031b0097", "03e63fbeff5db594b6903128b38630abc1b89bb1995ef76d0f5f5b7f88f473df78" }, // 40 - {"webworker01_SH", "031e50ba6de3c16f99d414bb89866e578d963a54bde7916c810608966fb5700776", "0221365d89a6f6373b15daa4a50d56d34ad1b4b8a48a7fd090163b6b5a5ecd7a0a" }, - {"webworker01_NA", "032735e9cad1bb00eaababfa6d27864fa4c1db0300c85e01e52176be2ca6a243ce", "03bfc36a60194b495c075b89995f307bec68c1bcbe381b6b29db47af23494430f9" }, - {"pbca26_NA", "0331c51abb78a9891d1b9483747a7fd9bbbbdd5256f40af23c87384e3d9a974289", "0371bf57314b24a0e4dfc31e8df83fb76231173912d962172600a5c395d59312f3" }, - {"indenodes_SH", "0334e6e1ec8285c4b85bd6dae67e17d67d1f20e7328efad17ce6fd24ae97cdd65e", "031d1584cf0eb4a2d314465e49e2677226b1615c3718013b8d6b4854c15676a58c" }, - {"pirate_NA", "033c8cef71f704f357c9ac1aeaafde3acd7bbfd0a09494e5e129ee0999fb2bc368", "035f1d94fd43ce3bf334c493cab29ab0635f75704650aaadb1d476a2bb3d74f34f" }, - {"lukechilds_AR", "035004d780316008c8afd5ac28d08aae56f4746bf70eb2c999e3c7d9a7a50ca8b6", "02b1a3fb6e47f566f96efc4dcd450abe370692806dff9090c24733c46728e9a342" }, - {"dragonhound_NA", "0354c779b9b111fdc825ee0250b33a79a837e0775a111a89916853d02a8999285c", "03c0d07f0b9932d5db003fe047e328f2bfd61fc24e19db79ef9471efd10ea4c102" }, - {"fullmoon_AR", "035673e913d603137f7f517d88bf316e51d408e0ec2b2cdcbfbdd5c0b553fc9351", "022e316df71f51f2bda83318aaeaebe7a12514429e85ba4f5402b1478c6d7873a4" }, - {"chainzilla_SH", "0360804b8817fd25ded6e9c0b50e3b0782ac666545b5416644198e18bc3903d9f9", "03fe36ff13cb224217898682ce8b87ba6e3cdd4a98941bb7060c04508b57a6b014" }, - {"titomane_EU", "03772ac0aad6b0e9feec5e591bff5de6775d6132e888633e73d3ba896bdd8e0afb", "03d691cd0914a711f651082e2b7b27bee778c1309a38840e40a6cf650682d17bb5" }, // 50 - {"jeezy_EU", "037f182facbad35684a6e960699f5da4ba89e99f0d0d62a87e8400dd086c8e5dd7", "022bca828b572cb2b3daff713ed2eb0bbc7378df20f799191eebecf3ef319509cd" }, - {"titomane_SH", "03850fdddf2413b51790daf51dd30823addb37313c8854b508ea6228205047ef9b", "038c2a64f7647633c0e74eec93f9a668d4bf80214a43ed7cd08e4e30d3f2f7acfb" }, - {"alien_AR", "03911a60395801082194b6834244fa78a3c30ff3e888667498e157b4aa80b0a65f", "024f20c096b085308e21893383f44b4faf1cdedea9ad53cc7d7e7fbfa0c30c1e71" }, - {"pirate_EU", "03986339bebe3891e369a528356a220bc17a5bef3d337edfcf0114e66e6b1c120f", "0377d4ed0264ad80fea05b3cd68cb1700404c0c08981830ba8ffae56b944e2ee77" }, - {"thegaltmines_NA", "03b113c7aa1042c965154bf791713f562891ac75e60ab78886205535bcaabb5013", "022138be032da85227fde7d1d5cc665ea21ba3f149601e8c23db269750991bc0c3" }, - {"computergenie_NA", "03b41c764c8cd63b48b79f15f112a9b5105a0dce35df7d6990d6919503a1f3f245", "02e01fe2bc6fd6eeeda6e84fdd67647b94058ee4ffd090d3ac67fd546f8bced39a" }, - {"nutellalicka_SH", "03b422ec85a8465ae42e7004bc6d0856a458f0f920ec0f58fd4d5613994f3faa5b", "03c8220bb835791b875f4060ff2d40c2dcc9346cc3390c04f5e202d207a1980b59" }, - {"chainstrike_SH", "03b806be3bf7a1f2f6290ec5c1ea7d3ea57774dcfcf2129a82b2569e585100e1cb", "0221f9dee04b7da1f3833c6ea7f7325652c951b1c239052b0dadb57209084ca6a8" }, - {"dwy_SH", "03b9162f9713d7cddd89aaad0398b67f66377cc17547ec0643a67c2d6fb099ecf0", "02f221458f84a3cf918cae6ec7fe553eff20bbed9fc4289e75af69b69478ccf0a4" }, // 60 - {"alien_EU", "03bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cd", "022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236" }, - {"gt_AR", "03e22a6aad65c9a4c2ce2e724b26edf631b5f41253449dd5feaeba68e7c0cf3058", "038b4f509468bfe51937bdce3f4529702d806b0e8fd4f7c487235d06d9c1b411ef" }, - {"patchkez_SH", "03f45e9beb5c4cd46525db8195eb05c1db84ae7ef3603566b3d775770eba3b96ee", "03d7c187689bf829ca076a30bbf36d2e67bb74e16a3290d8a55df21d6cb15c80c1" }, - {"decker_AR", "03ffdf1a116300a78729608d9930742cd349f11a9d64fcc336b8f18592dd9c91bc", "02a85540db8d41c7e60bf0d33d1364b4151cad883dd032878ea4c037f67b769635" }, - }, - { - {"webworker01_NA", "03bb7d005e052779b1586f071834c5facbb83470094cff5112f0072b64989f97d7" } + {"madmax_NA", "02016371f90f195ed9aeaf37be06f3fbbfbfe2ef8a4fd66378378289476e7751db" }, + {"alright_AR", "020566fe2fb3874258b2d3cf1809a5d650e0edc7ba746fa5eec72750c5188c9cc9" }, + {"strob_NA", "0206f7a2e972d9dfef1c424c731503a0a27de1ba7a15a91a362dc7ec0d0fb47685" }, + {"dwy_EU", "020a77f454a1d3fcdc0312048fc58d713fe6153189e0c59cdd12fedbf09553d4b0" }, + {"phm87_SH", "021773a38db1bc3ede7f28142f901a161c7b7737875edbb40082a201c55dcf0add" }, + {"chainmakers_NA", "021ad488cc063e17d0f1a2aade6be65ef8b5ff879987cb0b86bb700733099fe524" }, + {"indenodes_EU", "0221387ff95c44cb52b86552e3ec118a3c311ca65b75bf807c6c07eaeb1be8303c" }, + {"blackjok3r_SH", "0226293d7644e1380555ecc2d385ba038a66f4202b24b643ab31bcad0dc1474de2" }, + {"chainmakers_EU", "022a6b583e8820d14d911a11820fd80853c5b8406e91a0a6fcac1f133d098d75cb" }, + {"titomane_AR", "023e3aa9834c46971ff3e7cb86a200ec9c8074a9566a3ea85d400d5739662ee989" }, + {"fullmoon_SH", "02639998420688ee935d279d1cd52f1c6f3ae12c1f3afc20b3bf7ece1057f8b93b" }, // 10 + {"indenodes_NA", "02698c6f1c9e43b66e82dbb163e8df0e5a2f62f3a7a882ca387d82f86e0b3fa988" }, + {"chmex_EU", "0281304ebbcc39e4f09fda85f4232dd8dacd668e20e5fc11fba6b985186c90086e" }, + {"metaphilibert_SH", "0284af1a5ef01503e6316a2ca4abf8423a794e9fc17ac6846f042b6f4adedc3309" }, + {"ca333_DEV", "02856843af2d9457b5b1c907068bef6077ea0904cc8bd4df1ced013f64bf267958" }, + {"cipi_NA", "02858904a2a1a0b44df4c937b65ee1f5b66186ab87a751858cf270dee1d5031f18" }, + {"pungocloud_SH", "02863628f842a8aa424daf745cf43a1717cfcd571338ba87bfcec4d340703d01d6" }, + {"voskcoin_EU", "028cfb0bbce2207425bc8d40fff634269bb61aade2d1d03883398275550b465600" }, + {"decker_DEV", "028eea44a09674dda00d88ffd199a09c9b75ba9782382cc8f1e97c0fd565fe5707" }, + {"cryptoeconomy_EU", "0290ab4937e85246e048552df3e9a66cba2c1602db76e03763e16c671e750145d1" }, + {"etszombi_EU", "0293ea48d8841af7a419a24d9da11c34b39127ef041f847651bae6ab14dcd1f6b4" }, // 20 + {"karasugoi_NA", "02a348b03b9c1a8eac1b56f85c402b041c9bce918833f2ea16d13452309052a982" }, + {"pirate_AR", "02a5e865af771eee0c6bd3bd238f01f5eb589907ba52efa9f37e5102375c8eb7a0" }, + {"metaphilibert_AR", "02adad675fae12b25fdd0f57250b0caf7f795c43f346153a31fe3e72e7db1d6ac6" }, + {"zatjum_SH", "02b315714f99fdd70bafd50a4c3aa4b9db0fd8d63978bd8d47763773400b28734c" }, + {"madmax_AR", "02b37913ac0250d17cca5bb94ef65928b1515f13f839075446db73b9b067c13aa0" }, + {"lukechilds_NA", "02c191a085bbb0bd86d126c62d3e801c503038b69c0c2de121c9a7abe3e6684420" }, + {"cipi_AR", "02c4f89a5b382750836cb787880d30e23502265054e1c327a5bfce67116d757ce8" }, + {"tonyl_AR", "02cc8bc862f2b65ad4f99d5f68d3011c138bf517acdc8d4261166b0be8f64189e1" }, + {"infotech_DEV", "02d7d63ac441dbcd5535bcad741701519c190e89e17e4180aa0f61fdda0b6195ea" }, + {"fullmoon_NA", "02da228a67e519b21bca6426ed982509a21d24d45f1ac1bdf698b6083fed442ec3" }, // 30 + {"etszombi_AR", "02e55e104aa94f70cde68165d7df3e162d4410c76afd4643b161dea044aa6d06ce" }, + {"node-9_EU", "02e90f0528f8fd7d2b7f28d53ed7368cc4b1dfc5814c70c486c533862ee05e37dc" }, + {"phba2061_EU", "02eaa599f5434039adc5748b3b830f605342e11b51273046b04f24acc5bcecc74a" }, + {"indenodes_AR", "02ec0fa5a40f47fd4a38ea5c89e375ad0b6ddf4807c99733c9c3dc15fb978ee147" }, + {"and1-89_EU", "02f2af778c62888cfb106c0ef5c89cefe012ef3e6abed3ef28425092637d7ae3cc" }, + {"komodopioneers_SH", "02ffde73d51b56bf9e23b6f03008ac7916cacd3be090f44eab59877792e08b6751" }, + {"komodopioneers_EU", "03014f3fceb9f851f9dba5f5b371c7758b3f1fe44a70b4e60e3d6c70d1e5265358" }, + {"d0ct0r_NA", "0303725d8525b6f969122faf04152653eb4bf34e10de92182263321769c334bf58" }, + {"kolo_DEV", "030f34af4b908fb8eb2099accb56b8d157d49f6cfb691baa80fdd34f385efed961" }, + {"peer2cloud_AR", "030fe3c77db0f91d79c26f951b674bba557b899f16570cd75332829a07031b0097" }, // 40 + {"webworker01_SH", "031e50ba6de3c16f99d414bb89866e578d963a54bde7916c810608966fb5700776" }, + {"webworker01_NA", "032735e9cad1bb00eaababfa6d27864fa4c1db0300c85e01e52176be2ca6a243ce" }, + {"pbca26_NA", "0331c51abb78a9891d1b9483747a7fd9bbbbdd5256f40af23c87384e3d9a974289" }, + {"indenodes_SH", "0334e6e1ec8285c4b85bd6dae67e17d67d1f20e7328efad17ce6fd24ae97cdd65e" }, + {"pirate_NA", "033c8cef71f704f357c9ac1aeaafde3acd7bbfd0a09494e5e129ee0999fb2bc368" }, + {"lukechilds_AR", "035004d780316008c8afd5ac28d08aae56f4746bf70eb2c999e3c7d9a7a50ca8b6" }, + {"dragonhound_NA", "0354c779b9b111fdc825ee0250b33a79a837e0775a111a89916853d02a8999285c" }, + {"fullmoon_AR", "035673e913d603137f7f517d88bf316e51d408e0ec2b2cdcbfbdd5c0b553fc9351" }, + {"chainzilla_SH", "0360804b8817fd25ded6e9c0b50e3b0782ac666545b5416644198e18bc3903d9f9" }, + {"titomane_EU", "03772ac0aad6b0e9feec5e591bff5de6775d6132e888633e73d3ba896bdd8e0afb" }, // 50 + {"jeezy_EU", "037f182facbad35684a6e960699f5da4ba89e99f0d0d62a87e8400dd086c8e5dd7" }, + {"titomane_SH", "03850fdddf2413b51790daf51dd30823addb37313c8854b508ea6228205047ef9b" }, + {"alien_AR", "03911a60395801082194b6834244fa78a3c30ff3e888667498e157b4aa80b0a65f" }, + {"pirate_EU", "03986339bebe3891e369a528356a220bc17a5bef3d337edfcf0114e66e6b1c120f" }, + {"thegaltmines_NA", "03b113c7aa1042c965154bf791713f562891ac75e60ab78886205535bcaabb5013" }, + {"computergenie_NA", "03b41c764c8cd63b48b79f15f112a9b5105a0dce35df7d6990d6919503a1f3f245" }, + {"nutellalicka_SH", "03b422ec85a8465ae42e7004bc6d0856a458f0f920ec0f58fd4d5613994f3faa5b" }, + {"chainstrike_SH", "03b806be3bf7a1f2f6290ec5c1ea7d3ea57774dcfcf2129a82b2569e585100e1cb" }, + {"dwy_SH", "03b9162f9713d7cddd89aaad0398b67f66377cc17547ec0643a67c2d6fb099ecf0" }, // 60 + {"alien_EU", "03bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cd" }, + {"gt_AR", "03e22a6aad65c9a4c2ce2e724b26edf631b5f41253449dd5feaeba68e7c0cf3058" }, + {"patchkez_SH", "03f45e9beb5c4cd46525db8195eb05c1db84ae7ef3603566b3d775770eba3b96ee" }, + {"decker_AR", "03ffdf1a116300a78729608d9930742cd349f11a9d64fcc336b8f18592dd9c91bc" }, } }; From b29c95a26d1a6b9ec9caf551e5e3ab8d85ebf577 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Tue, 4 Jun 2019 11:53:38 +0800 Subject: [PATCH 17/65] fix PIRATE forced rescan. --- src/wallet/walletdb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index e81eba03d..bed635d3b 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -488,7 +488,8 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, auto verifier = libzcash::ProofVerifier::Strict(); // ac_public chains set at height like KMD and ZEX, will force a rescan if we dont ignore this error: bad-txns-acpublic-chain // there cannot be any ztx in the wallet on ac_public chains that started from block 1, so this wont affect those. - if ( !(CheckTransaction(0,wtx, state, verifier) && (wtx.GetHash() == hash) && state.IsValid()) && (state.GetRejectReason() != "bad-txns-acpublic-chain") ) + // PIRATE fails this check for notary nodes, need exception. Triggers full rescan without it. + if ( !(CheckTransaction(0,wtx, state, verifier) && (wtx.GetHash() == hash) && state.IsValid()) && (state.GetRejectReason() != "bad-txns-acpublic-chain" || state.GetRejectReason() != "bad-txns-acprivacy-chain") ) { //fprintf(stderr, "tx failed: %s rejectreason.%s\n", wtx.GetHash().GetHex().c_str(), state.GetRejectReason().c_str()); // vin-empty on staking chains is error relating to a failed staking tx, that for some unknown reason did not fully erase. save them here to erase and re-add later on. From 86926e33f0ec9f66b4e7811d78af28d22a51c7f9 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Tue, 4 Jun 2019 13:34:50 +0800 Subject: [PATCH 18/65] fix uint --- src/komodo_notary.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/komodo_notary.h b/src/komodo_notary.h index e2c7dfb4c..028bc4dc2 100644 --- a/src/komodo_notary.h +++ b/src/komodo_notary.h @@ -65,7 +65,6 @@ const char *Notaries_genesis[][2] = int32_t getkmdseason(int32_t height) { - int8_t season = 0; if ( height <= KMD_SEASON_HEIGHTS[0] ) return(1); for (int32_t i = 1; i < NUM_KMD_SEASONS; i++) @@ -76,9 +75,8 @@ int32_t getkmdseason(int32_t height) return(0); }; -int32_t getacseason(int32_t timestamp) +int32_t getacseason(uint32_t timestamp) { - int8_t season = 0; if ( timestamp <= KMD_SEASON_TIMESTAMPS[0] ) return(1); for (int32_t i = 1; i < NUM_KMD_SEASONS; i++) From 17dd062feebb409589c4ec2716281367ad7772b9 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Tue, 4 Jun 2019 14:10:15 +0800 Subject: [PATCH 19/65] woops --- src/wallet/walletdb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index bed635d3b..d2d90a85f 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -489,7 +489,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, // ac_public chains set at height like KMD and ZEX, will force a rescan if we dont ignore this error: bad-txns-acpublic-chain // there cannot be any ztx in the wallet on ac_public chains that started from block 1, so this wont affect those. // PIRATE fails this check for notary nodes, need exception. Triggers full rescan without it. - if ( !(CheckTransaction(0,wtx, state, verifier) && (wtx.GetHash() == hash) && state.IsValid()) && (state.GetRejectReason() != "bad-txns-acpublic-chain" || state.GetRejectReason() != "bad-txns-acprivacy-chain") ) + if ( !(CheckTransaction(0,wtx, state, verifier) && (wtx.GetHash() == hash) && state.IsValid()) && (state.GetRejectReason() != "bad-txns-acpublic-chain" && state.GetRejectReason() != "bad-txns-acprivacy-chain") ) { //fprintf(stderr, "tx failed: %s rejectreason.%s\n", wtx.GetHash().GetHex().c_str(), state.GetRejectReason().c_str()); // vin-empty on staking chains is error relating to a failed staking tx, that for some unknown reason did not fully erase. save them here to erase and re-add later on. From ee3aef50668054683f5f50040ecd463b6ec19e2d Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 3 Jun 2019 21:10:49 -1100 Subject: [PATCH 20/65] Define getacseason --- src/komodo_defs.h | 1 + src/komodo_utils.h | 1 - src/main.cpp | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/komodo_defs.h b/src/komodo_defs.h index b3e4d7ad2..c6d4dd30b 100644 --- a/src/komodo_defs.h +++ b/src/komodo_defs.h @@ -304,6 +304,7 @@ extern int32_t ASSETCHAINS_EARLYTXIDCONTRACT; int tx_height( const uint256 &hash ); extern std::vector vWhiteListAddress; void komodo_netevent(std::vector payload); +int32_t getacseason(uint32_t timestamp); #define IGUANA_MAXSCRIPTSIZE 10001 #define KOMODO_KVDURATION 1440 diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 11cbea808..48c29ea6f 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1665,7 +1665,6 @@ uint64_t komodo_ac_block_subsidy(int nHeight) extern int64_t MAX_MONEY; void komodo_cbopretupdate(int32_t forceflag); -int32_t getacseason(int32_t timestamp); void SplitStr(const std::string& strVal, std::vector &outVals); int8_t equihash_params_possible(uint64_t n, uint64_t k) diff --git a/src/main.cpp b/src/main.cpp index a8ae8b60c..9f837a016 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1373,8 +1373,6 @@ bool CheckTransaction(uint32_t tiptime,const CTransaction& tx, CValidationState } } -extern int32_t getacseason(int32_t timestamp); - int32_t komodo_isnotaryvout(char *coinaddr,uint32_t tiptime) // from ac_private chains only { int32_t season = getacseason(tiptime); From bc69675fc386b0977df26a57b8d73109cd99a198 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Tue, 4 Jun 2019 17:55:34 +0800 Subject: [PATCH 21/65] undo attempt at hs/s for staking chains --- src/rpc/mining.cpp | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 8e5de0f53..53a744497 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -59,22 +59,9 @@ arith_uint256 komodo_PoWtarget(int32_t *percPoSp,arith_uint256 target,int32_t he * Return average network hashes per second based on the last 'lookup' blocks, * or over the difficulty averaging window if 'lookup' is nonpositive. * If 'height' is nonnegative, compute the estimate at the time when a given block was found. -time =0, lastBlockTime=time_of_last_block, PoWblocks=0 -for x = 1 to 100 -get block info -if PoS then - lastBlockTime = ThisBlockTime - next x -else - PoWblocks += 1 - some var/array about diff - newTime = timeNow - lastBlockTime - totalTime = totalTime + newTime - lastBlockTime = newTime -next x -do math of num PoW blocks over PoW active Time with stored diff info */ -int64_t GetNetworkHashPS(int lookup, int height) { +int64_t GetNetworkHashPS(int lookup, int height) +{ CBlockIndex *pb = chainActive.LastTip(); if (height >= 0 && height < chainActive.Height()) @@ -93,36 +80,21 @@ int64_t GetNetworkHashPS(int lookup, int height) { CBlockIndex *pb0 = pb; int64_t minTime = pb0->GetBlockTime(); - int64_t timeoffset = 0, n=0,i=0; int64_t maxTime = minTime; - for (i = 0; i < lookup; i++) { + for (int i = 0; i < lookup; i++) { pb0 = pb0->pprev; - // if PoW block save block time, and skip the hash. - if ( pb0->segid >= 0 && pb0->segid != -2 ) - { - n++; - // only staking chains should ever set this. - - timeoffset += pb0->GetBlockTime() - pb0->pprev->GetBlockTime(); - //fprintf(stderr, "staking tx.%li segid.%i blocktime.%li\n", n, pb0->segid, (pb0->GetBlockTime() - pb0->pprev->GetBlockTime())); - if ( lookup > pb->GetHeight() ) - break; - lookup++; - continue; - } int64_t time = pb0->GetBlockTime(); minTime = std::min(time, minTime); maxTime = std::max(time, maxTime); } - //fprintf(stderr, "number blocks scanned.%li\n",i ); // In case there's a situation where minTime == maxTime, we don't want a divide by zero exception. if (minTime == maxTime) return 0; arith_uint256 workDiff = pb->chainPower.chainWork - pb0->chainPower.chainWork; - int64_t timeDiff = maxTime - minTime;// - timeoffset; - fprintf(stderr, "timediff.%li timeoffset.%li mintime.%li maxtime.%li\n", timeDiff, timeoffset, minTime, maxTime); + int64_t timeDiff = maxTime - minTime; + return (int64_t)(workDiff.getdouble() / timeDiff); } From 439e7cb5d74b7234f4cc63e65ad20fe18afb87a2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 7 Jun 2019 08:51:38 -1100 Subject: [PATCH 22/65] Fix getchaintips rpc crash. Thanks mike tout!! --- src/cc/dapps/zmigrate.c | 197 ++++++++++++++++++++++++++++++++++++++++ src/rpc/blockchain.cpp | 1 - 2 files changed, 197 insertions(+), 1 deletion(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index 33d776650..fe4fefcd5 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -938,7 +938,204 @@ int32_t have_pending_opid(char *coinstr,int32_t clearresults) return(pending); } +int64_t utxo_value(char *refcoin,char *srcaddr,bits256 txid,int32_t v) +{ + cJSON *txjson,*vouts,*vout,*sobj,*array; int32_t numvouts,numaddrs; int64_t val,value = 0; char *addr,str[65]; + srcaddr[0] = 0; + if ( (txjson= get_rawtransaction(refcoin,"",txid)) != 0 ) + { + if ( (vouts= jarray(&numvouts,txjson,"vout")) != 0 && v < numvouts ) + { + vout = jitem(vouts,v); + if ( (val= jdouble(vout,"value")*SATOSHIDEN) != 0 && (sobj= jobj(vout,"scriptPubKey")) != 0 ) + { + if ( (array= jarray(&numaddrs,sobj,"addresses")) != 0 && numaddrs == 1 && (addr= jstri(array,0)) != 0 && strlen(addr) < 64 ) + { + strcpy(srcaddr,addr); + value = val; + } else printf("couldnt get unique address for %s/%d\n",bits256_str(str,txid),v); + } else printf("error getting value for %s/v%d\n",bits256_str(str,txid),v); + } + } + return(value); +} + +struct addritem { int64_t total,numutxos; char addr[64]; } ADDRESSES[1200]; +struct claimitem { int64_t total,numutxos; char oldaddr[64],destaddr[64],username[64]; } CLAIMS[1200]; +int32_t NUM_ADDRESSES,NUM_CLAIMS; + +int32_t update_claimstats(char *username,char *oldaddr,char *destaddr,int64_t amount) +{ + +} + +int32_t update_addrstats(char *srcaddr,int64_t amount) +{ + int32_t i; struct addritem *item; + for (i=0; itotal = amount; + item->numutxos = 1; + strcpy(item->addr,srcaddr); + printf("%d new address %s\n",NUM_ADDRESSES,srcaddr); + return(-1); +} + +int64_t sum_of_vins(char *refcoin,int32_t *totalvinsp,int32_t *uniqaddrsp,bits256 txid) +{ + cJSON *txjson,*vins,*vin; char str[65],srcaddr[64]; int32_t i,numarray; int64_t amount,total = 0; + if ( (txjson= get_rawtransaction(refcoin,"",txid)) != 0 ) + { + if ( (vins= jarray(&numarray,txjson,"vin")) != 0) + { + for (i=0; i 0 ) + { + //printf("%d.(%s)\n",numlines,buf); + str = buf; + n = i = 0; + memset(fields,0,sizeof(fields)); + while ( *str != 0 ) + { + if ( *str == ',' || *str == '\n' || *str == '\r' ) + { + fields[n][i] = 0; + i = 0; + if ( n != 4 && n > 1 ) + { + printf("(%16s) ",fields[n]); + } + n++; + if ( *str == '\n' || *str == '\r' ) + break; + } + if ( *str == ',' || *str == ' ' ) + str++; + else fields[n][i++] = *str++; + } + printf("%s\n",fields[0]); + //for (i=0; i coin\n"); + return(-1); + } + if ( strcmp(argv[1],"KMD") == 0 ) + { + REFCOIN_CLI = "./komodo-cli"; + coinstr = clonestr("KMD"); + } + else + { + sprintf(buf,"./komodo-cli -ac_name=%s",argv[1]); + REFCOIN_CLI = clonestr(buf); + coinstr = clonestr(argv[1]); + } + if ( 1 ) + { + sprintf(buf,"%s-Claims.csv",coinstr); + reconcile_claims(buf); + } + else if ( (retjson= get_listunspent(coinstr,"")) != 0 ) + { + if ( (n= cJSON_GetArraySize(retjson)) > 0 ) + { + for (i=0; i= SATOSHIDEN ) + { + payout = ADDRESSES[i].total / SATOSHIDEN; + if ( payout > maxpayout ) + maxpayout = payout; + totalpayout += payout; + numpayouts++; + if ( payout >= 7 ) + { + numsmall++; + smallpayout += payout; + genpayout(coinstr,ADDRESSES[i].addr,payout); + } + //printf("%-4d: %-64s numutxos.%-4lld %llu\n",i,ADDRESSES[i].addr,ADDRESSES[i].numutxos,(long long)payout); + } + } + printf("num.%d total %.8f vs vintotal %.8f, totalvins.%d uniqaddrs.%d:%d totalpayout %llu maxpayout %llu numpayouts.%d numsmall.%d %llu\n",num,dstr(total),dstr(total2),totalvins,uniqaddrs,NUM_ADDRESSES,(long long)totalpayout,(long long)maxpayout,numpayouts,numsmall,(long long)smallpayout); + } +} + +int32_t oldmain(int32_t argc,char **argv) { char buf[1024],*zsaddr,*coinstr; if ( argc != 3 ) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index ddb5dab12..9c55c807b 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1853,7 +1853,6 @@ UniValue getchaintips(const UniValue& params, bool fHelp) /* Construct the output array. */ UniValue res(UniValue::VARR); const CBlockIndex *forked; - BOOST_FOREACH(const CBlockIndex* block, setTips) BOOST_FOREACH(const CBlockIndex* block, setTips) { UniValue obj(UniValue::VOBJ); From d206cc9c6c2db93f6f8fa1883f154bfd72889d14 Mon Sep 17 00:00:00 2001 From: ca333 Date: Sat, 8 Jun 2019 01:22:28 +0200 Subject: [PATCH 23/65] add security info --- SECURITY.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..6bcbe7706 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,30 @@ +## Reporting a Vulnerability + +Please use the below [contact data](https://komodoplatform.com/.well-known/security.txt.asc) to report vulnerabilities. We kindly ask you to not publish or exploit any found vulnerabilities. + +``` +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Contact: security@komodoplatform.com +Contact: ca333@komodoplatform.com +Contact: noashh@komodoplatform.com +Encryption: http://pgp.key-server.io:11371/0x379287998EE6CF47 +-----BEGIN PGP SIGNATURE----- + +iQJNBAEBCAA3FiEEVez5U2AlPa805zvqN5KHmY7mz0cFAlz6EuMZHGNhMzMzQGtv +bW9kb3BsYXRmb3JtLmNvbQAKCRA3koeZjubPR8cIEACP+JjyXDIzjgIewMMi/02b +tsYswPyQ+9bAoEJnis3r94d1FP1rqXmt4oNz6VwFTqQLEa5opW+gvvaxBTFJSPb0 +UzbS+1PjfAOox5cnT3Dnv9kcy4ECslnW/G+mH+85BUgz1HuqYc8A3kNQJL7KqLoi +YeD0Hd09KtlG+B4PWdnqLw/uvfbavSKdMn6WSIU6adNZWX0ewSubWPXvrWea5cI2 +yKDdMcDqB8Sc9J4JR2L9zW8NqPQuaxfLQbkCt2tg9QjlClrAqQgb8OZQJgY9f1T/ +kBlVXoA4ZUZeifvjSKxQ/3TdRFP+jbV9xsb6sr14zTx+Wcoqtgsh3l9F4+T3V2m8 +/c/iS4mFlK31pJtwYyrJAq9hpggqymdCVi0Pa3yLZsEj3orBPaPWbmq2v7xeF3J8 +y8vqAkt3M3T6251aZAKEcaN5RXYJW70CTseadwp0tmrAL2nIVmziNCMOF+Bufyxi +HddkasTcNX8VYfPCLWqBwrocx8d3n3E7dBGeS2x2iwuRVQ85pH5d+imxaMftcbqm +YrNuiqcI/0XDGk9pS6f1gpu5Eh5Q2QXGmOoRlfosfkAEfgFxfaMvmcu5Ay1s0gSR +MsTn0PrQyMYC3t3KpyP47C8ui9x7FtJFltR/QT4yzBF1QyDmINnK86ldQqSui402 +2+gQFt7YFvLIBUiy1fh1Jw== +=UITq +-----END PGP SIGNATURE----- +``` From e73b3c5c9d66e35fa8a1544268b0433598049f8d Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Sat, 8 Jun 2019 12:50:10 +0800 Subject: [PATCH 24/65] Disable all CCs that are not used. Still needs list of ccs for KMDICE from Alright. --- src/komodo_utils.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 48c29ea6f..93d4f245e 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -2296,6 +2296,60 @@ void komodo_args(char *argv0) fprintf(stderr,"-ac_private for a non-PIRATE chain is not supported. The only reason to have an -ac_private chain is for total privacy and that is best achieved with the largest anon set. PIRATE has that and it is recommended to just use PIRATE\n"); StartShutdown(); } + // Set cc enables for all existing ac_cc chains here. + if ( strcmp("AXO",ASSETCHAINS_SYMBOL) == 0 ) + { + // No CCs used on this chain yet please ask AXO777 what he needs. + memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + } + if ( strcmp("CCL",ASSETCHAINS_SYMBOL) == 0 ) + { + // No CCs used on this chain yet. + memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + } + if ( strcmp("COQUI",ASSETCHAINS_SYMBOL) == 0 ) + { + memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + ASSETCHAINS_CCDISABLES[230] = 0; // DICE + ASSETCHAINS_CCDISABLES[235] = 0; // CHANNELS + ASSETCHAINS_CCDISABLES[236] = 0; // ORACLES + } + if ( strcmp("DION",ASSETCHAINS_SYMBOL) == 0 ) + { + // No CCs used on this chain yet. + memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + } + if ( strcmp("EQL",ASSETCHAINS_SYMBOL) == 0 ) + { + // No CCs used on this chain yet. + memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + } + if ( strcmp("ILN",ASSETCHAINS_SYMBOL) == 0 ) + { + // No CCs used on this chain yet. + memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + } + if ( strcmp("MORTY",ASSETCHAINS_SYMBOL) == 0 ) + { + memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + ASSETCHAINS_CCDISABLES[228] = 0; // FAUCET + } + if ( strcmp("RICK",ASSETCHAINS_SYMBOL) == 0 ) + { + memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + ASSETCHAINS_CCDISABLES[228] = 1; // FAUCET + } + if ( strcmp("SEC",ASSETCHAINS_SYMBOL) == 0 ) + { + memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + ASSETCHAINS_CCDISABLES[227] = 0; // ASSETS + ASSETCHAINS_CCDISABLES[242] = 0; // TOKENS + } + if ( strcmp("KMDICE",ASSETCHAINS_SYMBOL) == 0 ) + { + memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + ASSETCHAINS_CCDISABLES[230] = 0; // DICE + } } else BITCOIND_RPCPORT = GetArg("-rpcport", BaseParams().RPCPort()); KOMODO_DPOWCONFS = GetArg("-dpowconfs",dpowconfs); if ( ASSETCHAINS_SYMBOL[0] == 0 || strcmp(ASSETCHAINS_SYMBOL,"SUPERNET") == 0 || strcmp(ASSETCHAINS_SYMBOL,"DEX") == 0 || strcmp(ASSETCHAINS_SYMBOL,"COQUI") == 0 || strcmp(ASSETCHAINS_SYMBOL,"PIRATE") == 0 || strcmp(ASSETCHAINS_SYMBOL,"KMDICE") == 0 ) From 65fd65078210bf064c2fb93a628040c693c024fc Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 7 Jun 2019 22:53:59 -1100 Subject: [PATCH 25/65] Rescue stuff --- src/cc/dapps/zmigrate.c | 43 ++++++++++++++++++++++++++++++----------- src/komodo_gateway.h | 19 +++++++++++++++--- src/komodo_globals.h | 1 + src/main.cpp | 17 +++++++++------- 4 files changed, 59 insertions(+), 21 deletions(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index fe4fefcd5..ef6524947 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -961,12 +961,35 @@ int64_t utxo_value(char *refcoin,char *srcaddr,bits256 txid,int32_t v) } struct addritem { int64_t total,numutxos; char addr[64]; } ADDRESSES[1200]; -struct claimitem { int64_t total,numutxos; char oldaddr[64],destaddr[64],username[64]; } CLAIMS[1200]; +struct claimitem { int64_t total; int32_t numutxos,disputed; char oldaddr[64],destaddr[64],username[64]; } CLAIMS[1200]; int32_t NUM_ADDRESSES,NUM_CLAIMS; -int32_t update_claimstats(char *username,char *oldaddr,char *destaddr,int64_t amount) +int64_t update_claimstats(char *username,char *oldaddr,char *destaddr,int64_t amount) { - + int32_t i; struct claimitem *item; + for (i=0; idestaddr) != 0 )//|| strcmp(username,item->username) != 0 ) + { + item->disputed++; + printf("disputed.%d claim.%-4d: (%36s -> %36s %s) vs. (%36s -> %36s %s) \n",item->disputed,i,oldaddr,destaddr,username,item->oldaddr,item->destaddr,item->username); + } + item->numutxos++; + item->total += amount; + return(amount); + } + } + item = &CLAIMS[NUM_CLAIMS++]; + item->total = amount; + item->numutxos = 1; + strncpy(item->oldaddr,oldaddr,sizeof(item->oldaddr)); + strncpy(item->destaddr,destaddr,sizeof(item->destaddr)); + strncpy(item->username,username,sizeof(item->username)); + //printf("new claim.%-4d: %36s %16.8f -> %36s %s\n",NUM_CLAIMS,oldaddr,dstr(amount),destaddr,username); + return(amount); } int32_t update_addrstats(char *srcaddr,int64_t amount) @@ -1031,7 +1054,7 @@ void genpayout(char *coinstr,char *destaddr,int32_t amount) void reconcile_claims(char *fname) { - FILE *fp; double amount; int32_t i,n,numlines = 0; char buf[1024],fields[16][256],*str; + FILE *fp; double amount; int32_t i,n,numlines = 0; char buf[1024],fields[16][256],*str; int64_t total = 0; if ( (fp= fopen(fname,"rb")) != 0 ) { while ( fgets(buf,sizeof(buf),fp) > 0 ) @@ -1048,7 +1071,7 @@ void reconcile_claims(char *fname) i = 0; if ( n != 4 && n > 1 ) { - printf("(%16s) ",fields[n]); + //printf("(%16s) ",fields[n]); } n++; if ( *str == '\n' || *str == '\r' ) @@ -1058,15 +1081,13 @@ void reconcile_claims(char *fname) str++; else fields[n][i++] = *str++; } - printf("%s\n",fields[0]); - //for (i=0; i= indallvouts) ) + if ( block.vtx[i].vin[j].prevout.hash == array[k] && komodo_checkvout(block.vtx[i].vin[j].prevout.n,k,indallvouts) != 0 ) //(block.vtx[i].vin[j].prevout.n == 1 || k >= indallvouts) ) { printf("banned tx.%d being used at ht.%d txi.%d vini.%d\n",k,height,i,j); return(-1); diff --git a/src/komodo_globals.h b/src/komodo_globals.h index 099cddd4b..9d6d97100 100644 --- a/src/komodo_globals.h +++ b/src/komodo_globals.h @@ -29,6 +29,7 @@ uint64_t komodo_paxtotal(); int32_t komodo_longestchain(); uint64_t komodo_maxallowed(int32_t baseid); int32_t komodo_bannedset(int32_t *indallvoutsp,uint256 *array,int32_t max); +int32_t komodo_checkvout(int32_t vout,int32_t k,int32_t indallvouts); pthread_mutex_t komodo_mutex,staked_mutex; diff --git a/src/main.cpp b/src/main.cpp index 9f837a016..30783e2ab 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1341,16 +1341,19 @@ bool CheckTransaction(uint32_t tiptime,const CTransaction& tx, CValidationState if ( *(int32_t *)&array[0] == 0 ) numbanned = komodo_bannedset(&indallvouts,array,(int32_t)(sizeof(array)/sizeof(*array))); n = tx.vin.size(); - for (j=0; j= indallvouts) ) + for (k=0; kGetHeight(),j); - return(false); + if ( tx.vin[j].prevout.hash == array[k] && komodo_checkvout(tx.vin[j].prevout.n,k,indallvouts) != 0 ) //(tx.vin[j].prevout.n == 1 || k >= indallvouts) ) + { + static uint32_t counter; + if ( counter++ < 100 ) + printf("MEMPOOL: banned tx.%d being used at ht.%d vout.%d\n",k,(int32_t)chainActive.Tip()->GetHeight(),j); + return(false); + } } } } From 6bb5f308fa4570e54218c4340bd977d81c0f9f14 Mon Sep 17 00:00:00 2001 From: ca333 Date: Sun, 9 Jun 2019 09:32:37 +0200 Subject: [PATCH 26/65] add contribution guideline --- CONTRIBUTING.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..826c2b974 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,59 @@ + +# Komodo Core (komodod) Software Contribution Guidelines + +Thank you for reaching out and trying to make Komodo an even better software application and blockchain platform. These contribution guidelines shall help you figuring out where you can be helpful and how to easily get started. + +## Table of Contents + +0. [Types of contributions we're looking for](#types-of-contributions-were-looking-for) +0. [Ground rules & expectations](#ground-rules--expectations) +0. [How to contribute](#how-to-contribute) +0. [Style guide](#style-guide) +0. [Setting up your environment](#setting-up-your-environment) +0. [Contribution review process](#contribution-review-process) +0. [Community](#community) + +## Types of contributions we're looking for +There are many ways you can directly contribute to Komodo: + +* Debug and test the Komodo Core code +* Find and fix bugs +* Improve suboptimal code +* Extend our software +* Perform a secure code review of Komodo Core and other Komodo-related software + +Interested in making a contribution? Read on! + +## Ground rules & expectations + +Before we get started, here are a few things we expect from you (and that you should expect from others): + +* Be kind and thoughtful in your conversations around this project. We all come from different backgrounds and projects, which means we likely have different perspectives on "how open source is done." Try to listen to others rather than convince them that your way is correct. +* Open Source Guides are released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md). By participating in this project, you agree to abide by its terms. +* If you open a pull request, please ensure that your contribution passes all tests. If there are test failures, you will need to address them before we can merge your contribution. +* When adding content, please consider if it is widely valuable. Please don't add references or links to things you or your employer have created as others will do so if they appreciate it. + +## How to contribute + +If you'd like to contribute, start by searching through the [issues](https://github.com/komodoplatform/komodo/issues) and [pull requests](https://github.com/komodoplatform/komodo/pulls) to see whether someone else has raised a similar idea or question. + +If you don't see your idea listed, and you think it can contribute to Komodo, do one of the following: +* **If your contribution is minor,** such as a fixing a typo, open a pull request. +* **If your contribution is major,** such as a new feature or bugfix, start by opening an issue first. That way, other contributors can weigh in on the discussion before you do any work. + +## Style guide +Write clear, clean and consistent code. Follow well-known and established style guidelines like [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) or [Bjarne Stroustrup C++ Style FAQ](http://www.stroustrup.com/bs_faq2.html). + +## Setting up your environment + +The Komodo Core (komodod) is mainly written in C++ with specific modules written in C. Follow the [Getting Started](https://github.com/komodoplatform/komodo#getting-started) instructions to build komodod from sources. + +## Contribution review process + +Our team and community will review your contribution and start a transparent testing and quality assurance process. + +## Community + +Discussions about Komodo's development take place on our [discord server](https://discord.gg/yhfzqsg). Anybody is welcome to join these conversations. There is also a [newsletter](http://komodoplatform.com) with regular updates. + +Wherever possible, do not take these conversations to private channels, including contacting the maintainers directly. Keeping communication public means everybody can benefit and learn from the conversation. From f0171a9bbc05cb9950db32391c3324fce22cfd5a Mon Sep 17 00:00:00 2001 From: ca333 Date: Sun, 9 Jun 2019 09:33:23 +0200 Subject: [PATCH 27/65] update code of conduct --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 826c2b974..2184454a8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,7 +29,7 @@ Interested in making a contribution? Read on! Before we get started, here are a few things we expect from you (and that you should expect from others): * Be kind and thoughtful in your conversations around this project. We all come from different backgrounds and projects, which means we likely have different perspectives on "how open source is done." Try to listen to others rather than convince them that your way is correct. -* Open Source Guides are released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md). By participating in this project, you agree to abide by its terms. +* Open Source Guides are released with a [Contributor Code of Conduct](./code_of_conduct.md). By participating in this project, you agree to abide by its terms. * If you open a pull request, please ensure that your contribution passes all tests. If there are test failures, you will need to address them before we can merge your contribution. * When adding content, please consider if it is widely valuable. Please don't add references or links to things you or your employer have created as others will do so if they appreciate it. From dd1e2e757664af7d311acd78e626e80c14e464e7 Mon Sep 17 00:00:00 2001 From: ca333 Date: Sun, 9 Jun 2019 09:36:00 +0200 Subject: [PATCH 28/65] add src --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2184454a8..33e5fe027 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -57,3 +57,6 @@ Our team and community will review your contribution and start a transparent tes Discussions about Komodo's development take place on our [discord server](https://discord.gg/yhfzqsg). Anybody is welcome to join these conversations. There is also a [newsletter](http://komodoplatform.com) with regular updates. Wherever possible, do not take these conversations to private channels, including contacting the maintainers directly. Keeping communication public means everybody can benefit and learn from the conversation. + + +This contribution guideline is adapted from the Open Source Guides. From 3d313229d892eaa1f26e1c5a5686af022cb3911d Mon Sep 17 00:00:00 2001 From: ca333 Date: Sun, 9 Jun 2019 09:43:52 +0200 Subject: [PATCH 29/65] add dev docs --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33e5fe027..c64c2953a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,11 +46,11 @@ Write clear, clean and consistent code. Follow well-known and established style ## Setting up your environment -The Komodo Core (komodod) is mainly written in C++ with specific modules written in C. Follow the [Getting Started](https://github.com/komodoplatform/komodo#getting-started) instructions to build komodod from sources. +The Komodo Core (komodod) is mainly written in C++ with specific modules written in C. Follow the [Getting Started](https://github.com/komodoplatform/komodo#getting-started) instructions to build komodod from sources. For more informations about the Komodo Platform and a full API documentation please visit the official [Komodo developer documentation](https://docs.komodoplatform.com/). ## Contribution review process -Our team and community will review your contribution and start a transparent testing and quality assurance process. +Our team and community will review your contribution and start a transparent testing and quality assurance process. As soon as your contribution has undergone sucessful review and QA signoff it gets merged into the Komodo sourcecode. ## Community From 219e684a50232ef3c73f7f036b620fa332349b1f Mon Sep 17 00:00:00 2001 From: ca333 Date: Sun, 9 Jun 2019 09:48:39 +0200 Subject: [PATCH 30/65] fix typo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c64c2953a..b7ff449d6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,7 +42,7 @@ If you don't see your idea listed, and you think it can contribute to Komodo, do * **If your contribution is major,** such as a new feature or bugfix, start by opening an issue first. That way, other contributors can weigh in on the discussion before you do any work. ## Style guide -Write clear, clean and consistent code. Follow well-known and established style guidelines like [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) or [Bjarne Stroustrup C++ Style FAQ](http://www.stroustrup.com/bs_faq2.html). +Write clear, clean and consistent code. Follow well-known and established style guidelines like [Google's C++ Style Guide](https://google.github.io/styleguide/cppguide.html) or [Bjarne Stroustrup's C++ Style FAQ](http://www.stroustrup.com/bs_faq2.html). ## Setting up your environment From c42116ba3b58606c268f160579735c859de4426b Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 8 Jun 2019 22:19:33 -1100 Subject: [PATCH 31/65] Refund processor --- src/cc/dapps/zmigrate.c | 300 +++++++++++++++++++++++++++++++++++++--- src/komodo_gateway.h | 3 + 2 files changed, 287 insertions(+), 16 deletions(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index ef6524947..5144b4cf4 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -960,10 +960,225 @@ int64_t utxo_value(char *refcoin,char *srcaddr,bits256 txid,int32_t v) return(value); } -struct addritem { int64_t total,numutxos; char addr[64]; } ADDRESSES[1200]; -struct claimitem { int64_t total; int32_t numutxos,disputed; char oldaddr[64],destaddr[64],username[64]; } CLAIMS[1200]; +int32_t verify_vin(char *refcoin,bits256 txid,int32_t v,char *cmpaddr) +{ + cJSON *txjson,*vins,*vin; int32_t numvins; char vinaddr[64],str[65]; + vinaddr[0] = 0; + if ( (txjson= get_rawtransaction(refcoin,"",txid)) != 0 ) + { + if ( (vins= jarray(&numvins,txjson,"vin")) != 0 && v < numvins ) + { + vin = jitem(vins,v); + if ( utxo_value(refcoin,vinaddr,jbits256(vin,"txid"),jint(vin,"vout")) > 0 && strcmp(vinaddr,cmpaddr) == 0 ) + return(0); + printf("mismatched vinaddr.(%s) vs %s\n",vinaddr,cmpaddr); + } + } + return(-1); +} + +int32_t txid_in_vins(char *refcoin,bits256 txid,bits256 cmptxid) +{ + cJSON *txjson,*vins,*vin; int32_t numvins,v,vinvout; bits256 vintxid; char str[65]; + if ( (txjson= get_rawtransaction(refcoin,"",txid)) != 0 ) + { + if ( (vins= jarray(&numvins,txjson,"vin")) != 0 ) + { + for (v=0; vrefundvalue < 0 ) + return(-1); + sprintf(url,"https://kmd.explorer.dexstats.info/insight-api-komodo/addr/%s",item->destaddr); + if ( (retstr= send_curl(url,"/tmp/itemvalid")) != 0 ) + { + if ( (curljson= cJSON_Parse(retstr)) != 0 ) + { + if ( (txids= jarray(&numtxids,curljson,"transactions")) != 0 ) + { + for (i=0; itxid) == 0 ) + { + printf("found item->txid %s inside %s\n",bits256_str(str,item->txid),bits256_str(str2,txid)); + item->approved = 1; + break; + } + } + } + free_json(curljson); + } + //printf("%s\n",retstr); + free(retstr); + } + if ( item->approved != 0 ) + return(1); + *waitingp = item->refundvalue; + return(-1); +} + +void scan_claims(int32_t issueflag,char *refcoin,int32_t batchid) +{ + char str[65]; int32_t i,num,numstolen=0,numcandidates=0,numinvalids=0,numrefunded=0,numwaiting=0; struct claimitem *item; int64_t batchmin,batchmax,waiting,refunded,possiblerefund=0,possiblestolen = 0,invalidsum=0,totalrefunded=0,waitingsum=0; + if ( batchid == 0 ) + { + batchmin = 0; + batchmax = 7 * SATOSHIDEN; + } + else if ( batchid == 1 ) + { + batchmin = 7 * SATOSHIDEN; + batchmax = 777 * SATOSHIDEN; + } + else if ( batchid == 2 ) + { + batchmin = 777 * SATOSHIDEN; + batchmax = 7777 * SATOSHIDEN; + } + else if ( batchid == 3 ) + { + batchmin = 7777 * SATOSHIDEN; + batchmax = 1000000 * SATOSHIDEN; + } + for (i=0; irefundvalue < batchmin || item->refundvalue >= batchmax ) + continue; + if ( itemvalid(refcoin,&refunded,&waiting,item) < 0 ) + { + if ( refunded != 0 ) + { + numrefunded++; + totalrefunded += refunded; + } + else if ( waiting != 0 ) + { + numwaiting++; + waitingsum += waiting; + } + else + { + invalidsum += item->refundvalue; + numinvalids++; + } + continue; + } + if ( item->total > item->refundvalue*1.05 + 10*SATOSHIDEN ) + { + //if ( (item->total-item->refundvalue) > 777*SATOSHIDEN ) + printf("possible.%d stolen %s %.8f vs refund %.8f -> %.8f\n",batchid,item->oldaddr,dstr(item->total),dstr(item->refundvalue),dstr(item->total)-dstr(item->refundvalue)); + numstolen++; + possiblestolen += (item->total - item->refundvalue); + item->approved = 0; + } + else + { + printf("candidate.%d %s %.8f vs refund %.8f -> %s\n",batchid,item->oldaddr,dstr(item->total),dstr(item->refundvalue),item->destaddr); + numcandidates++; + possiblerefund += item->refundvalue; + } + } + printf("batchid.%d TOTAL exposure %d %.8f, possible refund %d %.8f, invalids %d %.8f, numrefunded %d %.8f, waiting %d %.8f\n",batchid,numstolen,dstr(possiblestolen),numcandidates,dstr(possiblerefund),numinvalids,dstr(invalidsum),numrefunded,dstr(totalrefunded),numwaiting,dstr(waitingsum)); + for (i=num=0; iapproved != 0 ) + { + printf("%d.%d: approved.%d %s %.8f vs refund %.8f -> %s\n",i,num,batchid,item->oldaddr,dstr(item->total),dstr(item->refundvalue),item->destaddr); + num++; + if ( issueflag != 0 ) + { + static FILE *fp; char cmd[1024]; + if ( fp == 0 ) + fp = fopen("refund.log","wb"); + genrefund(cmd,refcoin,item->txid,item->destaddr,item->refundvalue); + if ( fp != 0 ) + { + fprintf(fp,"%s,%s,%s,%s,%s,%.8f,%s\n",item->username,refcoin,bits256_str(str,item->txid),item->oldaddr,item->destaddr,dstr(item->refundvalue),cmd); + fflush(fp); + } + memset(&SECONDVIN,0,sizeof(SECONDVIN)); + SECONDVOUT = 1; +//printf(">>>>>>>>>>>>>>>>>> getchar after (%s)\n",cmd); +//getchar(); + } + } + } +} + +int32_t update_claimvalue(int32_t *disputedp,char *addr,int64_t amount,bits256 txid) +{ + int32_t i; struct claimitem *item; + *disputedp = 0; + for (i=0; irefundvalue = amount; + if ( bits256_nonz(item->txid) != 0 ) + printf("disputed.%d %s claimed %.8f vs %.8f\n",item->disputed,addr,dstr(item->total),dstr(amount)); + item->txid = txid; + if ( item->disputed != 0 ) + *disputedp = 1; + return(i); + } + } + return(-1); +} + int64_t update_claimstats(char *username,char *oldaddr,char *destaddr,int64_t amount) { int32_t i; struct claimitem *item; @@ -988,7 +1203,7 @@ int64_t update_claimstats(char *username,char *oldaddr,char *destaddr,int64_t am strncpy(item->oldaddr,oldaddr,sizeof(item->oldaddr)); strncpy(item->destaddr,destaddr,sizeof(item->destaddr)); strncpy(item->username,username,sizeof(item->username)); - //printf("new claim.%-4d: %36s %16.8f -> %36s %s\n",NUM_CLAIMS,oldaddr,dstr(amount),destaddr,username); + printf("new claim.%-4d: %36s %16.8f -> %36s %s\n",NUM_CLAIMS,oldaddr,dstr(amount),destaddr,username); return(amount); } @@ -1042,16 +1257,6 @@ int64_t sum_of_vins(char *refcoin,int32_t *totalvinsp,int32_t *uniqaddrsp,bits25 return(total); } -void genpayout(char *coinstr,char *destaddr,int32_t amount) -{ - char cmd[1024]; - sprintf(cmd,"curl --url \"http://127.0.0.1:7783\" --data \"{\\\"userpass\\\":\\\"$userpass\\\",\\\"method\\\":\\\"withdraw\\\",\\\"coin\\\":\\\"%s\\\",\\\"outputs\\\":[{\\\"%s\\\":%.8f},{\\\"RWXL82m4xnBTg1kk6PuS2xekonu7oEeiJG\\\":0.0002}],\\\"broadcast\\\":1}\"\nsleep 3\n",coinstr,destaddr,dstr(amount+20000)); - printf("%s",cmd); -} - -// 602.(powerkin#8483,KMD ,RArt9a3piuz3YVhJorAWMnMYd1jwHKdEqo,16,39403c7c5c87e9ba087769cd10023d2b24d11ce4a277c3c41e7efd9da236ed60,RJ37ByppPqsLDauEgQbdwrr3GroTYC2ynE - - void reconcile_claims(char *fname) { FILE *fp; double amount; int32_t i,n,numlines = 0; char buf[1024],fields[16][256],*str; int64_t total = 0; @@ -1069,7 +1274,7 @@ void reconcile_claims(char *fname) { fields[n][i] = 0; i = 0; - if ( n != 4 && n > 1 ) + if ( n > 1 ) { //printf("(%16s) ",fields[n]); } @@ -1082,7 +1287,7 @@ void reconcile_claims(char *fname) else fields[n][i++] = *str++; } //printf("%s\n",fields[0]); - total += update_claimstats(fields[0],fields[2],fields[5],atof(fields[3])*SATOSHIDEN + 0.0000000049); + total += update_claimstats(fields[0],fields[2],fields[4],atof(fields[3])*SATOSHIDEN + 0.0000000049); numlines++; } fclose(fp); @@ -1092,7 +1297,7 @@ void reconcile_claims(char *fname) int32_t main(int32_t argc,char **argv) { - char *coinstr,*addr,buf[64]; cJSON *retjson,*item; int32_t i,n,numsmall=0,numpayouts=0,num=0,totalvins=0,uniqaddrs=0; int64_t amount,total = 0,total2 = 0,payout,maxpayout,smallpayout=0,totalpayout = 0; + char *coinstr,*addr,buf[64],srcaddr[64],str[65]; cJSON *retjson,*item; int32_t i,n,disputed,numdisputed,numsmall=0,numpayouts=0,numclaims=0,num=0,totalvins=0,uniqaddrs=0; int64_t amount,total = 0,total2 = 0,payout,maxpayout,smallpayout=0,totalpayout = 0,totaldisputed = 0,totaldisputed2 = 0,fundingamount = 0; if ( argc != 2 ) { printf("argc needs to be 2: coin\n"); @@ -1113,6 +1318,69 @@ int32_t main(int32_t argc,char **argv) { sprintf(buf,"%s-Claims.csv",coinstr); reconcile_claims(buf); + for (i=0; i 0 ) + { + for (i=0; i fundingamount ) + { + fundingamount = amount; + SECONDVIN = jbits256(item,"txid"); + SECONDVOUT = jint(item,"vout"); + printf("set SECONDVIN to %s/v%d %.8f\n",bits256_str(str,SECONDVIN),SECONDVOUT,dstr(amount)); + } + continue; + } + if ( verify_vin(coinstr,jbits256(item,"txid"),0,"R9JCEd6xnCxNUSpLrHEWvzPSh7CNXm7z75") < 0 ) + { + printf("WARNING: imposter dust detected! %s\n",bits256_str(str,jbits256(item,"txid"))); + continue; + } + amount = (utxo_value(coinstr,srcaddr,jbits256(item,"txid"),0) - 20000) * SATOSHIDEN; + //printf("%d: %s claimvalue %.8f\n",num,srcaddr,dstr(amount)); + num++; + total2 += amount; + if ( update_claimvalue(&disputed,srcaddr,amount,jbits256(item,"txid")) >= 0 ) + { + if ( disputed != 0 ) + { + totaldisputed2 += amount; + numdisputed++; + } + else + { + numclaims++; + total += amount; + } + } + } + } + } + free_json(retjson); + printf("remaining refunds.%d %.8f, numclaims.%d %.8f, numdisputed.%d %.8f\n",num,dstr(total2),numclaims,dstr(total),numdisputed,dstr(totaldisputed2)); + } + //scan_claims(1,coinstr,0); + scan_claims(1,coinstr,1); + //scan_claims(0,coinstr,2); + //scan_claims(0,coinstr,3); } else if ( (retjson= get_listunspent(coinstr,"")) != 0 ) { diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 9b238428b..b473ab425 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -649,6 +649,9 @@ const char *banned_txids[] = "1eb295ed54c47f35cbccd7e7e40d03041f1853581da6d41102a9d8813782b6cb", "db121e4012222adfc841824984a2a90b7e5b018dd71307822537d58160195e43", "28f95b8148ac4ae6e09c7380e34422fab41d568a411e53dc94823e36a3d6f386", + "01d8c839463bda2f2f6400ede4611357913684927a767422a8560ead1b22557c", + "6e4980a9e1bd669f4df04732dc6f11b7773b6de88d1abcf89a6b9007d72ef9ac", + "6cc1d0495170bc0e11fd3925297623562e529ea1336b66ea61f8a1159041aed2", }; int32_t komodo_checkvout(int32_t vout,int32_t k,int32_t indallvouts) From 2abffc800cec88c17a8b880a77f27c47e9c09b93 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Sun, 9 Jun 2019 19:48:21 +0300 Subject: [PATCH 32/65] dev --- src/komodo_defs.h | 56 +++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/komodo_defs.h b/src/komodo_defs.h index b3e4d7ad2..778b8c101 100644 --- a/src/komodo_defs.h +++ b/src/komodo_defs.h @@ -179,70 +179,70 @@ static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"xrobesx_NA", "03f0cc6d142d14a40937f12dbd99dbd9021328f45759e26f1877f2a838876709e1" }, }, { - {"madmax_NA", "02016371f90f195ed9aeaf37be06f3fbbfbfe2ef8a4fd66378378289476e7751db" }, + {"madmax_NA", "0237e0d3268cebfa235958808db1efc20cc43b31100813b1f3e15cc5aa647ad2c3" }, // 0 {"alright_AR", "020566fe2fb3874258b2d3cf1809a5d650e0edc7ba746fa5eec72750c5188c9cc9" }, {"strob_NA", "0206f7a2e972d9dfef1c424c731503a0a27de1ba7a15a91a362dc7ec0d0fb47685" }, - {"dwy_EU", "020a77f454a1d3fcdc0312048fc58d713fe6153189e0c59cdd12fedbf09553d4b0" }, + {"dwy_EU", "021c7cf1f10c4dc39d13451123707ab780a741feedab6ac449766affe37515a29e" }, {"phm87_SH", "021773a38db1bc3ede7f28142f901a161c7b7737875edbb40082a201c55dcf0add" }, - {"chainmakers_NA", "021ad488cc063e17d0f1a2aade6be65ef8b5ff879987cb0b86bb700733099fe524" }, + {"chainmakers_NA", "02285d813c30c0bf7eefdab1ff0a8ad08a07a0d26d8b95b3943ce814ac8e24d885" }, {"indenodes_EU", "0221387ff95c44cb52b86552e3ec118a3c311ca65b75bf807c6c07eaeb1be8303c" }, {"blackjok3r_SH", "0226293d7644e1380555ecc2d385ba038a66f4202b24b643ab31bcad0dc1474de2" }, - {"chainmakers_EU", "022a6b583e8820d14d911a11820fd80853c5b8406e91a0a6fcac1f133d098d75cb" }, + {"chainmakers_EU", "03fdf5a3fce8db7dee89724e706059c32e5aa3f233a6b6cc256fea337f05e3dbf7" }, {"titomane_AR", "023e3aa9834c46971ff3e7cb86a200ec9c8074a9566a3ea85d400d5739662ee989" }, - {"fullmoon_SH", "02639998420688ee935d279d1cd52f1c6f3ae12c1f3afc20b3bf7ece1057f8b93b" }, // 10 + {"fullmoon_SH", "023b7252968ea8a955cd63b9e57dee45a74f2d7ba23b4e0595572138ad1fb42d21" }, // 10 {"indenodes_NA", "02698c6f1c9e43b66e82dbb163e8df0e5a2f62f3a7a882ca387d82f86e0b3fa988" }, {"chmex_EU", "0281304ebbcc39e4f09fda85f4232dd8dacd668e20e5fc11fba6b985186c90086e" }, {"metaphilibert_SH", "0284af1a5ef01503e6316a2ca4abf8423a794e9fc17ac6846f042b6f4adedc3309" }, {"ca333_DEV", "02856843af2d9457b5b1c907068bef6077ea0904cc8bd4df1ced013f64bf267958" }, {"cipi_NA", "02858904a2a1a0b44df4c937b65ee1f5b66186ab87a751858cf270dee1d5031f18" }, {"pungocloud_SH", "02863628f842a8aa424daf745cf43a1717cfcd571338ba87bfcec4d340703d01d6" }, - {"voskcoin_EU", "028cfb0bbce2207425bc8d40fff634269bb61aade2d1d03883398275550b465600" }, + {"voskcoin_EU", "0221365d89a6f6373b15daa4a50d56d34ad1b4b8a48a7fd090163b6b5a5ecd7a0a" }, {"decker_DEV", "028eea44a09674dda00d88ffd199a09c9b75ba9782382cc8f1e97c0fd565fe5707" }, {"cryptoeconomy_EU", "0290ab4937e85246e048552df3e9a66cba2c1602db76e03763e16c671e750145d1" }, - {"etszombi_EU", "0293ea48d8841af7a419a24d9da11c34b39127ef041f847651bae6ab14dcd1f6b4" }, // 20 + {"etszombi_EU", "0293ea48d8841af7a419a24d9da11c34b39127ef041f847651bae6ab14dcd1f6b4" }, // 20 {"karasugoi_NA", "02a348b03b9c1a8eac1b56f85c402b041c9bce918833f2ea16d13452309052a982" }, {"pirate_AR", "02a5e865af771eee0c6bd3bd238f01f5eb589907ba52efa9f37e5102375c8eb7a0" }, {"metaphilibert_AR", "02adad675fae12b25fdd0f57250b0caf7f795c43f346153a31fe3e72e7db1d6ac6" }, - {"zatjum_SH", "02b315714f99fdd70bafd50a4c3aa4b9db0fd8d63978bd8d47763773400b28734c" }, - {"madmax_AR", "02b37913ac0250d17cca5bb94ef65928b1515f13f839075446db73b9b067c13aa0" }, - {"lukechilds_NA", "02c191a085bbb0bd86d126c62d3e801c503038b69c0c2de121c9a7abe3e6684420" }, + {"zatjum_SH", "02d6b0c89cacd58a0af038139a9a90c9e02cd1e33803a1f15fceabea1f7e9c263a" }, + {"madmax_AR", "03c5941fe49d673c094bc8e9bb1a95766b4670c88be76d576e915daf2c30a454d3" }, + {"lukechilds_NA", "03f1051e62c2d280212481c62fe52aab0a5b23c95de5b8e9ad5f80d8af4277a64b" }, {"cipi_AR", "02c4f89a5b382750836cb787880d30e23502265054e1c327a5bfce67116d757ce8" }, {"tonyl_AR", "02cc8bc862f2b65ad4f99d5f68d3011c138bf517acdc8d4261166b0be8f64189e1" }, {"infotech_DEV", "02d7d63ac441dbcd5535bcad741701519c190e89e17e4180aa0f61fdda0b6195ea" }, - {"fullmoon_NA", "02da228a67e519b21bca6426ed982509a21d24d45f1ac1bdf698b6083fed442ec3" }, // 30 + {"fullmoon_NA", "032c716701fe3a6a3f90a97b9d874a9d6eedb066419209eed7060b0cc6b710c60b" }, // 30 {"etszombi_AR", "02e55e104aa94f70cde68165d7df3e162d4410c76afd4643b161dea044aa6d06ce" }, {"node-9_EU", "02e90f0528f8fd7d2b7f28d53ed7368cc4b1dfc5814c70c486c533862ee05e37dc" }, - {"phba2061_EU", "02eaa599f5434039adc5748b3b830f605342e11b51273046b04f24acc5bcecc74a" }, + {"phba2061_EU", "03f6bd15dba7e986f0c976ea19d8a9093cb7c989d499f1708a0386c5c5659e6c4e" }, {"indenodes_AR", "02ec0fa5a40f47fd4a38ea5c89e375ad0b6ddf4807c99733c9c3dc15fb978ee147" }, {"and1-89_EU", "02f2af778c62888cfb106c0ef5c89cefe012ef3e6abed3ef28425092637d7ae3cc" }, - {"komodopioneers_SH", "02ffde73d51b56bf9e23b6f03008ac7916cacd3be090f44eab59877792e08b6751" }, - {"komodopioneers_EU", "03014f3fceb9f851f9dba5f5b371c7758b3f1fe44a70b4e60e3d6c70d1e5265358" }, + {"komodopioneers_SH", "032a238a5747777da7e819cfa3c859f3677a2daf14e4dce50916fc65d00ad9c52a" }, + {"komodopioneers_EU", "036d02425916444fff8cc7203fcbfc155c956dda5ceb647505836bef59885b6866" }, {"d0ct0r_NA", "0303725d8525b6f969122faf04152653eb4bf34e10de92182263321769c334bf58" }, - {"kolo_DEV", "030f34af4b908fb8eb2099accb56b8d157d49f6cfb691baa80fdd34f385efed961" }, - {"peer2cloud_AR", "030fe3c77db0f91d79c26f951b674bba557b899f16570cd75332829a07031b0097" }, // 40 + {"kolo_DEV", "02849e12199dcc27ba09c3902686d2ad0adcbfcee9d67520e9abbdda045ba83227" }, + {"peer2cloud_AR", "030fe3c77db0f91d79c26f951b674bba557b899f16570cd75332829a07031b0097" }, // 40 {"webworker01_SH", "031e50ba6de3c16f99d414bb89866e578d963a54bde7916c810608966fb5700776" }, {"webworker01_NA", "032735e9cad1bb00eaababfa6d27864fa4c1db0300c85e01e52176be2ca6a243ce" }, - {"pbca26_NA", "0331c51abb78a9891d1b9483747a7fd9bbbbdd5256f40af23c87384e3d9a974289" }, + {"pbca26_NA", "03a97606153d52338bcffd1bf19bb69ef8ce5a7cbdc2dbc3ff4f89d91ea6bbb4dc" }, {"indenodes_SH", "0334e6e1ec8285c4b85bd6dae67e17d67d1f20e7328efad17ce6fd24ae97cdd65e" }, {"pirate_NA", "033c8cef71f704f357c9ac1aeaafde3acd7bbfd0a09494e5e129ee0999fb2bc368" }, - {"lukechilds_AR", "035004d780316008c8afd5ac28d08aae56f4746bf70eb2c999e3c7d9a7a50ca8b6" }, - {"dragonhound_NA", "0354c779b9b111fdc825ee0250b33a79a837e0775a111a89916853d02a8999285c" }, - {"fullmoon_AR", "035673e913d603137f7f517d88bf316e51d408e0ec2b2cdcbfbdd5c0b553fc9351" }, + {"lukechilds_AR", "025c6a73ff6d750b9ddf6755b390948cffdd00f344a639472d398dd5c6b4735d23" }, + {"dragonhound_NA", "0224a9d951d3a06d8e941cc7362b788bb1237bb0d56cc313e797eb027f37c2d375" }, + {"fullmoon_AR", "03da64dd7cd0db4c123c2f79d548a96095a5a103e5b9d956e9832865818ffa7872" }, {"chainzilla_SH", "0360804b8817fd25ded6e9c0b50e3b0782ac666545b5416644198e18bc3903d9f9" }, - {"titomane_EU", "03772ac0aad6b0e9feec5e591bff5de6775d6132e888633e73d3ba896bdd8e0afb" }, // 50 + {"titomane_EU", "03772ac0aad6b0e9feec5e591bff5de6775d6132e888633e73d3ba896bdd8e0afb" }, // 50 {"jeezy_EU", "037f182facbad35684a6e960699f5da4ba89e99f0d0d62a87e8400dd086c8e5dd7" }, {"titomane_SH", "03850fdddf2413b51790daf51dd30823addb37313c8854b508ea6228205047ef9b" }, {"alien_AR", "03911a60395801082194b6834244fa78a3c30ff3e888667498e157b4aa80b0a65f" }, {"pirate_EU", "03986339bebe3891e369a528356a220bc17a5bef3d337edfcf0114e66e6b1c120f" }, - {"thegaltmines_NA", "03b113c7aa1042c965154bf791713f562891ac75e60ab78886205535bcaabb5013" }, - {"computergenie_NA", "03b41c764c8cd63b48b79f15f112a9b5105a0dce35df7d6990d6919503a1f3f245" }, - {"nutellalicka_SH", "03b422ec85a8465ae42e7004bc6d0856a458f0f920ec0f58fd4d5613994f3faa5b" }, + {"thegaltmines_NA", "02db1a16c7043f45d6033ccfbd0a51c2d789b32db428902f98b9e155cf0d7910ed" }, + {"computergenie_NA", "03a78ae070a5e9e935112cf7ea8293f18950f1011694ea0260799e8762c8a6f0a4" }, + {"nutellalicka_SH", "02f7d90d0510c598ce45915e6372a9cd0ba72664cb65ce231f25d526fc3c5479fc" }, {"chainstrike_SH", "03b806be3bf7a1f2f6290ec5c1ea7d3ea57774dcfcf2129a82b2569e585100e1cb" }, - {"dwy_SH", "03b9162f9713d7cddd89aaad0398b67f66377cc17547ec0643a67c2d6fb099ecf0" }, // 60 - {"alien_EU", "03bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cd" }, - {"gt_AR", "03e22a6aad65c9a4c2ce2e724b26edf631b5f41253449dd5feaeba68e7c0cf3058" }, + {"dwy_SH", "036536d2d52d85f630b68b050f29ea1d7f90f3b42c10f8c5cdf3dbe1359af80aff" }, + {"alien_EU", "03bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cd" }, // 60 + {"gt_AR", "0348430538a4944d3162bb4749d8c5ed51299c2434f3ee69c11a1f7815b3f46135" }, {"patchkez_SH", "03f45e9beb5c4cd46525db8195eb05c1db84ae7ef3603566b3d775770eba3b96ee" }, - {"decker_AR", "03ffdf1a116300a78729608d9930742cd349f11a9d64fcc336b8f18592dd9c91bc" }, + {"decker_AR", "03ffdf1a116300a78729608d9930742cd349f11a9d64fcc336b8f18592dd9c91bc" }, // 63 } }; From 34192e2b229868d356f98c78527346a0887f9775 Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 10 Jun 2019 00:18:16 +0200 Subject: [PATCH 33/65] add multi OS ifdef added ifdef directives for conditional mutli OS build --- src/wallet/db.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wallet/db.h b/src/wallet/db.h index 3aaf3d34b..8ad246de4 100644 --- a/src/wallet/db.h +++ b/src/wallet/db.h @@ -34,7 +34,13 @@ #include #ifdef BUILD_ROGUE - #include "../depends/x86_64-unknown-linux-gnu/include/db_cxx.h" + #ifdef __APPLE__ + #include "../depends/x86_64-apple-darwin18.6.0/include/db_cxx.h" + #elif defined(_WIN32) + #include "../depends/x86_64-w64-mingw32/include/db_cxx.h" + #else + #include "../depends/x86_64-unknown-linux-gnu/include/db_cxx.h" + #endif #else #include #endif From 77ceea9b15051e8d15031f1ca5405b8186d23793 Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 10 Jun 2019 00:32:19 +0200 Subject: [PATCH 34/65] fix multi OS build --- src/cc/makerogue | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cc/makerogue b/src/cc/makerogue index a389ba2dd..ff16cbb16 100755 --- a/src/cc/makerogue +++ b/src/cc/makerogue @@ -35,6 +35,3 @@ else echo ROGUE BUILD FAILED exit 1 fi - -rm ../libcc.so -cp librogue.so ../libcc.so From 507cb56c5dbcd413a98342e7a574409cf31553a4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 9 Jun 2019 21:33:46 -1100 Subject: [PATCH 35/65] Tweak batches --- src/cc/dapps/zmigrate.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index 5144b4cf4..056d2c402 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -1083,12 +1083,12 @@ void scan_claims(int32_t issueflag,char *refcoin,int32_t batchid) } else if ( batchid == 2 ) { - batchmin = 777 * SATOSHIDEN; - batchmax = 7777 * SATOSHIDEN; + batchmin = 1;//777 * SATOSHIDEN; + batchmax = 17777 * SATOSHIDEN; } else if ( batchid == 3 ) { - batchmin = 7777 * SATOSHIDEN; + batchmin = 17777 * SATOSHIDEN; batchmax = 1000000 * SATOSHIDEN; } for (i=0; i Date: Sun, 9 Jun 2019 22:12:54 -1100 Subject: [PATCH 36/65] Asset chains dust --- src/cc/dapps/zmigrate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index 056d2c402..6e5cffba1 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -315,6 +315,8 @@ cJSON *get_komodocli(char *refcoin,char **retstrp,char *acname,char *method,char { long fsize; cJSON *retjson = 0; char cmdstr[32768],*jsonstr,fname[256]; sprintf(fname,"/tmp/zmigrate.%s",method); + if ( (acname == 0 || acname[0] == 0) && strcmp(refcoin,"KMD") != 0 ) + acname = refcoin; if ( acname[0] != 0 ) { if ( refcoin[0] != 0 && strcmp(refcoin,"KMD") != 0 ) @@ -1328,7 +1330,7 @@ int32_t main(int32_t argc,char **argv) } printf("total disputed %.8f\n",dstr(totaldisputed)); totaldisputed2 = 0; - if ( (retjson= get_listunspent(coinstr,"")) != 0 ) + if ( strcmp(coinstr,"KMD") == 0 && (retjson= get_listunspent(coinstr,"")) != 0 ) { if ( (n= cJSON_GetArraySize(retjson)) > 0 ) { From c9a943a86ef59bca5679c580d6eb911ad94fae0a Mon Sep 17 00:00:00 2001 From: Alrighttt Date: Mon, 10 Jun 2019 10:50:23 +0000 Subject: [PATCH 37/65] add oracles, faucet to DICE; add tokens to COQUI --- src/komodo_utils.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 93d4f245e..08e821318 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -2313,6 +2313,8 @@ void komodo_args(char *argv0) ASSETCHAINS_CCDISABLES[230] = 0; // DICE ASSETCHAINS_CCDISABLES[235] = 0; // CHANNELS ASSETCHAINS_CCDISABLES[236] = 0; // ORACLES + ASSETCHAINS_CCDISABLES[227] = 0; // ASSETS + ASSETCHAINS_CCDISABLES[242] = 0; // TOKENS } if ( strcmp("DION",ASSETCHAINS_SYMBOL) == 0 ) { @@ -2348,7 +2350,9 @@ void komodo_args(char *argv0) if ( strcmp("KMDICE",ASSETCHAINS_SYMBOL) == 0 ) { memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + ASSETCHAINS_CCDISABLES[228] = 0; // FAUCET ASSETCHAINS_CCDISABLES[230] = 0; // DICE + ASSETCHAINS_CCDISABLES[236] = 0; // ORACLES } } else BITCOIND_RPCPORT = GetArg("-rpcport", BaseParams().RPCPort()); KOMODO_DPOWCONFS = GetArg("-dpowconfs",dpowconfs); From 4993e1c4778d85b1cb0cba674a905c4d89f3d74b Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 10 Jun 2019 00:06:04 -1100 Subject: [PATCH 38/65] +pritns --- src/cc/dapps/zmigrate.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index 6e5cffba1..0d1dcd5b7 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -1246,7 +1246,7 @@ int64_t sum_of_vins(char *refcoin,int32_t *totalvinsp,int32_t *uniqaddrsp,bits25 { if ( update_addrstats(srcaddr,amount) < 0 ) (*uniqaddrsp)++; - //printf("add %s <- %.8f\n",srcaddr,dstr(amount)); + printf("add %s <- %.8f\n",srcaddr,dstr(amount)); total += amount; (*totalvinsp)++; } @@ -1391,6 +1391,7 @@ int32_t main(int32_t argc,char **argv) } else if ( (retjson= get_listunspent(coinstr,"")) != 0 ) { + printf("unspents.(%s)\n",jprint(retjson,0)); if ( (n= cJSON_GetArraySize(retjson)) > 0 ) { for (i=0; i= 7 ) - { - numsmall++; - smallpayout += payout; + //if ( payout >= 7 ) + //{ + // numsmall++; + //smallpayout += payout; genpayout(coinstr,ADDRESSES[i].addr,payout); - } + //} //printf("%-4d: %-64s numutxos.%-4lld %llu\n",i,ADDRESSES[i].addr,ADDRESSES[i].numutxos,(long long)payout); } } From 553f53f11f972ada1f55fc8a88ba3f29ec63ec23 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 10 Jun 2019 00:11:59 -1100 Subject: [PATCH 39/65] +prints --- src/cc/dapps/zmigrate.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index 0d1dcd5b7..9880cd437 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -331,6 +331,7 @@ cJSON *get_komodocli(char *refcoin,char **retstrp,char *acname,char *method,char //printf("ref.(%s) REFCOIN_CLI (%s)\n",refcoin,cmdstr); } system(cmdstr); + printf("cmdstr(%s)\n",cmdstr); *retstrp = 0; if ( (jsonstr= filestr(&fsize,fname)) != 0 ) { @@ -1299,7 +1300,7 @@ void reconcile_claims(char *fname) int32_t main(int32_t argc,char **argv) { - char *coinstr,*addr,buf[64],srcaddr[64],str[65]; cJSON *retjson,*item; int32_t i,n,disputed,numdisputed,numsmall=0,numpayouts=0,numclaims=0,num=0,totalvins=0,uniqaddrs=0; int64_t amount,total = 0,total2 = 0,payout,maxpayout,smallpayout=0,totalpayout = 0,totaldisputed = 0,totaldisputed2 = 0,fundingamount = 0; + char *coinstr,*acstr,*addr,buf[64],srcaddr[64],str[65]; cJSON *retjson,*item; int32_t i,n,disputed,numdisputed,numsmall=0,numpayouts=0,numclaims=0,num=0,totalvins=0,uniqaddrs=0; int64_t amount,total = 0,total2 = 0,payout,maxpayout,smallpayout=0,totalpayout = 0,totaldisputed = 0,totaldisputed2 = 0,fundingamount = 0; if ( argc != 2 ) { printf("argc needs to be 2: coin\n"); @@ -1309,12 +1310,14 @@ int32_t main(int32_t argc,char **argv) { REFCOIN_CLI = "./komodo-cli"; coinstr = clonestr("KMD"); + acstr = ""; } else { sprintf(buf,"./komodo-cli -ac_name=%s",argv[1]); REFCOIN_CLI = clonestr(buf); coinstr = clonestr(argv[1]); + acstr = coinstr; } if ( 1 ) { @@ -1330,7 +1333,7 @@ int32_t main(int32_t argc,char **argv) } printf("total disputed %.8f\n",dstr(totaldisputed)); totaldisputed2 = 0; - if ( strcmp(coinstr,"KMD") == 0 && (retjson= get_listunspent(coinstr,"")) != 0 ) + if ( strcmp(coinstr,"KMD") == 0 && (retjson= get_listunspent(coinstr,acstr)) != 0 ) { if ( (n= cJSON_GetArraySize(retjson)) > 0 ) { @@ -1389,7 +1392,7 @@ int32_t main(int32_t argc,char **argv) scan_claims(0,coinstr,2); //scan_claims(0,coinstr,3); } - else if ( (retjson= get_listunspent(coinstr,"")) != 0 ) + else if ( (retjson= get_listunspent(coinstr,acstr)) != 0 ) { printf("unspents.(%s)\n",jprint(retjson,0)); if ( (n= cJSON_GetArraySize(retjson)) > 0 ) From 5197c502e92696bc488161fdfa53f52b5ec4f3a6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 10 Jun 2019 00:13:50 -1100 Subject: [PATCH 40/65] Fix ac --- src/cc/dapps/zmigrate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index 9880cd437..4f5efc5ac 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -331,7 +331,6 @@ cJSON *get_komodocli(char *refcoin,char **retstrp,char *acname,char *method,char //printf("ref.(%s) REFCOIN_CLI (%s)\n",refcoin,cmdstr); } system(cmdstr); - printf("cmdstr(%s)\n",cmdstr); *retstrp = 0; if ( (jsonstr= filestr(&fsize,fname)) != 0 ) { @@ -1319,7 +1318,7 @@ int32_t main(int32_t argc,char **argv) coinstr = clonestr(argv[1]); acstr = coinstr; } - if ( 1 ) + if ( strcmp(coinstr,"KMD") == 0 ) { sprintf(buf,"%s-Claims.csv",coinstr); reconcile_claims(buf); @@ -1333,7 +1332,7 @@ int32_t main(int32_t argc,char **argv) } printf("total disputed %.8f\n",dstr(totaldisputed)); totaldisputed2 = 0; - if ( strcmp(coinstr,"KMD") == 0 && (retjson= get_listunspent(coinstr,acstr)) != 0 ) + if ( (retjson= get_listunspent(coinstr,acstr)) != 0 ) { if ( (n= cJSON_GetArraySize(retjson)) > 0 ) { From eb99b6f6623a00d1c4ad94355b2db22110cf602a Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 10 Jun 2019 00:14:48 -1100 Subject: [PATCH 41/65] -print --- src/cc/dapps/zmigrate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index 4f5efc5ac..aaad17a39 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -315,8 +315,8 @@ cJSON *get_komodocli(char *refcoin,char **retstrp,char *acname,char *method,char { long fsize; cJSON *retjson = 0; char cmdstr[32768],*jsonstr,fname[256]; sprintf(fname,"/tmp/zmigrate.%s",method); - if ( (acname == 0 || acname[0] == 0) && strcmp(refcoin,"KMD") != 0 ) - acname = refcoin; + //if ( (acname == 0 || acname[0] == 0) && strcmp(refcoin,"KMD") != 0 ) + // acname = refcoin; if ( acname[0] != 0 ) { if ( refcoin[0] != 0 && strcmp(refcoin,"KMD") != 0 ) @@ -1393,7 +1393,6 @@ int32_t main(int32_t argc,char **argv) } else if ( (retjson= get_listunspent(coinstr,acstr)) != 0 ) { - printf("unspents.(%s)\n",jprint(retjson,0)); if ( (n= cJSON_GetArraySize(retjson)) > 0 ) { for (i=0; i Date: Mon, 10 Jun 2019 20:51:52 +0800 Subject: [PATCH 42/65] Change ccEnable/Disable to macro --- src/cc/CCinclude.h | 2 ++ src/komodo_utils.h | 47 +++++++++++++++++++++++----------------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/cc/CCinclude.h b/src/cc/CCinclude.h index 3681cf2f3..d9f08f624 100644 --- a/src/cc/CCinclude.h +++ b/src/cc/CCinclude.h @@ -59,6 +59,8 @@ one other technical note is that komodod has the insight-explorer extensions bui #define SMALLVAL 0.000000000000001 #define SATOSHIDEN ((uint64_t)100000000L) #define dstr(x) ((double)(x) / SATOSHIDEN) +#define CCDISABLE memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)) +#define CCENABLE 0 #ifndef _BITS256 #define _BITS256 diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 08e821318..36bbb42fb 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -14,6 +14,7 @@ ******************************************************************************/ #include "komodo_defs.h" #include "key_io.h" +#include "cc/CCinclude.h" #include #ifdef _WIN32 @@ -2299,60 +2300,60 @@ void komodo_args(char *argv0) // Set cc enables for all existing ac_cc chains here. if ( strcmp("AXO",ASSETCHAINS_SYMBOL) == 0 ) { - // No CCs used on this chain yet please ask AXO777 what he needs. - memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + // No CCs used on this chain yet. + CCDISABLE; } if ( strcmp("CCL",ASSETCHAINS_SYMBOL) == 0 ) { // No CCs used on this chain yet. - memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + CCDISABLE; } if ( strcmp("COQUI",ASSETCHAINS_SYMBOL) == 0 ) { - memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); - ASSETCHAINS_CCDISABLES[230] = 0; // DICE - ASSETCHAINS_CCDISABLES[235] = 0; // CHANNELS - ASSETCHAINS_CCDISABLES[236] = 0; // ORACLES - ASSETCHAINS_CCDISABLES[227] = 0; // ASSETS - ASSETCHAINS_CCDISABLES[242] = 0; // TOKENS + CCDISABLE; + ASSETCHAINS_CCDISABLES[230] = CCENABLE;; // DICE + ASSETCHAINS_CCDISABLES[235] = CCENABLE;; // CHANNELS + ASSETCHAINS_CCDISABLES[236] = CCENABLE;; // ORACLES + ASSETCHAINS_CCDISABLES[227] = CCENABLE;; // ASSETS + ASSETCHAINS_CCDISABLES[242] = CCENABLE;; // TOKENS } if ( strcmp("DION",ASSETCHAINS_SYMBOL) == 0 ) { // No CCs used on this chain yet. - memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + CCDISABLE; } if ( strcmp("EQL",ASSETCHAINS_SYMBOL) == 0 ) { // No CCs used on this chain yet. - memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + CCDISABLE; } if ( strcmp("ILN",ASSETCHAINS_SYMBOL) == 0 ) { // No CCs used on this chain yet. - memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); + CCDISABLE; } if ( strcmp("MORTY",ASSETCHAINS_SYMBOL) == 0 ) { - memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); - ASSETCHAINS_CCDISABLES[228] = 0; // FAUCET + CCDISABLE; + ASSETCHAINS_CCDISABLES[228] = CCENABLE;; // FAUCET } if ( strcmp("RICK",ASSETCHAINS_SYMBOL) == 0 ) { - memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); - ASSETCHAINS_CCDISABLES[228] = 1; // FAUCET + CCDISABLE; + ASSETCHAINS_CCDISABLES[228] = CCENABLE;; // FAUCET } if ( strcmp("SEC",ASSETCHAINS_SYMBOL) == 0 ) { - memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); - ASSETCHAINS_CCDISABLES[227] = 0; // ASSETS - ASSETCHAINS_CCDISABLES[242] = 0; // TOKENS + CCDISABLE; + ASSETCHAINS_CCDISABLES[227] = CCENABLE;; // ASSETS + ASSETCHAINS_CCDISABLES[242] = CCENABLE;; // TOKENS } if ( strcmp("KMDICE",ASSETCHAINS_SYMBOL) == 0 ) { - memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)); - ASSETCHAINS_CCDISABLES[228] = 0; // FAUCET - ASSETCHAINS_CCDISABLES[230] = 0; // DICE - ASSETCHAINS_CCDISABLES[236] = 0; // ORACLES + CCDISABLE; + ASSETCHAINS_CCDISABLES[228] = CCENABLE;; // FAUCET + ASSETCHAINS_CCDISABLES[230] = CCENABLE;; // DICE + ASSETCHAINS_CCDISABLES[236] = CCENABLE;; // ORACLES } } else BITCOIND_RPCPORT = GetArg("-rpcport", BaseParams().RPCPort()); KOMODO_DPOWCONFS = GetArg("-dpowconfs",dpowconfs); From fd23e3a914d09d2a6dbdc9997fc84945a96b9712 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 10 Jun 2019 23:30:13 +0800 Subject: [PATCH 43/65] add -ac_ccactivateht=. Fix oracles timestamp activation, to stop loading block from disk for no reason. --- src/cc/eval.cpp | 9 +++++++-- src/cc/oracles.cpp | 7 +------ src/komodo_defs.h | 2 ++ src/komodo_globals.h | 2 ++ src/komodo_utils.h | 23 ++++++++++++++++++++++- src/wallet/rpcwallet.cpp | 9 +++++++-- 6 files changed, 41 insertions(+), 11 deletions(-) diff --git a/src/cc/eval.cpp b/src/cc/eval.cpp index a23a7b16c..c580753cf 100644 --- a/src/cc/eval.cpp +++ b/src/cc/eval.cpp @@ -78,8 +78,13 @@ bool Eval::Dispatch(const CC *cond, const CTransaction &txTo, unsigned int nIn) uint8_t ecode = cond->code[0]; if ( ASSETCHAINS_CCDISABLES[ecode] != 0 ) { - fprintf(stderr,"%s evalcode.%d %02x\n",txTo.GetHash().GetHex().c_str(),ecode,ecode); - return Invalid("disabled-code, -ac_ccenables didnt include this ecode"); + // check if a height activation has been set. + if ( mapHeightEvalActivate[ecode] == 0 || this->GetCurrentHeight() == 0 || mapHeightEvalActivate[ecode] > this->GetCurrentHeight() ) + { + fprintf(stderr,"%s evalcode.%d %02x\n",txTo.GetHash().GetHex().c_str(),ecode,ecode); + fprintf(stderr, "ac_ccactivateht: evalcode.%i activates at height.%i vs current height.%i\n", ecode, mapHeightEvalActivate[ecode], this->GetCurrentHeight()); + return Invalid("disabled-code, -ac_ccenables didnt include this ecode"); + } } std::vector vparams(cond->code+1, cond->code+cond->codeLength); if ( ecode >= EVAL_FIRSTUSER && ecode <= EVAL_LASTUSER ) diff --git a/src/cc/oracles.cpp b/src/cc/oracles.cpp index f019ae271..193f66a1a 100644 --- a/src/cc/oracles.cpp +++ b/src/cc/oracles.cpp @@ -642,11 +642,7 @@ int32_t GetLatestTimestamp(int32_t height) blockHash = chainActive[height]->GetBlockHash(); pindex = mapBlockIndex[blockHash]; - if ( komodo_blockload(block,pindex) == 0 ) - { - return(block.nTime); - } - return(0); + return(pindex->nTime); } bool OraclesValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx, uint32_t nIn) @@ -1208,4 +1204,3 @@ UniValue OraclesList() } return(result); } - diff --git a/src/komodo_defs.h b/src/komodo_defs.h index 36e26a310..226600d6f 100644 --- a/src/komodo_defs.h +++ b/src/komodo_defs.h @@ -303,6 +303,7 @@ extern int32_t KOMODO_TESTNODE, KOMODO_SNAPSHOT_INTERVAL; extern int32_t ASSETCHAINS_EARLYTXIDCONTRACT; int tx_height( const uint256 &hash ); extern std::vector vWhiteListAddress; +extern std::map mapHeightEvalActivate; void komodo_netevent(std::vector payload); int32_t getacseason(uint32_t timestamp); @@ -333,6 +334,7 @@ uint32_t komodo_heightstamp(int32_t height); int64_t komodo_pricemult(int32_t ind); int32_t komodo_priceget(int64_t *buf64,int32_t ind,int32_t height,int32_t numblocks); uint64_t komodo_accrued_interest(int32_t *txheightp,uint32_t *locktimep,uint256 hash,int32_t n,int32_t checkheight,uint64_t checkvalue,int32_t tipheight); +int32_t komodo_currentheight(); #endif diff --git a/src/komodo_globals.h b/src/komodo_globals.h index 9d6d97100..d8e292431 100644 --- a/src/komodo_globals.h +++ b/src/komodo_globals.h @@ -115,6 +115,8 @@ int32_t KOMODO_TESTNODE, KOMODO_SNAPSHOT_INTERVAL; CScript KOMODO_EARLYTXID_SCRIPTPUB; int32_t ASSETCHAINS_EARLYTXIDCONTRACT; +std::map mapHeightEvalActivate; + struct komodo_kv *KOMODO_KV; pthread_mutex_t KOMODO_KV_mutex,KOMODO_CC_mutex; diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 36bbb42fb..4bcd9d7da 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1692,7 +1692,7 @@ int8_t equihash_params_possible(uint64_t n, uint64_t k) void komodo_args(char *argv0) { - std::string name,addn,hexstr,symbol; char *dirname,fname[512],arg0str[64],magicstr[9]; uint8_t magic[4],extrabuf[32756],disablebits[32],*extraptr=0; FILE *fp; uint64_t val; uint16_t port; int32_t i,nonz=0,baseid,len,n,extralen = 0; uint64_t ccenables[256]; + std::string name,addn,hexstr,symbol; char *dirname,fname[512],arg0str[64],magicstr[9]; uint8_t magic[4],extrabuf[32756],disablebits[32],*extraptr=0; FILE *fp; uint64_t val; uint16_t port; int32_t i,nonz=0,baseid,len,n,extralen = 0; uint64_t ccenables[256], ccEnablesHeight[512]; IS_KOMODO_NOTARY = GetBoolArg("-notary", false); IS_STAKED_NOTARY = GetArg("-stakednotary", -1); memset(ccenables,0,sizeof(ccenables)); @@ -1757,6 +1757,27 @@ void komodo_args(char *argv0) ASSETCHAINS_PRIVATE = GetArg("-ac_private",0); KOMODO_SNAPSHOT_INTERVAL = GetArg("-ac_snapshot",0); Split(GetArg("-ac_nk",""), ASSETCHAINS_NK, 0); + + // -ac_ccactivateht=evalcode,height,evalcode,height,evalcode,height.... + Split(GetArg("-ac_ccactivateht",""), ccEnablesHeight, 0); + // fill map with all eval codes and activation height of 0. + for ( int i = 0; i < 256; i++ ) + mapHeightEvalActivate[i] = 0; + for ( int i = 0; i < 512; i++ ) + { + int32_t ecode = ccEnablesHeight[i]; + int32_t ht = ccEnablesHeight[i+1]; + if ( ecode > 256 ) + fprintf(stderr, "ac_ccactivateht: invalid evalcode.%i must be between 0 and 256.\n", ecode); + else if ( ht > 0 ) + { + // update global map. + mapHeightEvalActivate[ecode] = ht; + fprintf(stderr, "ac_ccactivateht: ecode.%i activates at height.%i\n", ecode, mapHeightEvalActivate[ecode]); + } + i++; + } + if ( (KOMODO_REWIND= GetArg("-rewind",0)) != 0 ) { printf("KOMODO_REWIND %d\n",KOMODO_REWIND); diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index aa5876e23..bf861662f 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -5342,8 +5342,13 @@ int32_t ensure_CCrequirements(uint8_t evalcode) CCerror = ""; if ( ASSETCHAINS_CCDISABLES[evalcode] != 0 || (evalcode == EVAL_MARMARA && ASSETCHAINS_MARMARA == 0) ) { - fprintf(stderr,"evalcode %d disabled\n",evalcode); - return(-1); + // check if a height activation has been set. + fprintf(stderr, "evalcode.%i activates at height. %i current height.%i\n", evalcode, mapHeightEvalActivate[evalcode], komodo_currentheight()); + if ( mapHeightEvalActivate[evalcode] == 0 || komodo_currentheight() == 0 || mapHeightEvalActivate[evalcode] > komodo_currentheight() ) + { + fprintf(stderr,"evalcode %d disabled\n",evalcode); + return(-1); + } } if ( NOTARY_PUBKEY33[0] == 0 ) { From cab05f7f01889b93aa23d05475b78dc1fde0725d Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 10 Jun 2019 23:53:11 +0800 Subject: [PATCH 44/65] fix --- src/cc/CCinclude.h | 4 ++-- src/komodo_utils.h | 50 ++++++++++++++++++++++++---------------------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/cc/CCinclude.h b/src/cc/CCinclude.h index d9f08f624..1d8cf669e 100644 --- a/src/cc/CCinclude.h +++ b/src/cc/CCinclude.h @@ -59,8 +59,8 @@ one other technical note is that komodod has the insight-explorer extensions bui #define SMALLVAL 0.000000000000001 #define SATOSHIDEN ((uint64_t)100000000L) #define dstr(x) ((double)(x) / SATOSHIDEN) -#define CCDISABLE memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)) -#define CCENABLE 0 +#define CCDISABLEALL memset(ASSETCHAINS_CCDISABLES,1,sizeof(ASSETCHAINS_CCDISABLES)) +#define CCENABLE(x) ASSETCHAINS_CCDISABLES[((uint8_t)x)] = 0 #ifndef _BITS256 #define _BITS256 diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 4bcd9d7da..94ac60515 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -2322,59 +2322,61 @@ void komodo_args(char *argv0) if ( strcmp("AXO",ASSETCHAINS_SYMBOL) == 0 ) { // No CCs used on this chain yet. - CCDISABLE; + CCDISABLEALL; } if ( strcmp("CCL",ASSETCHAINS_SYMBOL) == 0 ) { // No CCs used on this chain yet. - CCDISABLE; + CCDISABLEALL; } if ( strcmp("COQUI",ASSETCHAINS_SYMBOL) == 0 ) { - CCDISABLE; - ASSETCHAINS_CCDISABLES[230] = CCENABLE;; // DICE - ASSETCHAINS_CCDISABLES[235] = CCENABLE;; // CHANNELS - ASSETCHAINS_CCDISABLES[236] = CCENABLE;; // ORACLES - ASSETCHAINS_CCDISABLES[227] = CCENABLE;; // ASSETS - ASSETCHAINS_CCDISABLES[242] = CCENABLE;; // TOKENS + CCDISABLEALL; + CCENABLE(EVAL_DICE); + CCENABLE(EVAL_CHANNELS); + CCENABLE(EVAL_ORACLES); + CCENABLE(EVAL_ASSETS); + CCENABLE(EVAL_TOKENS); } if ( strcmp("DION",ASSETCHAINS_SYMBOL) == 0 ) { // No CCs used on this chain yet. - CCDISABLE; + CCDISABLEALL; } + if ( strcmp("EQL",ASSETCHAINS_SYMBOL) == 0 ) { // No CCs used on this chain yet. - CCDISABLE; + CCDISABLEALL; } if ( strcmp("ILN",ASSETCHAINS_SYMBOL) == 0 ) { // No CCs used on this chain yet. - CCDISABLE; + CCDISABLEALL; } - if ( strcmp("MORTY",ASSETCHAINS_SYMBOL) == 0 ) + if ( strcmp("OUR",ASSETCHAINS_SYMBOL) == 0 ) { - CCDISABLE; - ASSETCHAINS_CCDISABLES[228] = CCENABLE;; // FAUCET + // No CCs used on this chain yet. + CCDISABLEALL; } - if ( strcmp("RICK",ASSETCHAINS_SYMBOL) == 0 ) + if ( strcmp("ZEXO",ASSETCHAINS_SYMBOL) == 0 ) { - CCDISABLE; - ASSETCHAINS_CCDISABLES[228] = CCENABLE;; // FAUCET + // No CCs used on this chain yet. + CCDISABLEALL; } if ( strcmp("SEC",ASSETCHAINS_SYMBOL) == 0 ) { - CCDISABLE; - ASSETCHAINS_CCDISABLES[227] = CCENABLE;; // ASSETS - ASSETCHAINS_CCDISABLES[242] = CCENABLE;; // TOKENS + CCDISABLEALL; + CCENABLE(EVAL_ASSETS); + CCENABLE(EVAL_TOKENS); + CCENABLE(EVAL_ORACLES); } if ( strcmp("KMDICE",ASSETCHAINS_SYMBOL) == 0 ) { - CCDISABLE; - ASSETCHAINS_CCDISABLES[228] = CCENABLE;; // FAUCET - ASSETCHAINS_CCDISABLES[230] = CCENABLE;; // DICE - ASSETCHAINS_CCDISABLES[236] = CCENABLE;; // ORACLES + CCDISABLEALL; + CCENABLE(EVAL_FAUCET); + CCENABLE(EVAL_DICE); + CCENABLE(EVAL_ORACLES); } } else BITCOIND_RPCPORT = GetArg("-rpcport", BaseParams().RPCPort()); KOMODO_DPOWCONFS = GetArg("-dpowconfs",dpowconfs); From 1403eb6cf7373b662b4e5a2ff8b151ddb2046fed Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 10 Jun 2019 18:18:09 +0200 Subject: [PATCH 45/65] bump version bump version for the hardfork --- src/rpc/misc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index eca4abb36..95c2cc343 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -78,7 +78,7 @@ int8_t StakedNotaryID(std::string ¬aryname, char *Raddress); uint64_t komodo_notarypayamount(int32_t nHeight, int64_t notarycount); int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp); -#define KOMODO_VERSION "0.3.3b" +#define KOMODO_VERSION "0.4.0a" #define VERUS_VERSION "0.4.0g" extern uint16_t ASSETCHAINS_P2PPORT,ASSETCHAINS_RPCPORT; extern uint32_t ASSETCHAINS_CC; From a581ac5e1b6cbbc2c74eb253bb4861b5038e7c7e Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 28 Nov 2018 00:56:42 +0100 Subject: [PATCH 46/65] wallet: Skip transactions with no shielded data in CWallet::SetBestChain() Co-authored-by: Daira Hopwood Closes #3495. --- src/wallet/gtest/test_wallet.cpp | 57 ++++++++++++++++++++++++++++++++ src/wallet/wallet.h | 15 ++++++--- 2 files changed, 68 insertions(+), 4 deletions(-) diff --git a/src/wallet/gtest/test_wallet.cpp b/src/wallet/gtest/test_wallet.cpp index 1fe9db11a..676239d0b 100644 --- a/src/wallet/gtest/test_wallet.cpp +++ b/src/wallet/gtest/test_wallet.cpp @@ -1680,6 +1680,63 @@ TEST(WalletTests, WriteWitnessCache) { wallet.SetBestChain(walletdb, loc); } +TEST(WalletTests, SetBestChainIgnoresTxsWithoutShieldedData) { + SelectParams(CBaseChainParams::REGTEST); + + TestWallet wallet; + MockWalletDB walletdb; + CBlockLocator loc; + + // Set up transparent address + CKey tsk = DecodeSecret(tSecretRegtest); + wallet.AddKey(tsk); + auto scriptPubKey = GetScriptForDestination(tsk.GetPubKey().GetID()); + + // Set up a Sprout address + auto sk = libzcash::SproutSpendingKey::random(); + wallet.AddSproutSpendingKey(sk); + + // Generate a transparent transaction that is ours + CMutableTransaction t; + t.vout.resize(1); + t.vout[0].nValue = 90*CENT; + t.vout[0].scriptPubKey = scriptPubKey; + CWalletTx wtxTransparent {nullptr, t}; + wallet.AddToWallet(wtxTransparent, true, NULL); + + // Generate a Sprout transaction that is ours + auto wtxSprout = GetValidReceive(sk, 10, true); + auto noteMap = wallet.FindMySproutNotes(wtxSprout); + wtxSprout.SetSproutNoteData(noteMap); + wallet.AddToWallet(wtxSprout, true, NULL); + + // Generate a Sprout transaction that only involves our transparent address + auto sk2 = libzcash::SproutSpendingKey::random(); + auto wtxInput = GetValidReceive(sk2, 10, true); + auto note = GetNote(sk2, wtxInput, 0, 0); + auto wtxTmp = GetValidSpend(sk2, note, 5); + CMutableTransaction mtx {wtxTmp}; + mtx.vout[0].scriptPubKey = scriptPubKey; + CWalletTx wtxSproutTransparent {NULL, mtx}; + wallet.AddToWallet(wtxSproutTransparent, true, NULL); + + EXPECT_CALL(walletdb, TxnBegin()) + .WillOnce(Return(true)); + EXPECT_CALL(walletdb, WriteTx(wtxTransparent.GetHash(), wtxTransparent)) + .Times(0); + EXPECT_CALL(walletdb, WriteTx(wtxSprout.GetHash(), wtxSprout)) + .Times(1).WillOnce(Return(true)); + EXPECT_CALL(walletdb, WriteTx(wtxSproutTransparent.GetHash(), wtxSproutTransparent)) + .Times(0); + EXPECT_CALL(walletdb, WriteWitnessCacheSize(0)) + .WillOnce(Return(true)); + EXPECT_CALL(walletdb, WriteBestBlock(loc)) + .WillOnce(Return(true)); + EXPECT_CALL(walletdb, TxnCommit()) + .WillOnce(Return(true)); + wallet.SetBestChain(walletdb, loc); +} + TEST(WalletTests, UpdateSproutNullifierNoteMap) { TestWallet wallet; uint256 r {GetRandHash()}; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index b00365a77..296e2fa57 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -807,10 +807,17 @@ protected: } try { for (std::pair& wtxItem : mapWallet) { - if (!walletdb.WriteTx(wtxItem.first, wtxItem.second)) { - LogPrintf("SetBestChain(): Failed to write CWalletTx, aborting atomic write\n"); - walletdb.TxnAbort(); - return; + auto wtx = wtxItem.second; + // We skip transactions for which mapSproutNoteData and mapSaplingNoteData + // are empty. This covers transactions that have no Sprout or Sapling data + // (i.e. are purely transparent), as well as shielding and unshielding + // transactions in which we only have transparent addresses involved. + if (!(wtx.mapSproutNoteData.empty() && wtx.mapSaplingNoteData.empty())) { + if (!walletdb.WriteTx(wtxItem.first, wtx)) { + LogPrintf("SetBestChain(): Failed to write CWalletTx, aborting atomic write\n"); + walletdb.TxnAbort(); + return; + } } } if (!walletdb.WriteWitnessCacheSize(nWitnessCacheSize)) { From 1fa094905015b1e23ef2bf8aea3a690040e3d8a3 Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 10 Jun 2019 19:31:51 +0200 Subject: [PATCH 47/65] add customcc makefile --- src/cc/Makefile_custom | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/cc/Makefile_custom diff --git a/src/cc/Makefile_custom b/src/cc/Makefile_custom new file mode 100644 index 000000000..819ededc9 --- /dev/null +++ b/src/cc/Makefile_custom @@ -0,0 +1,38 @@ +SHELL = /bin/sh +CC = gcc +CC_DARWIN = g++-8 +CC_WIN = x86_64-w64-mingw32-gcc-posix +CFLAGS_DARWIN = -DBUILD_CUSTOMCC -std=c++11 -arch x86_64 -I../secp256k1/include -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -Wl,-undefined -Wl,dynamic_lookup -Wno-write-strings -shared -dynamiclib +CFLAGS = -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared +CFLAGS_WIN = -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I./rogue/x86_64-w64-mingw32/include -I./rogue/x86_64-w64-mingw32/include/ncursesw -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared +DEBUGFLAGS = -O0 -D _DEBUG +RELEASEFLAGS = -O2 -D NDEBUG -combine -fwhole-program +$(info $(OS)) +OS := $(shell uname -s) +$(info $(OS)) +TARGET = customcc.so +TARGET_DARWIN = customcc.dylib +TARGET_WIN = customcc.dll +SOURCES = cclib.cpp +#HEADERS = $(shell echo ../cryptoconditions/include/*.h) -I/usr/local/Cellar/gcc\@8/8.3.0/include/c++/8.3.0/ + +all: $(TARGET) + +$(TARGET): $(SOURCES) + $(info Building cclib to src/) +ifeq ($(OS),Darwin) + $(CC_DARWIN) $(CFLAGS_DARWIN) $(DEBUGFLAGS) -o $(TARGET_DARWIN) -c $(SOURCES) + cp $(TARGET_DARWIN) ../libcc.dylib +else ifeq ($(HOST),x86_64-w64-mingw32) + $(info WINDOWS) + $(CC_WIN) $(CFLAGS_WIN) $(DEBUGFLAGS) -o $(TARGET_WIN) -c $(SOURCES) + cp $(TARGET_WIN) ../libcc.dll +#else ifeq ($(WIN_HOST),True) - todo: pass ENV var from build.sh if WIN host +else + $(info LINUX) + $(CC) $(CFLAGS) $(DEBUGFLAGS) -o $(TARGET) -c $(SOURCES) + cp $(TARGET) ../libcc.so +endif + +clean: + rm -rf $(TARGET) From e6a2ca7b6ca2154449d8fc6b1dfb29cb6d65dcff Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 10 Jun 2019 19:33:20 +0200 Subject: [PATCH 48/65] fix WIN --- src/cc/Makefile_custom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc/Makefile_custom b/src/cc/Makefile_custom index 819ededc9..f4b0cdb60 100644 --- a/src/cc/Makefile_custom +++ b/src/cc/Makefile_custom @@ -4,7 +4,7 @@ CC_DARWIN = g++-8 CC_WIN = x86_64-w64-mingw32-gcc-posix CFLAGS_DARWIN = -DBUILD_CUSTOMCC -std=c++11 -arch x86_64 -I../secp256k1/include -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -Wl,-undefined -Wl,dynamic_lookup -Wno-write-strings -shared -dynamiclib CFLAGS = -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -CFLAGS_WIN = -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I./rogue/x86_64-w64-mingw32/include -I./rogue/x86_64-w64-mingw32/include/ncursesw -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared +CFLAGS_WIN = -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared DEBUGFLAGS = -O0 -D _DEBUG RELEASEFLAGS = -O2 -D NDEBUG -combine -fwhole-program $(info $(OS)) From 8baa1690735364a48cf011a8ce623ab1cf421d4a Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 10 Jun 2019 19:44:30 +0200 Subject: [PATCH 49/65] use makefilecustom for OSX --- zcutil/build-mac.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zcutil/build-mac.sh b/zcutil/build-mac.sh index 89847ddac..57ee78e1d 100755 --- a/zcutil/build-mac.sh +++ b/zcutil/build-mac.sh @@ -47,7 +47,7 @@ make "$@" -C ./depends/ V=1 NO_QT=1 NO_PROTON=1 WD=$PWD cd src/cc echo $PWD -./makerogue +./Makefile_custom cd $WD ./autogen.sh From 150fc744305a8c0ce64fa13b6e47a286165bd321 Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 10 Jun 2019 20:25:08 +0200 Subject: [PATCH 50/65] chmod --- src/cc/Makefile_custom | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 src/cc/Makefile_custom diff --git a/src/cc/Makefile_custom b/src/cc/Makefile_custom old mode 100644 new mode 100755 From 962d885e31a85547cee59b63ed9818e4170f91eb Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 10 Jun 2019 20:31:24 +0200 Subject: [PATCH 51/65] fix win --- src/cc/makecustom | 11 ++++++----- zcutil/build-mac.sh | 2 +- zcutil/build-win.sh | 2 +- zcutil/build.sh | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/cc/makecustom b/src/cc/makecustom index 154be4f31..7f1c789c9 100755 --- a/src/cc/makecustom +++ b/src/cc/makecustom @@ -1,6 +1,7 @@ #!/bin/sh -gcc -O3 -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -c -o customcc.so cclib.cpp -cp customcc.so ../libcc.so -cd .. -make -cd cc +if make -f Makefile_custom "$@"; then + echo CUSTOMCC BUILD SUCCESSFUL +else + echo CUSTOMCC BUILD FAILED + exit 1 +fi diff --git a/zcutil/build-mac.sh b/zcutil/build-mac.sh index 57ee78e1d..3c0522a90 100755 --- a/zcutil/build-mac.sh +++ b/zcutil/build-mac.sh @@ -47,7 +47,7 @@ make "$@" -C ./depends/ V=1 NO_QT=1 NO_PROTON=1 WD=$PWD cd src/cc echo $PWD -./Makefile_custom +./makecustom cd $WD ./autogen.sh diff --git a/zcutil/build-win.sh b/zcutil/build-win.sh index 8cf1751af..e8c0465d9 100755 --- a/zcutil/build-win.sh +++ b/zcutil/build-win.sh @@ -14,7 +14,7 @@ cd ../ WD=$PWD cd src/cc echo $PWD -./makerogue +./makecustom cd $WD ./autogen.sh diff --git a/zcutil/build.sh b/zcutil/build.sh index df3dfa234..96e0b7c2c 100755 --- a/zcutil/build.sh +++ b/zcutil/build.sh @@ -106,7 +106,7 @@ CONFIG_SITE="$PWD/depends/$HOST/share/config.site" ./configure "$HARDENING_ARG" WD=$PWD cd src/cc echo $PWD -./makerogue +./makecustom cd $WD "$MAKE" "$@" V=1 From 87a849896180e3aeb2be258cd5a06161ea0889ba Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 10 Jun 2019 20:52:44 +0200 Subject: [PATCH 52/65] fix WIN --- src/cc/Makefile_custom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc/Makefile_custom b/src/cc/Makefile_custom index f4b0cdb60..79219ec96 100755 --- a/src/cc/Makefile_custom +++ b/src/cc/Makefile_custom @@ -4,7 +4,7 @@ CC_DARWIN = g++-8 CC_WIN = x86_64-w64-mingw32-gcc-posix CFLAGS_DARWIN = -DBUILD_CUSTOMCC -std=c++11 -arch x86_64 -I../secp256k1/include -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -Wl,-undefined -Wl,dynamic_lookup -Wno-write-strings -shared -dynamiclib CFLAGS = -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared -CFLAGS_WIN = -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared +CFLAGS_WIN = -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../../depends/x86_64-w64-mingw32/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -fPIC -shared DEBUGFLAGS = -O0 -D _DEBUG RELEASEFLAGS = -O2 -D NDEBUG -combine -fwhole-program $(info $(OS)) From 14421b7097c04887f315ec5ac970e0bf9f826c39 Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 10 Jun 2019 21:24:17 +0200 Subject: [PATCH 53/65] update gitlab --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7354b240..71ed197dc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,10 +71,8 @@ build:windows: - cp src/komodod.exe src/komodo-cli.exe src/komodo-tx.exe - src/cc/rogue/rogue.exe zcutil/fetch-params.bat - src/cc/rogue/x86_64-w64-mingw32/bin/libcurl-4.dll - src/cc/rogue/x86_64-w64-mingw32/bin/libncursesw6.dll + ${PACKAGE_DIR_WINDOWS} - zip -r ${PACKAGE_DIR_WINDOWS}.zip ${PACKAGE_DIR_WINDOWS} - md5sum ${AGAMA_ARTIFACTS_WINDOWS} > ${AGAMA_ARTIFACTS_WINDOWS_CHECKSUM} From adfea602f99bdfc01bef4d2e7e0c086ba2c0db6a Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 10 Jun 2019 21:52:18 +0200 Subject: [PATCH 54/65] rm /n --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 71ed197dc..945a7744a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -72,7 +72,6 @@ build:windows: src/komodo-cli.exe src/komodo-tx.exe zcutil/fetch-params.bat - ${PACKAGE_DIR_WINDOWS} - zip -r ${PACKAGE_DIR_WINDOWS}.zip ${PACKAGE_DIR_WINDOWS} - md5sum ${AGAMA_ARTIFACTS_WINDOWS} > ${AGAMA_ARTIFACTS_WINDOWS_CHECKSUM} From 086b9c717731aea1e6165c238949434da0880807 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Mon, 10 Jun 2019 23:32:12 +0300 Subject: [PATCH 55/65] dev --- src/komodo_defs.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/komodo_defs.h b/src/komodo_defs.h index 778b8c101..f30b24481 100644 --- a/src/komodo_defs.h +++ b/src/komodo_defs.h @@ -201,20 +201,20 @@ static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"cryptoeconomy_EU", "0290ab4937e85246e048552df3e9a66cba2c1602db76e03763e16c671e750145d1" }, {"etszombi_EU", "0293ea48d8841af7a419a24d9da11c34b39127ef041f847651bae6ab14dcd1f6b4" }, // 20 {"karasugoi_NA", "02a348b03b9c1a8eac1b56f85c402b041c9bce918833f2ea16d13452309052a982" }, - {"pirate_AR", "02a5e865af771eee0c6bd3bd238f01f5eb589907ba52efa9f37e5102375c8eb7a0" }, + {"pirate_AR", "03e29c90354815a750db8ea9cb3c1b9550911bb205f83d0355a061ac47c4cf2fde" }, {"metaphilibert_AR", "02adad675fae12b25fdd0f57250b0caf7f795c43f346153a31fe3e72e7db1d6ac6" }, {"zatjum_SH", "02d6b0c89cacd58a0af038139a9a90c9e02cd1e33803a1f15fceabea1f7e9c263a" }, {"madmax_AR", "03c5941fe49d673c094bc8e9bb1a95766b4670c88be76d576e915daf2c30a454d3" }, {"lukechilds_NA", "03f1051e62c2d280212481c62fe52aab0a5b23c95de5b8e9ad5f80d8af4277a64b" }, {"cipi_AR", "02c4f89a5b382750836cb787880d30e23502265054e1c327a5bfce67116d757ce8" }, {"tonyl_AR", "02cc8bc862f2b65ad4f99d5f68d3011c138bf517acdc8d4261166b0be8f64189e1" }, - {"infotech_DEV", "02d7d63ac441dbcd5535bcad741701519c190e89e17e4180aa0f61fdda0b6195ea" }, + {"infotech_DEV", "0345ad4ab5254782479f6322c369cec77a7535d2f2162d103d666917d5e4f30c4c" }, {"fullmoon_NA", "032c716701fe3a6a3f90a97b9d874a9d6eedb066419209eed7060b0cc6b710c60b" }, // 30 {"etszombi_AR", "02e55e104aa94f70cde68165d7df3e162d4410c76afd4643b161dea044aa6d06ce" }, - {"node-9_EU", "02e90f0528f8fd7d2b7f28d53ed7368cc4b1dfc5814c70c486c533862ee05e37dc" }, + {"node-9_EU", "0372e5b51e86e2392bb15039bac0c8f975b852b45028a5e43b324c294e9f12e411" }, {"phba2061_EU", "03f6bd15dba7e986f0c976ea19d8a9093cb7c989d499f1708a0386c5c5659e6c4e" }, {"indenodes_AR", "02ec0fa5a40f47fd4a38ea5c89e375ad0b6ddf4807c99733c9c3dc15fb978ee147" }, - {"and1-89_EU", "02f2af778c62888cfb106c0ef5c89cefe012ef3e6abed3ef28425092637d7ae3cc" }, + {"and1-89_EU", "02736cbf8d7b50835afd50a319f162dd4beffe65f2b1dc6b90e64b32c8e7849ddd" }, {"komodopioneers_SH", "032a238a5747777da7e819cfa3c859f3677a2daf14e4dce50916fc65d00ad9c52a" }, {"komodopioneers_EU", "036d02425916444fff8cc7203fcbfc155c956dda5ceb647505836bef59885b6866" }, {"d0ct0r_NA", "0303725d8525b6f969122faf04152653eb4bf34e10de92182263321769c334bf58" }, @@ -224,7 +224,7 @@ static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"webworker01_NA", "032735e9cad1bb00eaababfa6d27864fa4c1db0300c85e01e52176be2ca6a243ce" }, {"pbca26_NA", "03a97606153d52338bcffd1bf19bb69ef8ce5a7cbdc2dbc3ff4f89d91ea6bbb4dc" }, {"indenodes_SH", "0334e6e1ec8285c4b85bd6dae67e17d67d1f20e7328efad17ce6fd24ae97cdd65e" }, - {"pirate_NA", "033c8cef71f704f357c9ac1aeaafde3acd7bbfd0a09494e5e129ee0999fb2bc368" }, + {"pirate_NA", "0255e32d8a56671dee8aa7f717debb00efa7f0086ee802de0692f2d67ee3ee06ee" }, {"lukechilds_AR", "025c6a73ff6d750b9ddf6755b390948cffdd00f344a639472d398dd5c6b4735d23" }, {"dragonhound_NA", "0224a9d951d3a06d8e941cc7362b788bb1237bb0d56cc313e797eb027f37c2d375" }, {"fullmoon_AR", "03da64dd7cd0db4c123c2f79d548a96095a5a103e5b9d956e9832865818ffa7872" }, @@ -233,7 +233,7 @@ static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"jeezy_EU", "037f182facbad35684a6e960699f5da4ba89e99f0d0d62a87e8400dd086c8e5dd7" }, {"titomane_SH", "03850fdddf2413b51790daf51dd30823addb37313c8854b508ea6228205047ef9b" }, {"alien_AR", "03911a60395801082194b6834244fa78a3c30ff3e888667498e157b4aa80b0a65f" }, - {"pirate_EU", "03986339bebe3891e369a528356a220bc17a5bef3d337edfcf0114e66e6b1c120f" }, + {"pirate_EU", "03fff24efd5648870a23badf46e26510e96d9e79ce281b27cfe963993039dd1351" }, {"thegaltmines_NA", "02db1a16c7043f45d6033ccfbd0a51c2d789b32db428902f98b9e155cf0d7910ed" }, {"computergenie_NA", "03a78ae070a5e9e935112cf7ea8293f18950f1011694ea0260799e8762c8a6f0a4" }, {"nutellalicka_SH", "02f7d90d0510c598ce45915e6372a9cd0ba72664cb65ce231f25d526fc3c5479fc" }, From 19eba8e2ad6c2b326e59f0e2dd9b62d3a94a1def Mon Sep 17 00:00:00 2001 From: ca333 Date: Mon, 10 Jun 2019 22:57:57 +0200 Subject: [PATCH 56/65] add wget and fetch-params --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 945a7744a..2a06081f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,6 +40,7 @@ build:ubuntu: - mkdir ${PACKAGE_DIR_LINUX} - cp src/komodod src/komodo-cli + zcutil/fetch-params.sh ${PACKAGE_DIR_LINUX} - chmod +x ${PACKAGE_DIR_LINUX}/komodod - chmod +x ${PACKAGE_DIR_LINUX}/komodo-cli @@ -71,6 +72,7 @@ build:windows: - cp src/komodod.exe src/komodo-cli.exe src/komodo-tx.exe + zcutil/wget64.exe zcutil/fetch-params.bat ${PACKAGE_DIR_WINDOWS} - zip -r ${PACKAGE_DIR_WINDOWS}.zip ${PACKAGE_DIR_WINDOWS} From 25d6cd8edd5a434a7ebc163cb1f9a1b004a9018a Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 11 Jun 2019 00:27:51 -1100 Subject: [PATCH 57/65] Fix offset --- src/cc/dapps/zmigrate.c | 8 ++++---- src/komodo_gateway.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index aaad17a39..6f7960902 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -1086,11 +1086,11 @@ void scan_claims(int32_t issueflag,char *refcoin,int32_t batchid) else if ( batchid == 2 ) { batchmin = 1;//777 * SATOSHIDEN; - batchmax = 17777 * SATOSHIDEN; + batchmax = 47777 * SATOSHIDEN; } else if ( batchid == 3 ) { - batchmin = 17777 * SATOSHIDEN; + batchmin = 47777 * SATOSHIDEN; batchmax = 1000000 * SATOSHIDEN; } for (i=0; i Date: Tue, 11 Jun 2019 00:48:17 -1100 Subject: [PATCH 58/65] Support CHIPS in smartdust --- src/cc/dapps/zmigrate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index 6f7960902..854ce9e64 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -1311,6 +1311,12 @@ int32_t main(int32_t argc,char **argv) coinstr = clonestr("KMD"); acstr = ""; } + else if ( strcmp(argv[1],"CHIPS") == 0 ) + { + REFCOIN_CLI = "./chips-cli"; + coinstr = clonestr("CHIPS"); + acstr = ""; + } else { sprintf(buf,"./komodo-cli -ac_name=%s",argv[1]); From 99dfd5b3c946c2f4e3156bf77d5c1b6434af714c Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 11 Jun 2019 01:35:49 -1100 Subject: [PATCH 59/65] Support CHIPS --- src/cc/dapps/zmigrate.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index 854ce9e64..ea8085822 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -1086,11 +1086,11 @@ void scan_claims(int32_t issueflag,char *refcoin,int32_t batchid) else if ( batchid == 2 ) { batchmin = 1;//777 * SATOSHIDEN; - batchmax = 47777 * SATOSHIDEN; + batchmax = 77777 * SATOSHIDEN; } else if ( batchid == 3 ) { - batchmin = 47777 * SATOSHIDEN; + batchmin = 77777 * SATOSHIDEN; batchmax = 1000000 * SATOSHIDEN; } for (i=0; itotal > item->refundvalue*1.05 + 10*SATOSHIDEN ) + if ( item->total > item->refundvalue*1.1 + 10*SATOSHIDEN ) { - //if ( (item->total-item->refundvalue) > 777*SATOSHIDEN ) printf("possible.%d stolen %s %.8f vs refund %.8f -> %.8f\n",batchid,item->oldaddr,dstr(item->total),dstr(item->refundvalue),dstr(item->total)-dstr(item->refundvalue)); numstolen++; possiblestolen += (item->total - item->refundvalue); @@ -1324,7 +1323,7 @@ int32_t main(int32_t argc,char **argv) coinstr = clonestr(argv[1]); acstr = coinstr; } - if ( strcmp(coinstr,"KMD") == 0 ) + if ( 1 )//strcmp(coinstr,"KMD") == 0 ) { sprintf(buf,"%s-Claims.csv",coinstr); reconcile_claims(buf); From 1d4e09a5c4503e8bf06382d00d6d304d55be9bde Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Wed, 12 Jun 2019 12:16:13 +0800 Subject: [PATCH 60/65] change blackjok3r_SH pubkeys --- src/komodo_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_defs.h b/src/komodo_defs.h index 226600d6f..e91d831eb 100644 --- a/src/komodo_defs.h +++ b/src/komodo_defs.h @@ -186,7 +186,7 @@ static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"phm87_SH", "021773a38db1bc3ede7f28142f901a161c7b7737875edbb40082a201c55dcf0add" }, {"chainmakers_NA", "02285d813c30c0bf7eefdab1ff0a8ad08a07a0d26d8b95b3943ce814ac8e24d885" }, {"indenodes_EU", "0221387ff95c44cb52b86552e3ec118a3c311ca65b75bf807c6c07eaeb1be8303c" }, - {"blackjok3r_SH", "0226293d7644e1380555ecc2d385ba038a66f4202b24b643ab31bcad0dc1474de2" }, + {"blackjok3r_SH", "021eac26dbad256cbb6f74d41b10763183ee07fb609dbd03480dd50634170547cc" }, // 03d23bb5aad3c20414078472220cc5c26bc5aeb41e43d72c99158d450f714d743a {"chainmakers_EU", "03fdf5a3fce8db7dee89724e706059c32e5aa3f233a6b6cc256fea337f05e3dbf7" }, {"titomane_AR", "023e3aa9834c46971ff3e7cb86a200ec9c8074a9566a3ea85d400d5739662ee989" }, {"fullmoon_SH", "023b7252968ea8a955cd63b9e57dee45a74f2d7ba23b4e0595572138ad1fb42d21" }, // 10 From 79e06a9d851733214ae9cae61b3d9132fafea33a Mon Sep 17 00:00:00 2001 From: pungotoken <45178410+pungotoken@users.noreply.github.com> Date: Wed, 12 Jun 2019 12:40:25 +0300 Subject: [PATCH 61/65] pungocloud: new pubkeys for AR&SH NNs --- src/komodo_defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_defs.h b/src/komodo_defs.h index eb3039a18..dfc041874 100644 --- a/src/komodo_defs.h +++ b/src/komodo_defs.h @@ -195,7 +195,7 @@ static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"metaphilibert_SH", "0284af1a5ef01503e6316a2ca4abf8423a794e9fc17ac6846f042b6f4adedc3309" }, {"ca333_DEV", "02856843af2d9457b5b1c907068bef6077ea0904cc8bd4df1ced013f64bf267958" }, {"cipi_NA", "02858904a2a1a0b44df4c937b65ee1f5b66186ab87a751858cf270dee1d5031f18" }, - {"pungocloud_SH", "02863628f842a8aa424daf745cf43a1717cfcd571338ba87bfcec4d340703d01d6" }, + {"pungocloud_SH", "024dfc76fa1f19b892be9d06e985d0c411e60dbbeb36bd100af9892a39555018f6" }, {"voskcoin_EU", "0221365d89a6f6373b15daa4a50d56d34ad1b4b8a48a7fd090163b6b5a5ecd7a0a" }, {"decker_DEV", "028eea44a09674dda00d88ffd199a09c9b75ba9782382cc8f1e97c0fd565fe5707" }, {"cryptoeconomy_EU", "0290ab4937e85246e048552df3e9a66cba2c1602db76e03763e16c671e750145d1" }, @@ -219,7 +219,7 @@ static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"komodopioneers_EU", "036d02425916444fff8cc7203fcbfc155c956dda5ceb647505836bef59885b6866" }, {"d0ct0r_NA", "0303725d8525b6f969122faf04152653eb4bf34e10de92182263321769c334bf58" }, {"kolo_DEV", "02849e12199dcc27ba09c3902686d2ad0adcbfcee9d67520e9abbdda045ba83227" }, - {"peer2cloud_AR", "030fe3c77db0f91d79c26f951b674bba557b899f16570cd75332829a07031b0097" }, // 40 + {"pungocloud_AR", "02acc001fe1fe8fd68685ba26c0bc245924cb592e10cec71e9917df98b0e9d7c37" }, // 40 {"webworker01_SH", "031e50ba6de3c16f99d414bb89866e578d963a54bde7916c810608966fb5700776" }, {"webworker01_NA", "032735e9cad1bb00eaababfa6d27864fa4c1db0300c85e01e52176be2ca6a243ce" }, {"pbca26_NA", "03a97606153d52338bcffd1bf19bb69ef8ce5a7cbdc2dbc3ff4f89d91ea6bbb4dc" }, From 2984a80f2e468fb9da4f98dd9a70809f73ae3066 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Wed, 12 Jun 2019 15:46:57 +0300 Subject: [PATCH 62/65] dev --- src/komodo_defs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/komodo_defs.h b/src/komodo_defs.h index eb3039a18..7be46f613 100644 --- a/src/komodo_defs.h +++ b/src/komodo_defs.h @@ -186,7 +186,7 @@ static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"phm87_SH", "021773a38db1bc3ede7f28142f901a161c7b7737875edbb40082a201c55dcf0add" }, {"chainmakers_NA", "02285d813c30c0bf7eefdab1ff0a8ad08a07a0d26d8b95b3943ce814ac8e24d885" }, {"indenodes_EU", "0221387ff95c44cb52b86552e3ec118a3c311ca65b75bf807c6c07eaeb1be8303c" }, - {"blackjok3r_SH", "021eac26dbad256cbb6f74d41b10763183ee07fb609dbd03480dd50634170547cc" }, // 03d23bb5aad3c20414078472220cc5c26bc5aeb41e43d72c99158d450f714d743a + {"blackjok3r_SH", "021eac26dbad256cbb6f74d41b10763183ee07fb609dbd03480dd50634170547cc" }, {"chainmakers_EU", "03fdf5a3fce8db7dee89724e706059c32e5aa3f233a6b6cc256fea337f05e3dbf7" }, {"titomane_AR", "023e3aa9834c46971ff3e7cb86a200ec9c8074a9566a3ea85d400d5739662ee989" }, {"fullmoon_SH", "023b7252968ea8a955cd63b9e57dee45a74f2d7ba23b4e0595572138ad1fb42d21" }, // 10 @@ -195,8 +195,8 @@ static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"metaphilibert_SH", "0284af1a5ef01503e6316a2ca4abf8423a794e9fc17ac6846f042b6f4adedc3309" }, {"ca333_DEV", "02856843af2d9457b5b1c907068bef6077ea0904cc8bd4df1ced013f64bf267958" }, {"cipi_NA", "02858904a2a1a0b44df4c937b65ee1f5b66186ab87a751858cf270dee1d5031f18" }, - {"pungocloud_SH", "02863628f842a8aa424daf745cf43a1717cfcd571338ba87bfcec4d340703d01d6" }, - {"voskcoin_EU", "0221365d89a6f6373b15daa4a50d56d34ad1b4b8a48a7fd090163b6b5a5ecd7a0a" }, + {"pungocloud_SH", "024dfc76fa1f19b892be9d06e985d0c411e60dbbeb36bd100af9892a39555018f6" }, + {"voskcoin_EU", "034190b1c062a04124ad15b0fa56dfdf34aa06c164c7163b6aec0d654e5f118afb" }, {"decker_DEV", "028eea44a09674dda00d88ffd199a09c9b75ba9782382cc8f1e97c0fd565fe5707" }, {"cryptoeconomy_EU", "0290ab4937e85246e048552df3e9a66cba2c1602db76e03763e16c671e750145d1" }, {"etszombi_EU", "0293ea48d8841af7a419a24d9da11c34b39127ef041f847651bae6ab14dcd1f6b4" }, // 20 @@ -219,7 +219,7 @@ static const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"komodopioneers_EU", "036d02425916444fff8cc7203fcbfc155c956dda5ceb647505836bef59885b6866" }, {"d0ct0r_NA", "0303725d8525b6f969122faf04152653eb4bf34e10de92182263321769c334bf58" }, {"kolo_DEV", "02849e12199dcc27ba09c3902686d2ad0adcbfcee9d67520e9abbdda045ba83227" }, - {"peer2cloud_AR", "030fe3c77db0f91d79c26f951b674bba557b899f16570cd75332829a07031b0097" }, // 40 + {"peer2cloud_AR", "02acc001fe1fe8fd68685ba26c0bc245924cb592e10cec71e9917df98b0e9d7c37" }, // 40 {"webworker01_SH", "031e50ba6de3c16f99d414bb89866e578d963a54bde7916c810608966fb5700776" }, {"webworker01_NA", "032735e9cad1bb00eaababfa6d27864fa4c1db0300c85e01e52176be2ca6a243ce" }, {"pbca26_NA", "03a97606153d52338bcffd1bf19bb69ef8ce5a7cbdc2dbc3ff4f89d91ea6bbb4dc" }, From d2015647d0fb7b5d40fe1f7295f577d072178b6a Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 12 Jun 2019 14:52:45 -1100 Subject: [PATCH 63/65] undo constraint --- src/komodo_gateway.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 2a54ce064..9a80e5e24 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -645,13 +645,13 @@ const char *banned_txids[] = // all vouts banned "c4ea1462c207547cd6fb6a4155ca6d042b22170d29801a465db5c09fec55b19d", //246748 "305dc96d8bc23a69d3db955e03a6a87c1832673470c32fe25473a46cc473c7d1", //247204 - "43416a0c4da6b1a5c1d375bdbe8f7dc8d44d8f60df593d3376aa8221ec66357e", // vout0 only - "1eb295ed54c47f35cbccd7e7e40d03041f1853581da6d41102a9d8813782b6cb", - "db121e4012222adfc841824984a2a90b7e5b018dd71307822537d58160195e43", - "28f95b8148ac4ae6e09c7380e34422fab41d568a411e53dc94823e36a3d6f386", - "01d8c839463bda2f2f6400ede4611357913684927a767422a8560ead1b22557c", - "6e4980a9e1bd669f4df04732dc6f11b7773b6de88d1abcf89a6b9007d72ef9ac", - "6cc1d0495170bc0e11fd3925297623562e529ea1336b66ea61f8a1159041aed2", + //"43416a0c4da6b1a5c1d375bdbe8f7dc8d44d8f60df593d3376aa8221ec66357e", // vout0 only + //"1eb295ed54c47f35cbccd7e7e40d03041f1853581da6d41102a9d8813782b6cb", + //"db121e4012222adfc841824984a2a90b7e5b018dd71307822537d58160195e43", + //"28f95b8148ac4ae6e09c7380e34422fab41d568a411e53dc94823e36a3d6f386", + //"01d8c839463bda2f2f6400ede4611357913684927a767422a8560ead1b22557c", + //"6e4980a9e1bd669f4df04732dc6f11b7773b6de88d1abcf89a6b9007d72ef9ac", + //"6cc1d0495170bc0e11fd3925297623562e529ea1336b66ea61f8a1159041aed2", }; int32_t komodo_checkvout(int32_t vout,int32_t k,int32_t indallvouts) @@ -673,7 +673,7 @@ int32_t komodo_bannedset(int32_t *indallvoutsp,uint256 *array,int32_t max) } for (i=0; i Date: Fri, 14 Jun 2019 14:41:04 +0200 Subject: [PATCH 64/65] leave Heir CC activated on CCL --- src/komodo_utils.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 94ac60515..10fa26ccf 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -2328,6 +2328,10 @@ void komodo_args(char *argv0) { // No CCs used on this chain yet. CCDISABLEALL; + CCENABLE(EVAL_TOKENS); + CCENABLE(EVAL_HEIR); + + } if ( strcmp("COQUI",ASSETCHAINS_SYMBOL) == 0 ) { From d33d83ee734b340e5691d3204c6fc39f2bd5ff24 Mon Sep 17 00:00:00 2001 From: Alrighttt <36680730+Alrighttt@users.noreply.github.com> Date: Fri, 14 Jun 2019 14:46:49 +0200 Subject: [PATCH 65/65] remove whitespace --- src/komodo_utils.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 10fa26ccf..ecf5237e6 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -2330,8 +2330,6 @@ void komodo_args(char *argv0) CCDISABLEALL; CCENABLE(EVAL_TOKENS); CCENABLE(EVAL_HEIR); - - } if ( strcmp("COQUI",ASSETCHAINS_SYMBOL) == 0 ) {