From 2933b3ac3b8d98ef3ec6fe5b0e9a9e1d242c41f3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 25 Apr 2018 17:42:32 +0300 Subject: [PATCH 1/7] Default JUMBLR_PAUSE=1 --- src/komodo_globals.h | 2 +- src/rpcmisc.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/komodo_globals.h b/src/komodo_globals.h index 00eb4ac1d..e8b619f79 100644 --- a/src/komodo_globals.h +++ b/src/komodo_globals.h @@ -45,7 +45,7 @@ struct komodo_state KOMODO_STATES[34]; int COINBASE_MATURITY = _COINBASE_MATURITY;//100; int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,KOMODO_CHOSEN_ONE,ASSETCHAINS_SEED,KOMODO_ON_DEMAND,KOMODO_EXTERNAL_NOTARIES,KOMODO_PASSPORT_INITDONE,KOMODO_PAX,KOMODO_EXCHANGEWALLET,KOMODO_REWIND; -int32_t KOMODO_LASTMINED,prevKOMODO_LASTMINED,JUMBLR_PAUSE,ASSETCHAINS_CC; +int32_t KOMODO_LASTMINED,prevKOMODO_LASTMINED,JUMBLR_PAUSE=1,ASSETCHAINS_CC; std::string NOTARY_PUBKEY,ASSETCHAINS_NOTARIES,ASSETCHAINS_OVERRIDE_PUBKEY; uint8_t NOTARY_PUBKEY33[33],ASSETCHAINS_OVERRIDE_PUBKEY33[33]; diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp index 988c5d6c3..cf7967cb7 100644 --- a/src/rpcmisc.cpp +++ b/src/rpcmisc.cpp @@ -203,7 +203,10 @@ UniValue jumblr_deposit(const UniValue& params, bool fHelp) { string addr = params[0].get_str(); if ( (retval= Jumblr_depositaddradd((char *)addr.c_str())) >= 0 ) + { result.push_back(Pair("result", retval)); + JUMBLR_PAUSE = 0; + } else result.push_back(Pair("error", retval)); } else result.push_back(Pair("error", "invalid address")); return(result); @@ -222,6 +225,7 @@ UniValue jumblr_secret(const UniValue& params, bool fHelp) retval = Jumblr_secretaddradd((char *)addr.c_str()); result.push_back(Pair("result", "success")); result.push_back(Pair("num", retval)); + JUMBLR_PAUSE = 0; } else result.push_back(Pair("error", "invalid address")); return(result); } From 8e7287776a4cc4e650f523ec4e98d9181a38723f Mon Sep 17 00:00:00 2001 From: igorvoltaic Date: Fri, 27 Apr 2018 14:17:54 +0300 Subject: [PATCH 2/7] Update README-mac.md it was not possible to use previous instructions to build working Mac OS X client --- README-mac.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README-mac.md b/README-mac.md index c085cb617..bf85c934f 100644 --- a/README-mac.md +++ b/README-mac.md @@ -1,4 +1,4 @@ -First off you need Apple's Xcode (at least version 7, preferably 8.x) and the Xcode Command Line Tools: +First off you need Apple's Xcode (at least version 7, preferably 8.x or later) and the Xcode Command Line Tools: https://itunes.apple.com/us/app/xcode/id497799835?mt=12 @@ -11,19 +11,24 @@ And this is the list of brew packages you'll need installed: ```shell brew tap discoteq/discoteq; brew install flock brew install autoconf autogen automake -brew tap homebrew/versions; brew install homebrew/versions/gcc5 +brew install gcc5 brew install binutils brew install protobuf brew install coreutils brew install wget ``` +or + +```shell +brew tap discoteq/discoteq; brew install flock autoconf autogen automake gcc5 binutils protobuf coreutils wget +``` + Get all that installed, then run: ```shell -git clone https://github.com/j-cimb-barker/komodo.git +git clone https://github.com/jl777/komodo.git cd komodo -git checkout dev ./zcutil/build-mac.sh ``` From 4d34c751450b2174a0f0aec5f5e9343a04d1541f Mon Sep 17 00:00:00 2001 From: igorvoltaic Date: Fri, 27 Apr 2018 17:39:18 +0300 Subject: [PATCH 3/7] Update fetch-params.sh making sure we put params to correct dir on Mac OS X. got it from here >> https://github.com/z-classic/zclassic/blob/master/zcutil/fetch-params.sh --- zcutil/fetch-params.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zcutil/fetch-params.sh b/zcutil/fetch-params.sh index 10bade7cb..1e2fe8b81 100755 --- a/zcutil/fetch-params.sh +++ b/zcutil/fetch-params.sh @@ -2,7 +2,11 @@ set -eu -PARAMS_DIR="$HOME/.zcash-params" +if [[ "$OSTYPE" == "darwin"* ]]; then + PARAMS_DIR="$HOME/Library/Application Support/ZcashParams" +else + PARAMS_DIR="$HOME/.zcash-params" +fi SPROUT_PKEY_NAME='sprout-proving.key' SPROUT_VKEY_NAME='sprout-verifying.key' From 82617f8e373147dbfd3bb730bbe3b09d056d1089 Mon Sep 17 00:00:00 2001 From: igorvoltaic Date: Sat, 28 Apr 2018 00:22:17 +0300 Subject: [PATCH 4/7] Update README-mac.md --- README-mac.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/README-mac.md b/README-mac.md index bf85c934f..0cb02d409 100644 --- a/README-mac.md +++ b/README-mac.md @@ -1,3 +1,5 @@ +## Install for Mac OS X + First off you need Apple's Xcode (at least version 7, preferably 8.x or later) and the Xcode Command Line Tools: https://itunes.apple.com/us/app/xcode/id497799835?mt=12 @@ -30,11 +32,32 @@ Get all that installed, then run: git clone https://github.com/jl777/komodo.git cd komodo ./zcutil/build-mac.sh +./zcutil/fetch-params.sh ``` To build a distributable version of komodo then run the makeDistrib.sh script after building. -When you are done building, you need to do a few things in the [Configuration](https://github.com/zcash/zcash/wiki/1.0-User-Guide#configuration) section of the Zcash User Guide differently because we are on the Mac. All instances of `~/.zcash` need to be replaced by `~/Library/Application\ Support/Zcash` -The fetch-params.sh script, however, has already been altered to fetch the proving keys into the correct directory to conform to Mac specific naming conventions. +When you are done building, you need to create `Komodo.conf` the Mac way. + +```shell +mkdir ~/Library/Application\ Support/Komodo +touch ~/Library/Application\ Support/Komodo/Komodo.conf +nano ~/Library/Application\ Support/Komodo/Komodo.conf +``` + +Add the following lines to the Komodo.conf file: + +```shell +rpcuser=bitcoinrpc +rpcpassword=password +txindex=1 +addnode=5.9.102.210 +addnode=78.47.196.146 +addnode=178.63.69.164 +addnode=88.198.65.74 +addnode=5.9.122.241 +addnode=144.76.94.38 +addnode=89.248.166.91 +``` Happy Building From 21201c82025857379c461e47d28cfcb4c76d6987 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Tue, 1 May 2018 16:57:17 +0300 Subject: [PATCH 5/7] update readme, beefy node conf --- README.md | 16 +++++++++------- doc/beefy-node-reference-komodo.conf | 6 +++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e905007c6..ff7d143d0 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,10 @@ It downloads and stores the entire history of Komodo transactions; depending on - Max Supply: 200 million KMD. - Block Time: 1M 2s - Block Reward: 3KMD -- Mining Algorithm: Equihash +- Mining Algorithm: Equihash ## About this Project -Komodo is based on Zcash and has been by our innovative consensus algorithm called dPoW which utilizes Bitcoin's hashrate to store Komodo blockchain information into the Bitcoin blockchain. Other new and native Komodo features are the privacy technology called JUMBLR or our assetchain capabilities (one click plug and play blockchain solutions). More details are available under https://komodoplatform.com/. +Komodo is based on Zcash and has been by our innovative consensus algorithm called dPoW which utilizes Bitcoin's hashrate to store Komodo blockchain information into the Bitcoin blockchain. Other new and native Komodo features are the privacy technology called JUMBLR or our assetchain capabilities (one click plug and play blockchain solutions). More details are available under https://komodoplatform.com/. ## Getting started Dependencies @@ -93,14 +93,16 @@ To reset the blockchain, from *~/.komodo* `rm -rf blocks chainstate debug.log ko Create komodo.conf ------------------ +Please use a secure rpcuser and rpcpassword to ensure your funds safety. + ``` cd ~ mkdir .komodo cd .komodo pico komodo.conf #Add the following lines to the komodo.conf file: -rpcuser=bitcoinrpc -rpcpassword=password +rpcuser=dontuseweakusernameoryougetrobbed +rpcpassword=dontuseweakpasswordoryougetrobbed txindex=1 addnode=5.9.102.210 addnode=78.47.196.146 @@ -134,7 +136,7 @@ cd komodo #To view the process: ps -ef | grep komodod #To stop the daemon: -./src/komodo-cli stop +./src/komodo-cli stop #To view komodod output: tail -f ~/.komodo/debug.log @@ -174,7 +176,7 @@ There is a small chance that an outbound transaction will give an error due to m **To change modes:** a) backup all privkeys (launch komodod with `-exportdir=` and `dumpwallet`) - + b) start a totally new sync including `wallet.dat`, launch with same `exportdir` c) stop it before it gets too far and import all the privkeys from a) using `komodo-cli importwallet filename` @@ -201,7 +203,7 @@ JUMBLR implements t -> z, z -> z and z -> t transactions to maximize privacy of Which of the three stages is done is randomly selected at each turn. Also when there is more than one possible transaction at the selected stage, a random one is selected. This randomization prevents analyzing incoming z ->t transactions by its size to correlate it to the originating address. `jumblr_deposit ` designates the deposit address as the jumblr deposit address for that session. You can select an address that already has funds in it and it will immediately start jumblr process. If there are no funds, it will wait until you send funds to it. - + There are three sizes of a jumblr transaction: 10 KMD, 100 KMD and 1000 KMD. There is also a fixed interval of blocks where all jumblr nodes are active. Currently it is set to be 10, but this is subject to change. Only during every 10*10 blocks are the largest 1000 KMD transactions processed, so this concentrates all the large transactions every N*N blocks. `jumblr_secret ` notifies JUMBLR where to send the final z -> t transactions. In order to allow larger accounts to obtain privacy, up to 777 secret addresses are supported. Whenever a z -> t stage is activated, a random secret address from the list of the then active secret addresses is selected. diff --git a/doc/beefy-node-reference-komodo.conf b/doc/beefy-node-reference-komodo.conf index 43308e333..455f1ee3f 100644 --- a/doc/beefy-node-reference-komodo.conf +++ b/doc/beefy-node-reference-komodo.conf @@ -1,5 +1,5 @@ -rpcuser=minion -rpcpassword=1235baf8-3725-11e8-b9ec-1239db4ec123 +rpcuser=dontuseweakusernameoryougetrobbed +rpcpassword=dontuseweakpasswordoryougetrobbed txindex=1 server=1 rpcworkqueue=64 @@ -9,4 +9,4 @@ addnode=178.63.69.164 addnode=88.198.65.74 addnode=5.9.122.241 addnode=144.76.94.38 -addnode=89.248.166.91 +addnode=89.248.166.91 \ No newline at end of file From e7f4ace1e512ea2dd384459d6b919f3639d231cd Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 4 May 2018 17:44:40 +0300 Subject: [PATCH 6/7] Monthly cap on active user reward --- src/komodo_interest.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/komodo_interest.h b/src/komodo_interest.h index 07b12cfe1..581592566 100644 --- a/src/komodo_interest.h +++ b/src/komodo_interest.h @@ -80,13 +80,15 @@ uint64_t komodo_moneysupply(int32_t height) } #endif -uint64_t _komodo_interestnew(uint64_t nValue,uint32_t nLockTime,uint32_t tiptime) +uint64_t _komodo_interestnew(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uint32_t tiptime) { int32_t minutes; uint64_t interest = 0; if ( nLockTime >= LOCKTIME_THRESHOLD && tiptime > nLockTime && (minutes= (tiptime - nLockTime) / 60) >= 60 ) { if ( minutes > 365 * 24 * 60 ) minutes = 365 * 24 * 60; + if ( txheight >= 1000000 && minutes > 31 * 24 * 60 ) + minutes = 31 * 24 * 60; minutes -= 59; interest = ((nValue / 10512000) * minutes); } @@ -97,7 +99,7 @@ uint64_t komodo_interestnew(int32_t txheight,uint64_t nValue,uint32_t nLockTime, { uint64_t interest = 0; if ( txheight < KOMODO_ENDOFERA && nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= 10*COIN ) //komodo_moneysupply(txheight) < MAX_MONEY && - interest = _komodo_interestnew(nValue,nLockTime,tiptime); + interest = _komodo_interestnew(txheight,nValue,nLockTime,tiptime); return(interest); } @@ -151,21 +153,21 @@ uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uin else if ( txheight < 1000000 ) { interest = (numerator * minutes) / ((uint64_t)365 * 24 * 60); - interestnew = _komodo_interestnew(nValue,nLockTime,tiptime); + interestnew = _komodo_interestnew(txheight,nValue,nLockTime,tiptime); if ( interest < interestnew ) printf("pathA current interest %.8f vs new %.8f for ht.%d %.8f locktime.%u tiptime.%u\n",dstr(interest),dstr(interestnew),txheight,dstr(nValue),nLockTime,tiptime); } - else interest = _komodo_interestnew(nValue,nLockTime,tiptime); + else interest = _komodo_interestnew(txheight,nValue,nLockTime,tiptime); } else if ( txheight < 1000000 ) { numerator = (nValue * KOMODO_INTEREST); interest = (numerator / denominator) / COIN; - interestnew = _komodo_interestnew(nValue,nLockTime,tiptime); + interestnew = _komodo_interestnew(txheight,nValue,nLockTime,tiptime); if ( interest < interestnew ) printf("pathB current interest %.8f vs new %.8f for ht.%d %.8f locktime.%u tiptime.%u\n",dstr(interest),dstr(interestnew),txheight,dstr(nValue),nLockTime,tiptime); } - else interest = _komodo_interestnew(nValue,nLockTime,tiptime); + else interest = _komodo_interestnew(txheight,nValue,nLockTime,tiptime); } else { @@ -187,11 +189,11 @@ uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uin numerator = (nValue / 20); // assumes 5%! interest = ((numerator * minutes) / ((uint64_t)365 * 24 * 60)); //fprintf(stderr,"interest %llu %.8f <- numerator.%llu minutes.%d\n",(long long)interest,(double)interest/COIN,(long long)numerator,(int32_t)minutes); - interestnew = _komodo_interestnew(nValue,nLockTime,tiptime); + interestnew = _komodo_interestnew(txheight,nValue,nLockTime,tiptime); if ( interest < interestnew ) fprintf(stderr,"pathC current interest %.8f vs new %.8f for ht.%d %.8f locktime.%u tiptime.%u\n",dstr(interest),dstr(interestnew),txheight,dstr(nValue),nLockTime,tiptime); } - else interest = _komodo_interestnew(nValue,nLockTime,tiptime); + else interest = _komodo_interestnew(txheight,nValue,nLockTime,tiptime); } if ( 0 && numerator == (nValue * KOMODO_INTEREST) ) fprintf(stderr,"komodo_interest.%d %lld %.8f nLockTime.%u tiptime.%u minutes.%d interest %lld %.8f (%llu / %llu) prod.%llu\n",txheight,(long long)nValue,(double)nValue/COIN,nLockTime,tiptime,minutes,(long long)interest,(double)interest/COIN,(long long)numerator,(long long)denominator,(long long)(numerator * minutes)); From ac186ce4a8f1cd081cf95e4bf4e2d29d072a4d8c Mon Sep 17 00:00:00 2001 From: SHossain Date: Fri, 4 May 2018 16:34:08 +0100 Subject: [PATCH 7/7] strong rpcuser and pass recommend --- README-mac.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README-mac.md b/README-mac.md index 0cb02d409..02efa8404 100644 --- a/README-mac.md +++ b/README-mac.md @@ -48,8 +48,8 @@ nano ~/Library/Application\ Support/Komodo/Komodo.conf Add the following lines to the Komodo.conf file: ```shell -rpcuser=bitcoinrpc -rpcpassword=password +rpcuser=dontuseweakusernameoryougetrobbed +rpcpassword=dontuseweakpasswordoryougetrobbed txindex=1 addnode=5.9.102.210 addnode=78.47.196.146