Hey mate, you can try using gitbash for windows and see if that works? Not sure if it will, but could be worth a try! https://git-for-windows.github.io/
I will incorporate this in to my script so it will be a bit better but I will try and make it a bit better over time Thank you
I'll see about that. Just tell me if there is a cmd version of this? I haven't used this in windows since I'm more of a Linux user. If there is a cmd version than I think this could be done quite easy
+1 from me If you are a relative newbie (as I am) this gives you a lot of info and is one easy command. I updated my binaries and ran this one command and it gave me all the info I needed to know about tickets, difficulty, missed votes and I whole lot more.
Is "consolidate" function included? Just add it while starting PoS mining or while login wallet . This will remove dust from wallet .
Hey Rohit, nope you are the first to mention consolidate function on this thread..... Please tell us more and I'll add it to the first post! Cheers!
v0.0.6 pi@pi-hole:~/decred/linux-arm $ ./dcrctl --wallet getstakeinfo 401 Unauthorized. pi@pi-hole:~/decred/linux-arm $ screen -R walletPoS 15:04:55 2016-03-06 [WRN] RPCS: Unauthorized client connection attempt 15:05:31 2016-03-06 [WRN] RPCS: Unauthorized client connection attempt WTF? UPDATE: The command on Debian Linux v0.0.6 is i@pi-hole:~/decred/linux-arm $ ./dcrctl --wallet -u ''username'' -P ''password'' getstakeinfo
As little side note as well - None of these commands provide a time/date. On linux you can add ;date to any command and get a time stamp on a new line.
I wanted to say that I have made 3 config files ~/.dcrctl/dcrctl.conf ~/.dcrd/dcrd.conf Code: [Application Options] rpcuser=USER rpcpass=PASS ~/.dcrwallet/dcrwallet.conf Code: [Application Options] username=USER password=PASS So you don't need to type your user and pass in your command. I have updated my script a bit: Code: #! /bin/sh dcrwalletLogFolder="~/.dcrwallet/logs/mainnet/" decredFolder="(DECRED FOLDER)" cd $decredFolder balanceAll=`./dcrctl --wallet getbalance 'default' 0 all` balanceLocked=`./dcrctl --wallet getbalance 'default' 0 locked` balanceSpendable=`./dcrctl --wallet getbalance 'default' 0 spendable` stakeInfo=`./dcrctl --wallet getstakeinfo` balanceWon=`echo $stakeInfo | grep -Eo '"totalsubsidy": [0-9\.]*,' | sed -ne 's/,//p' | sed -ne 's/\"totalsubsidy\":.//p'` votesCount=`echo $stakeInfo | grep -Eo '"voted": [0-9\.]*,' | sed -ne 's/,//p' | sed -ne 's/\"voted\":.//p'` missedVotesCount=`echo $stakeInfo | grep -Eo '"missed": [0-9\.]*,' | sed -ne 's/,//p' | sed -n -e 's/\"missed\":.//p'` revokedVotesCount=`echo $stakeInfo | grep -Eo '"revoked": [0-9\.]*' | sed -n -e 's/\"revoked\":.//p'` ticketPrice=`echo $stakeInfo | grep -Eo '"difficulty": [0-9\.]*,'| sed -ne 's/,//p' | sed -n -e 's/\"difficulty\":.//p'` ticketsImatureCount=`echo $stakeInfo | grep -Eo '"immature": [0-9\.]*,' | sed -ne 's/,//p' | sed -n -e 's/\"immature\":.//p'` ticketsMatureCount=`echo $stakeInfo | grep -Eo '"live": [0-9\.]*,' | sed -ne 's/,//p' | sed -n -e 's/\"live\":.//p'` cd $dcrwalletLogFolder votedTicketsPerDay=`cat dcrwallet.log | grep Voted | grep -o "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" | uniq -c | tr -d '\n' | sed 's/\s\{3,\}/ | /g'` buyCount=`cat dcrwallet.log | grep SStx | wc -l` boughtTicketsPerDay=`cat dcrwallet.log | grep SStx | grep -o "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" | uniq -c | tr -d '\n' | sed 's/\s\{3,\}/ | /g'` revokedTicketsPerDay=`cat dcrwallet.log | grep Revoked | grep -o "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" | uniq -c | tr -d '\n' | sed 's/\s\{3,\}/ | /g'` echo "" echo "########## Decred report ##########" echo "" echo " **Money**" echo " All: $balanceAll" echo " Locked: $balanceLocked" echo " Spendable: $balanceSpendable" echo " Won: $balanceWon" echo "" echo " **Tickets**" echo " All: $(($ticketsImatureCount+$ticketsMatureCount))" echo " Mature: $ticketsMatureCount" echo " Imature: $ticketsImatureCount" echo " Price Now: $ticketPrice" echo "" echo " **Bought Tickets Per Day**" echo " $boughtTicketsPerDay |" echo "" echo " **Votes**" echo " Done: $votesCount" echo " Missed: $(($missedVotesCount-$revokedVotesCount))" echo " Revoked: $revokedVotesCount" echo " Bought: $buyCount" echo " Failed: $missedVotesCount" echo "" echo " **Voted Tickets Per Day**" echo " $votedTicketsPerDay |" echo "" echo " **Revoked Tickets Per Day**" echo " $revokedTicketsPerDay |" echo "" echo "###################################" echo ""
in version 0.6 or later, you can set the fee to purchase tickets. default fee is 0.05 dcr. dcrctl --wallet setticketfee 0.05 and you can check average fee in mempool on dcrstats, just for your information.
added some lines to get the upcoming Blocks which will receive Rewards: Code: #! /bin/sh dcrwalletLogFolder="<YOUR FOLDER>" decredFolder="<YOUR FOLDER>" cd $decredFolder balanceAll=`./dcrctl --wallet getbalance 'default' 0 all` balanceLocked=`./dcrctl --wallet getbalance 'default' 0 locked` balanceSpendable=`./dcrctl --wallet getbalance 'default' 0 spendable` stakeInfo=`./dcrctl --wallet getstakeinfo` blockcount=`./dcrctl getblockcount` balanceWon=`echo $stakeInfo | grep -Eo '"totalsubsidy": [0-9\.]*,' | sed -ne 's/,//p' | sed -ne 's/\"totalsubsidy\":.//p'` votesCount=`echo $stakeInfo | grep -Eo '"voted": [0-9\.]*,' | sed -ne 's/,//p' | sed -ne 's/\"voted\":.//p'` missedVotesCount=`echo $stakeInfo | grep -Eo '"missed": [0-9\.]*,' | sed -ne 's/,//p' | sed -n -e 's/\"missed\":.//p'` revokedVotesCount=`echo $stakeInfo | grep -Eo '"revoked": [0-9\.]*' | sed -n -e 's/\"revoked\":.//p'` ticketPrice=`echo $stakeInfo | grep -Eo '"difficulty": [0-9\.]*,'| sed -ne 's/,//p' | sed -n -e 's/\"difficulty\":.//p'` ticketsImatureCount=`echo $stakeInfo | grep -Eo '"immature": [0-9\.]*,' | sed -ne 's/,//p' | sed -n -e 's/\"immature\":.//p'` ticketsMatureCount=`echo $stakeInfo | grep -Eo '"live": [0-9\.]*,' | sed -ne 's/,//p' | sed -n -e 's/\"live\":.//p'` cd $dcrwalletLogFolder votedTicketsPerDay=`cat dcrwallet.log | grep Voted | grep -o "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" | uniq -c | tr -d '\n' | sed 's/\s\{3,\}/ | /g'` buyCount=`cat dcrwallet.log | grep SStx | wc -l` boughtTicketsPerDay=`cat dcrwallet.log | grep SStx | grep -o "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" | uniq -c | tr -d '\n' | sed 's/\s\{3,\}/ | /g'` revokedTicketsPerDay=`cat dcrwallet.log | grep Revoked | grep -o "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" | uniq -c | tr -d '\n' | sed 's/\s\{3,\}/ | /g'` rewardblock=`cat dcrwallet.log | grep Voted | cut -d "(" -f2 | cut -d ")" -f1 | sed -e 's/height / /g' | tr -d "\n" |{ read line; for i in $line; do payblock="$((i +256))"; if [ $payblock -gt $blockcount ]; then echo -n "$payblock "; fi done; echo }` echo "" echo "########## Decred report ##########" echo "" echo " **Money**" echo " All: $balanceAll" echo " Locked: $balanceLocked" echo " Spendable: $balanceSpendable" echo " Won: $balanceWon" echo "" echo " **Tickets**" echo " All: $(($ticketsImatureCount+$ticketsMatureCount))" echo " Mature: $ticketsMatureCount" echo " Imature: $ticketsImatureCount" echo " Price Now: $ticketPrice" echo "" echo " **Bought Tickets Per Day**" echo " $boughtTicketsPerDay |" echo "" echo " **Votes**" echo " Done: $votesCount" echo " Missed: $(($missedVotesCount-$revokedVotesCount))" echo " Revoked: $revokedVotesCount" echo " Bought: $buyCount" echo " Failed: $missedVotesCount" echo "" echo " **Voted Tickets Per Day**" echo " $votedTicketsPerDay |" echo "" echo " **Revoked Tickets Per Day**" echo " $revokedTicketsPerDay |" echo "" echo " **REWARD BLOCKS**" echo " Current Block: $blockcount" echo " Upcoming Reward Blocks: $rewardblock" echo "###################################" echo ""
@karamble well this is interesting but how do you calculate this and how exact it is and this rewards are vote rewards right? and I have added some other stuff in mine as well will post it here. I hope it helped and thank you for this Code: #! /bin/sh dcrwalletLogFolder="<YOUR FOLDER>" decredFolder="<YOUR FOLDER>" cd $decredFolder balanceAll=`./dcrctl --wallet getbalance 'default' 0 all` balanceLocked=`./dcrctl --wallet getbalance 'default' 0 locked` balanceSpendable=`./dcrctl --wallet getbalance 'default' 0 spendable` stakeInfo=`./dcrctl --wallet getstakeinfo` maxPrice=`./dcrctl --wallet getticketmaxprice` ticketFee=`./dcrctl --wallet getticketfee` blockcount=`./dcrctl getblockcount` balanceWon=`echo $stakeInfo | grep -Eo '"totalsubsidy": [0-9\.]*,' | sed -ne 's/,//p' | sed -ne 's/\"totalsubsidy\":.//p'` votesCount=`echo $stakeInfo | grep -Eo '"voted": [0-9\.]*,' | sed -ne 's/,//p' | sed -ne 's/\"voted\":.//p'` missedVotesCount=`echo $stakeInfo | grep -Eo '"missed": [0-9\.]*,' | sed -ne 's/,//p' | sed -n -e 's/\"missed\":.//p'` revokedVotesCount=`echo $stakeInfo | grep -Eo '"revoked": [0-9\.]*' | sed -n -e 's/\"revoked\":.//p'` ticketPrice=`echo $stakeInfo | grep -Eo '"difficulty": [0-9\.]*,'| sed -ne 's/,//p' | sed -n -e 's/\"difficulty\":.//p'` ticketsImatureCount=`echo $stakeInfo | grep -Eo '"immature": [0-9\.]*,' | sed -ne 's/,//p' | sed -n -e 's/\"immature\":.//p'` ticketsMatureCount=`echo $stakeInfo | grep -Eo '"live": [0-9\.]*,' | sed -ne 's/,//p' | sed -n -e 's/\"live\":.//p'` cd $dcrwalletLogFolder votedTicketsPerDay=`cat dcrwallet.log | grep Voted | grep -o "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" | uniq -c | tr -d '\n' | sed 's/\s\{3,\}/ | /g'` buyCount=`cat dcrwallet.log | grep SStx | wc -l` boughtTicketsPerDay=`cat dcrwallet.log | grep SStx | grep -o "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" | uniq -c | tr -d '\n' | sed 's/\s\{3,\}/ | /g'` revokedTicketsPerDay=`cat dcrwallet.log | grep Revoked | grep -o "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" | uniq -c | tr -d '\n' | sed 's/\s\{3,\}/ | /g'` dateNow=`date +"%d-%b-%Y %X"` rewardblock=`cat dcrwallet.log | grep Voted | cut -d "(" -f2 | cut -d ")" -f1 | sed -e 's/height / /g' | tr -d "\n" |{ read line; for i in $line; do payblock="$((i +256))"; if [ $payblock -gt $blockcount ]; then echo -n "$payblock "; fi done; echo }` echo "" echo "########## Decred report ##########" echo "" echo " $dateNow" echo "" echo " **Money**" echo " All: $balanceAll" echo " Locked: $balanceLocked" echo " Spendable: $balanceSpendable" echo " Won: $balanceWon" echo "" echo " **Tickets**" echo " All: $(($ticketsImatureCount+$ticketsMatureCount))" echo " Mature: $ticketsMatureCount" echo " Imature: $ticketsImatureCount" echo " Price Now: $ticketPrice" echo " My Price: $maxPrice" echo " My Fee: $ticketFee" echo "" echo " **Bought Tickets Per Day**" echo " $boughtTicketsPerDay |" echo "" echo " **Votes**" echo " Done: $votesCount" echo " Missed: $(($missedVotesCount-$revokedVotesCount))" echo " Revoked: $revokedVotesCount" echo " Bought: $buyCount" echo " Failed: $missedVotesCount" echo "" echo " **Voted Tickets Per Day**" echo " $votedTicketsPerDay |" echo "" echo " **Revoked Tickets Per Day**" echo " $revokedTicketsPerDay |" echo "" echo " **Reward Paying Block**" echo " Current Block: $blockcount" echo " Upcoming Reward Blocks: $rewardblock" echo "" echo "###################################" echo ""
@brencelj - Its a clone of that 'votedTicketsperday' command. I get the votedTicketsperday, parse out the blockheight on which the vote was made and add 256 blocks to it (tickets will be rewarded 256 blocks after the vote). In the last step i decide, if the block is higher then the current blockcount -> this will be a future block with vote rewards..
256 blocks to reward a voted ticket and how long blocks to refund a locked found ( to be a spendable ) ?