Showing posts with label mining. Show all posts
Showing posts with label mining. Show all posts

Tuesday, 19 April 2016

How To Mine Decred in the Pool using NVIDIA GPUs (ccminer)

To mine Decred, first go join a pool. In this tutorial we will use Suprnova Pool. Please visit the page Decred PoW Charts to see the full list of availiable proof-of-work pools and their stats.


Create a new account using your email, and set up your new worker at My Account > My Workers.


To create a new worker, go to "Add new worker" and fill in the blanks. Your worker name and password will be whatever you want. (e.g. Worker name is Test, and password is 4321. Including the login name as RyanBC, the worker login would be RyanBC.Test"


Then download the nVidia GPU miner, also known as ccminer. You will need 7-zip or WinRAR to extract the files. (Any program which extracts files will do)


Then create a new folder on your desktop. Extract the files from the downloaded 7z file to the newly created folder. Edit the RUN-DCR.cmd file inside the folder by right clicking it and selecting "Edit".


You will see something like this:

Change "tpruvot" to your Suprnova login username, and "win" to your worker name. Change "x" to your worker password.


For example, the sample login name is RyanBC, worker name is Test, and password is 4321, so it will look something like this:


Now you should be ready to start mining with your nVidia graphics card. As long as you leave the miner open, you will be mining non-stop. (Unless you close the miner)


See the full tutorial in this video:

Sunday, 17 April 2016

Understanding the Value of the Decred (DCR) System



By now most people understand the concept of a distributed ledger and understand software is continually updated to support that process for all cryptocurrencies like Bitcoin (BTC), Etherium (ETH) and Decred (DCR). If you would like to brush up that basic understanding start with a one page primer at bitcoin.org before continuing to read.

Many people who have followed Bitcoin (BTC) for some time have seen the potential for the damaging impact of failed decision making in the development community. If you are not familiar with this, perhapsreading from one of the Bitcoin (BTC) developers Mike Hearn (who has one of the more extreme views) will help you understand how negative a failed decision making process and a lack of real scalable development support is.

Briefly Mike's explanations why Bitcoin network has failed is because the community has failed. What was meant to be a new, decentralized form of money that lacked “systemically important institutions” and “too big to fail” has become something even worse: a system completely controlled by just a handful of people. Worse still, the network is on the brink of technical collapse. The mechanisms that should have prevented this outcome have broken down, and as a result there’s no longer much reason to think Bitcoin can actually be better than the existing financial system.
How is Decred (DCR) different?

Unlike other currencies, Decred has a transparent process of rewarding developers for their contribution built into the mining process. When blocks rewards are granted, developers receive 10%, and those mining receive 90%. As the value scales, so does the development payout, ensuring resources are appropriately scaled.

Secondly, and equally as important, the payout to mining (unlike other currencies) is split between "Proof of Work" and "Proof of Stake" mining. Proof of Work (PoW) mining is the typical mining which processes transactions and ensures the security of the distributed ledger.

Proof of Stake (PoS) is a new addition which gives a voice to those who use/hold the currency Decred (DCR). Each time a block was found, 5 Decred (DCR) users who participating in voting (PoS-mining) are selected at random to cast a vote and they receive 30% of the block reward for doing so (6% each). To buy a ticket for voting they should lock their coins (current PoS ticket price) for quite long time (in average 28 days, but up to 5 months, when they cannot use or spend amount locked for PoS tickets).

In addition to the reward, these users also have the option of voting Yes or No if there is a decision to be made (accept software change, etc...). These PoS miners vote always for a previous block, and if it receive 3 / 5 "No" votes, nobody except PoS-miners receive reward and block will be removed from blockchain.

So again, how is Decred (DCR) different?

Bitcoin (BTC) first brought us a distributed ledger.

Decred (DCR) also has a distributed ledger, but additionally has brought us:

A distributed system of approving/denying changes and PoW mining rewards through PoS mining.

A distributed system of rewarding the development team to ensure resources are available to further the project decision making system. This budget is using to pay community members for the development of new resources and features for Decred Software. See the list of "Requests for Proposals" and payments on official forum.

Tuesday, 12 April 2016

Decred - Proof of Stake mining [FAQ]

1. How do I start PoS mining?

Answer - Check This Out!

2. What hardware do I need to PoS mine?

Answer - The hardware doesnt really matter. You can use a laptop, desktop, VPS, Amazon AWS or even a Raspberry Pi 2 or other newer SoC. It simply needs to be online and connected to the internet 24x7x365. If your PoS wallet is unable to reach the internet you will miss calls to stake vote, your ticket will be revoked and you will not get the stake vote reward.

3. How much DCR do I get for PoS voting / mining?

Answer - The current PoS reward is 1.853DCR per vote. The reward will change over time. It will slowly get lower and lower. As of 13MAR16, block 10035, the total block reward is 30.88. This is broken down into 60% PoW reward, 18.532DCR. 30% PoS reward, 1.853DCR X 5 votes or 9.265DCR and 10% developer funds reward 3.088DCR.

3.1 How long does it take to get the PoS reward?
Answer - It takes 256 blocks (~1 day) for your stake reward to be returned and spendable.

4. How much does a stake ticket cost?
Answer - The price changes every 144 blocks. The amount of sstx purchased in the 144 blocks between price changes influences sstx price moreso than the target 40960 pool number. 144 blocks * 5 votes/block = 720. If less than 720 sstx are purchased in 144 blocks then the overall direction is down in price. Even if the total amount of sstx is still above the target 40960 sstx in the pool. If the amount of sstx tickets is <720 then the sstx price goes up. If there are more or less than 40960 stakes in the pool this will also affect the price direction of movement. Currently at block 10035 13MAR16 1 stake vote ticket requires you pledge or lock 14.39DCR. Previous stake ticket costs have been in the range of 5DCR-30DCR based on demand as above. The average sstx price at this time is 9dcr.

4. Do I get my stake back or do I lose it?

Answer - Buying a stake vote is really not the correct term. What you are really doing is pledging an amount of DCR to have the right to vote. There are 3 outcomes after you purchase a stake ticket. 1 - Your ticket is voted. You get your stake pledge 14.39DCR + reward 1.853DCR currently. 2.Your stake vote is called and you miss the vote. Your ticket is revoked. Your stake pledge 14.39DCR currently is returned. No reward given. 3.Your ticket is not voted for 142 days(approximately) and your stake pledge is returned at the end of 142 days. No reward given.

5. How often does the stake ticket price adjust or change?

Answer - The stake ticket price or pledge adjusts every 144 blocks or about 12 hours.

6. How much DCR do I need to PoS?

Answer - You can start with any amount as long as you have enough to purchase a stake vote ticket. How much is that? It changes. It can be anywhere from 2DCR to 1000DCR. Currently 13MAR16 at block 10035 a stake vote costs 14.39DCR and will return 1.853DCR reward. Knowing that it will probably take 28 days to get the stake pledge and the reward back you can calculate how much you want to vote each day. For example - 2 votes per day X 28 days = 56 stake tickets * 14.39 = 805DCR. The 56 votes will return 107.3DCR reward after about 28 days.

7. What are the commands to PoS?

Answer - There are quite a few commands related to PoS. We have started to flesh them out here:
Useful PoS commands

7.1 How can I connect DCRD to more nodes?

Answer - add the --maxpeers=X switch to your dcrd config or at start. 1-? is the range for X. Why would I want to do this? Outbound connections are HARD SET to 8. This has been extensively tested to be the ideal amount and cannot be changed. Inbound connections are good for the network. If you are running a public node you can up the amount of allowed inbound connections to whatever your system will handle. The default max is 125. You can raise it higher if you like but do not adjust lower. This can result in missed tickets as your hop count, in effect latency, increases. There are also bandwidth considerations. If you pay for data $/per MB raising this can increase the data you use.
For a concrete example, assume that at some point in the future there are a million nodes on the network. You would be able to reach any given node on the network with a maximum of ceil(log8(1000000)) = 7 hops. In practice, it works out to be even less than that on average because there are inbound nodes too which are notified and thus the net effect is that it raises the base of the logarithm which of course in turn reduces the hops.

8. How do I know if I have voted?

Answer - You will see something like this in your dcrwallet screen:

13:28:35 2016-01-25 [INF] WLLT: Voted on block 0034dafbc7969fd5f1c5a3cbbf1ddd48ec78109d103457b3bb5b101c71db3657 (height 4143) using ticket 2030e3978322bac2466146ccf955c32afd86ccf85f1356ab54cd091513b6f9ad (vote hash: cb8c498f1c6fb9255076655b21394733a4d1f078687c751860d8dd93e7599d57)

You can also see current tickets held by using the getstakeinfo command.


dcrctl -u -P --wallet getstakeinfo
{
"poolsize": 41768,
"difficulty": 8.49962772,
"allmempooltix": 6,
"ownmempooltix": 0,
"immature": 6,
"live": 241,
"proportionlive": 0.005769967439187895,
"voted": 151, <--Total number of votes you have cast
"totalsubsidy": 280.91069628, <-- Total reward subsidy you have received for votes
"missed": 12,
"proportionmissed": 0.0002872187649593107,
"revoked": 12
}


9. How do I know if I bought a stake vote ticket?

Answer - You will see something like this in your dcrwallet screen:

14:51:09 2016-03-13 [INF] TMGR: Inserting unconfirmed transaction b06cfe0a13f6e62c095b71308d310a6a63c18ad52f9b6650a3d6e469a4894699
14:51:09 2016-03-13 [INF] WLLT: Successfully sent SStx purchase transaction b06cfe0a13f6e62c095b71308d310a6a63c18ad52f9b6650a3d6e469a4894699

You can also see how many stake tickets you currently have by using the getstakeinfo command.


dcrctl -u -P --wallet getstakeinfo
{
"poolsize": 41768,
"difficulty": 8.49962772, <-- Current stake ticket price
"allmempooltix": 6, <-- All tickets waiting to be included in next block
"ownmempooltix": 0, <--Your tickets waiting to be included in next block
"immature": 6, <--Purchased tickets not ready to vote yet.
"live": 241, <--Tickets waiting to vote
"proportionlive": 0.005769967439187895, <--Your % of tickets in PoS (poolsize: 41768 above) % chance to vote? .576%
"voted": 151,
"totalsubsidy": 280.91069628,
"missed": 12,
"proportionmissed": 0.0002872187649593107,
"revoked": 12
}


10. Should I raise my txfee to buy stake votes faster?

Answer - See also #14. This is more opinion than fact so here goes - No you should not. You have 144 blocks to purchase a stake vote before the next change. Several thousand stake votes( up to 2880 stakes I think?) can be purchased in that amount of blocks. The only reason to adjust your txfee higher would be to make sure your stake purchase gets put in to the last few blocks before an adjustment is made. To adjust your txfee above .5 or even .025 right after a stake price adjustment is wasting DCR.


11. How do I know if I have a missed / revoked ticket?
Answer - You will see something like this is your dcrwallet screen:

19:24:56 2016-02-24 [INF] WLLT: Voted on block 0000000000000624cd8375a6889a3ef2eda66b58d29029f2d69111cd687102c2 (height 5001) using ticket c20113ebc1a7c1bf875a60fcdd71baf86c007c8603cf34cac33377badbdf7420 (vote hash: acad50383933a19d63d6e3a5d6c8f05e45e6b934b299a934c3795c8b5cff7e9f)
19:25:51 2016-02-24 [INF] WLLT: Connecting block 0000000000001226676a67f5ccbf1ba8f063e1a4016e50e5822934acb0f7f78f, height 5002
19:25:54 2016-02-24 [INF] WLLT: Revoked missed ticket c20113ebc1a7c1bf875a60fcdd71baf86c007c8603cf34cac33377badbdf7420 (tx hash: 003f7c81c92bbc2a4999b783c6188e76dbf6c359e6b1c19b212a55006d216cc8)

You can also use the getstakeinfo command.


dcrctl -u -P --wallet getstakeinfo
{
"poolsize": 41768,
"difficulty": 8.49962772,
"allmempooltix": 6,
"ownmempooltix": 0,
"immature": 6,
"live": 241,
"proportionlive": 0.005769967439187895,
"voted": 151,
"totalsubsidy": 280.91069628,
"missed": 12, <-- Total votes you missed
"proportionmissed": 0.0002872187649593107, <-- Total % of overall(?) voted tickets you missed
"revoked": 12 <-- Total votes you had revoked
}


12. Why does my missed and revoke vote count not match. How do I fix?
Answer - Why? Something is out of sync. It happens. Use the command rebroadcastmissed. It will not post any output. After running it rerun getstakeinfo and missed / revoked should sync up.

dcrctl -u -P --wallet rebroadcastmissed


13.My DCR balances for all, locked, spend dont match/cant use spend and other account balance issues.

Answer - I have found that most of these issues can be resolved buy A)restarting DCRD then B)restarting DCRWALLET with the --prunetickets --reuseaddresses flags set.
You can also try running the consolidate command below. Beware this will cost you some DCR as it creates transactions. Typically not more than a few transaction fees. The last time I did it cost 1.2dcr and consolidated about 25 transactions. This should help clear up any stuck funds where you dont have enough to purchase any sstx.


dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet consolidate 99999 default

After this completes you should see a transaction insert(if any were needed) and also something similar to 'Successfully consolidated funds' along with a transaction ID you can check at https://mainnet.decred.org to see what actually happened and exactly how much it cost.

14.What should I set my txfee to? How many tickets are available during each period between changes? How does my txfee amount influence ticket buys?

Answer - See also #10. There are 20 slots per block to insert/buy a stake ticket(sstx). If there are more than 20 pending sstx in the mempool it will take mulitple blocks to clear the mempool. Stake ticket purchases are also placed in order of txfee. For example - There are 30 tickets in the mempool all with txfee of .025, requiring 2 blocks to complete. Block 1 with 20 sstx, block 2 with 10 sstx. You insert/buy another sstx into the mempool with a txfee of .026 before block 1 is processed. Your sstx now goes to the front of the line and is processed in block 1. Block 2 will now have 11 sstx in it. But your sstx was placed at the front of the line because it had a higher txfee. The reverse is also true. If you do not specify a high enough txfee your sstx will keep getting pushed to the end of the line. This is no big deal when there are 2800 slots available until the next sstx price change. It is a big deal when there are only a few blocks left, maybe 60-80 slots and there are 200 sstx in the mempool. If the sstx price goes from say 10 to 15 then those who had lower txfees set will not get sstx at 10 because they kept getting pushed back to the end of the line.

Now that this has been clearly (I hope) explained lets not go crazy and start doing .5 txfees! .01 to maybe .075 should be more than enough to get everyone in that wants in. Remember you have 144 blocks or 2880 slots over the next 12 hours to get your sstx. You dont have to have them in right after the price change. You have time, relax. Have a beer. We have yet to see all 2880 slots filled. There is room for everyone so far.

Thursday, 7 April 2016

Decred Basic Commands With Explaination

Usernames, Passphrases and Passwords - description examples, use your own:

dcrd_username

dcrd_password

private_passphrase

public_passphrase

dcrwallet_username

dcrwallet_password

Note: (simple explanations given in parentheses for each command)

Dummies notes: Use dcrd, dcrwallet and dcrctl in different command prompt windows.
On command prompt you have to open/point the folder you have extracted the decred files for example for C:\Decred:
cd\
c:
cd Decred


!notes!

!You have to change example values with yours of course!

1) dcrd “commands”:

dcrd --rpcuser="dcrd_username" --rpcpass="dcrd_password" (To start dcrd)

Or

dcrd --rpcuser="dcrd_username" --rpcpass="dcrd_password" --miningaddr=YourDecredAddressForMining (To start dcrd for solo pow mining, YourDecredAddressForMining is an example value, replace it with one of your wallet addresses)

2) dcrwallet “commands”:

Very important: !Wait for dcrd to completely sync to the exact latest block height before of any use of dcrwallet!
You can easily check the latest block height on https://mainnet.decred.org/

dcrwallet --create (To create a new dcrwallet or recreating your wallet from seed, close command prompt window after its successful creation or recreation for security reasons)

First priority and most important note: !DO NOT give or show your seed words or seed hex to anyone! Store it, backup it, hide it and password protect it on a paper or digitally. If you make the big mistake of revealing your seed then your wallet is burned. If you make that mistake try to move your funds as soon as possible to another safe wallet of yours but it will maybe be too late for it, especially if you are PoS mining with most of your funds.!

dcrwallet --username="dcrwallet_username" --password="dcrwallet_password" --walletpass="public_passphrase" --dcrdusername="dcrd_username" --dcrdpassword="dcrd_password" (To start your dcrwallet)

Or

dcrwallet --username="dcrwallet_username" --password="dcrwallet_password" --walletpass="public_passphrase" --dcrdusername="dcrd_username" --dcrdpassword="dcrd_password" --enablestakemining --balancetomaintain=100.1 --ticketmaxprice=10.0 --ticketaddress=P2SH_Pool_Address (To start dcrwallet for auto buying tickets for a stake pool and as voting backup, balancetomaintain-> Lowest value of balance to stay on your wallet no matter what - 100.1 is an example value, ticketmaxprice-> Max price for buying a ticket - 10.0 is an example value, P2SH_Pool_Address is an example value replace it with yours from stake pool)

Note: In order to buy tickets or vote them, you should also unlock your wallet forever right after that in another command prompt window with this command:

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet walletpassphrase "private_passphrase" 0

!Of course you have to be careful when you unlock your wallet forever(with no time limit) because someone with any kind of access to your pc will be capable of spending your funds and mess up with your wallet, so be careful where you use your wallet. And for security reasons close the command prompt window you used for unlocking your wallet and erase your cache if you can or at least copy something else a few times!

Or

dcrwallet --username="dcrwallet_username" --password="dcrwallet_password" --walletpass="public_passphrase" --dcrdusername="dcrd_username" --dcrdpassword="dcrd_password" --enablestakemining --balancetomaintain=100.1 --ticketmaxprice=10.0 (To start wallet 24/7 online for solo PoS mining, balancetomaintain-> Lowest value of balance to stay on wallet no matter what - 100.1 is an example value, ticketmaxprice-> Max price for buying a ticket - 10.0 is an example value)

!In order to successfully solo PoS mining you have to run your wallet unlocked and dcrd and be online 24/7 with no downtime, I only recommend it if you can setup this on one of your own servers with downtime close to zero! Better use a stake pool instead.

Note: In order to buy tickets or vote, you should also unlock your wallet forever right after that in another command prompt window with this command:

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet walletpassphrase "private_passphrase" 0

!Of course you have to be careful when you unlock your wallet forever(with no time limit) because someone with any kind of access to your pc will be capable of spending your funds and mess up with your wallet, so be careful where you use your wallet. And for security reasons close the command prompt window you used for unlocking your wallet and erase your cache if you can or at least copy something else a few times!

Dummies note for both dcrd and dcrwallet:

On Windows use this combination of keys to stop dcrwallet and dcrd, when you want to: Ctrl + c (after you clicked on their command prompt window to choose them)

3) dcrctl commands:

!default it's an account name on these commands and by now almost everyone's spendable funds goes to that one, created and named by default as "default"!

dcrctl -l (To list all the available commands)

dcrctl -h (For dcrctl help)

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet getbalance (To get your spendable balance)

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet getbalance "default" 0 all (To get the total balance of your default account, locked and spendable funds)

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet getbalance "*" 0 all (To get the total balance of all the accounts into your wallet, default + imported + anything else, locked and spendable funds)

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet listtransactions (To get the latest transactions for your wallet)

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet listtransactions * 999999 (To list up to 999999 transactions for your wallet, 999999 is an example value)

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet getinfo (To get some basic info like current difficulty)

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet getstakeinfo (To get stake info)

Notes about what you’ll get with getstakeinfo:
"poolsize" -> Current total number of tickets
"difficulty" -> Current ticket price
"allmempooltix" -> Tickets in mempool/to be mined
"ownmempooltix" -> Your tickets in mempool/to be mined
"immature" -> Your tickets included in a block/mined that will go live after 256 confirmations
"live" -> Your tickets waiting to be voted
"proportionlive" -> The proportion of your tickets compared to the poolsize
"voted" -> Tickets of yours that got voted
"totalsubsidy" -> Total profits from rewards you got from tickets voted
"missed" -> Your tickets that didn’t got voted
"proportionmissed" -> Your missed tickets compared to the total tickets you bought
"revoked" -> Tickets of yours that removed from mempool
(I think missed = revoked, at least in my case)

!When a ticket voted – if I am not wrong – it also needs 256 confirmations/new blocks to mature so as the DCR you spend to buy it (its own ticket price) + current vote reward to become spendable, ticketfee isn’t returned!

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet walletpassphrase "private_passphrase" 120 (To unlock your wallet for the time you want, 120 -> Time in seconds - 0=forever – with no time limit, 120 is an example value, always be careful when you unlock your wallet)

!You have to be careful when you unlock your wallet because someone with access to your pc will be capable of spending your funds and mess up with your wallet, so be careful where you use your wallet. And for security reasons close the command prompt window you used for unlocking your wallet and erase your cache if you can or at least copy something else a few times!

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet settxfee 0.01 (To set the transaction fee value, 0.01->tx fee value you want to set, default is 0.05 by now I am posting, 0.01 is an example value, I think txfee is resetting back to default every time you re-run your wallet but I am not sure)

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet setticketfee 0.01 (To set the ticket fee value, 0.01->ticket fee value you want to set, default is 0.05 by now I am posting, 0.01 is an example value, I think ticket fee is resetting back to default every time you re-run your wallet but I am not sure)

Note about fees: Be careful not to set very high fees by mistake so you won’t lose DCR for nothing. Also I have to say that sometimes I’ve seen more fees spend than the ones I’ve set for a transaction or a ticket buy, I am not sure why that happened or if I am wrong about it.

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet importscript your_script (For importing a redeem script from a stake pool, your_script is an example value replace it with yours from the stake pool, !Your wallet has to be unlocked to import the script!)

Note about importscript: It is highly recommended to import the your script from stake pool into your wallet so as to be able to keep track of your tickets on pool with getstakeinfo command, if for some reason you’ll re-create your wallet from seed then you have to import your script again to your wallet.

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet sendtoaddress DecredAddressYouWantToSendAnAmount 10.01(To send an amount of your funds that you want to someone’s address, 10.01 -> Amount of DCR you want to send, 10.01 is an example value change it with how many DCR you want to send, DecredAddressYouWantToSendAnAmount is an example value change it with the decred address you want to send funds, !Your wallet has to be unlocked to make this transaction and an additional txfee will also be deducted from your account!)

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet purchaseticket "default" 10.1 1 P2SH_Pool_Address (For manual buying a ticket for your P2SH Pool Address – Example values: "default"-> Account name, 10.1-> Max ticket price, 1-> minconf, P2SH_Pool_Address-> your pool address, !Your wallet has to be unlocked for buying a ticket and an additional ticketfee will also be deducted from your account!)

Note about manual buying tickets: Some users had problems not to be able to manually buying tickets with sufficient spendable balance, I personally think you’ll have less troubles if you start your dcrwallet for auto buying tickets with the appropriate setting/values.

Note about Decred transactions: When you spend or send some of your balance for any possible reason you have to wait for your transaction to be included into a new block (sometimes it takes a few blocks) at that time you’ll probably get wrong balance – lower that the correct one, that’s normal and you can find the reasons for this into the forum. After a few blocks it will get fixed back to normal.

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet consolidate 99999 default (To transfer amounts from many of your addresses to only one of them, 99999-> number of addresses to consolidate, 99999 is an example value, !Your wallet has to be unlocked to consolidate and an additional fee will also deducted from your funds!)

Note about consolidate: Consolidate seems to sometimes fix the manually buying tickets troubles or other spending problems, if you have a spending issue you can give it a try but do not consolidate all the time or for no reason because you’ll spend in fees for nothing.

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet walletlock (To lock wallet)

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet getnewaddress (To get one of your wallet addresses as a return and you can use it for what you want it)

dcrctl -u "dcrwallet_username" -P "dcrwallet_password" --wallet validateaddress DecredAddressYouWantToValidate (To check if a decred address is yours, if you get "ismine": true as a return then it is yours, DecredAddressYouWantToValidate is an example value replace it with the decred address you want to validate)

Note about username and password: There is a way to setup conf files so you won’t have to use your username and password for dcrctl commands all the time but I don’t use conf files so if someone want might describe it in a new post or thread or you can search the forum about it.

4) cgminer – PoW mining:

For solo PoW mining edit cgminer's start_local.bat file before starting it to (cgminer v.0.0.4 for Windows x64):

cgminer --blake256 -o https://127.0.0.1:9109 -u "dcrd_username" -p "dcrd_password" --cert "%LOCALAPPDATA%\Dcrd\rpc.cert"

(dcrd_username, dcrd_password are example values so change them with yours, also users who may use --datadir flag have to change accordingly their cert location but they should already know this)

!Before running the .bat file be sure you have dcrd running and fully synced to latest block with –miningaddr= flag!

How long it takes for your rewards to become spendable: !If you solve a block it will take 256 confirmations/new blocks for its reward to mature and become spendable, but you’ll still be able to see it in your total balance or as immature in your transactions!

Or

For PoW mining on a pool edit cgminer’s start_local.bat file before starting it to how you’ll get instructed on your pool site help / getting started, a general example should look like this:

cgminer --blake256 -o pool.link: _port_number -u webloginID.workername -p workerpassword

(example values: pool.link -> link address of your pool, _port_number-> port given from your pool, your webloginID, your workername, your workerpassword)

Note about mining software: There are many mining softwares for every occasion with decred algorithm support (cgminer, ccminer, sgminer and there is going to be a gominer) search about them and use the one that fits more for you.

What you have to kept running on your system for the most common occasions:

- Using your wallet: dcrd synced to the exact latest block height and then dcrwallet.

- Pos mining on stake pool: dcrd synced to the exact latest block height and then dcrwallet unlocked only when you want to buy tickets with the appropriate settings, you can stop and close them after that.

- Solo pos mining: dcrd synced to the exact latest block height and then dcrwallet unlocked and online 24/7 with the appropriate settings.

- Solo pow mining: dcrd with --miningaddr=YourDecredAddressForMining flag synced to the exact latest block height and then cgminer or other miner with the appropriate settings.

- Pow mining on a pool: Only cgminer or other miner with the appropriate settings is needed for this occasion.

(Use dcrd, dcrwallet, dcrctl and your miner in different command prompt windows)

General note: It’s important to use the latest Decred binary files and update them when a new release will be announced. You can check for the latest version here: https://github.com/decred/decred-release/releases/
Updating is very easy, just download the latest compressed/container file (.zip for Windows) for your operating system, stop dcrd and dcrwallet that may be running and then extract and replace the old files with the newer ones and re-run them.

Dcrd and Dcrwallet default folders location on Windows: :\Users\”user_name”\AppData\Local\

Command prompt note for dummies: Especially for dcrctl commands, while on the same command prompt window you can use up and down arrows of your keyboard to re-use the most recent commands you already used so you won’t have to copy/paste or re-type them again and again.

Some useful links:

https://github.com/decred/decred-release/releases/

https://dcrstakes.com/

https://dcrstats.com/

http://d3c.red/

https://mainnet.decred.org/

https://github.com/decred

https://bitcointalk.org/index.php?topic=1290358.0

https://wiki.decred.org/

And there is always a search tab on the forum.

Extra: Correct Decred pronunciation from @davecgh : https://dl.dropboxusercontent.com/s/d4brp4otxbpfigv/decredpronunciation.mp3?dl=0

It is obvious that most of the above will be history when a final and stable version of Paymetheus will be available for all the main operating systems. So if someone find it difficult to involve with Decred right now he can wait for it. I also have to say that personally I don’t recommend using the web wallet right now but if you want to use it anyway be sure NOT to run dcrwallet and web wallet at the same time (basically current web wallet it’s just an gui for your local dcrwallet).

Final important note: Use them at your own responsibility. I don’t know if the above will work for everyone and I DO NOT take any responsibility if anything will go wrong by using the above commands or notes. I’ve tested them only on Windows 10 x64 Pro. The above it’s not a guide, it’s just a collection of the very basic commands that someone can already find spread through the entire forum threads, there is always a search button on forum and there are already many useful guides on it if you need one. I don’t know if I’ll be maintaining and update this post so things might change from time to time. If you find something wrong or feel there should be more explanation about something then post it. I just think it will might help, at least the Decred beginners.

Tuesday, 1 March 2016

Decred Solo Stake Mining Guide & Useful Commands [PoS]

Solo stake mining is a relatively simple process.
But I suggest you use https://dcrstakes.com Stake Pool, if you dont want to keep your PC online 24/7.
With enough tickets, its more profitable than PoW mining, with comparably lesser investment!
So, lets get started.

First you will need the latest Decred binary files- dcrd, dcrctl, dcrwallet.
At this moment the latest is v0.0.6. It contains a lot of bug fixes and its best to use this.

Download the files according to your OS , 32 or 64 bit, etc.

Most commonly-

Windows 32bit

Windows 64bit

For future updates keep an eye on this(https://github.com/decred/decred-release/releases)


Okay, so now that you have the files, lets get it all setup.

The below guide is for Windows users. [linux users- you guys can figure it out from this (smarter people)]


Make a folder PoS in the C: drive.
Lets put all files you downloaded in C:\PoS\
mainly dcrd.exe, dcrwallet.exe and dcrctl.exe

Next right click and create three text files:

StartServer.txt, StartPoSMining.txt and UnlockWallet.txt

Open StartServer.txt and write the following:

dcrctl -u <user> -P <password> --wallet walletpassphrase <PrivateKey> 0

Open StartPoSMining.txt and write the following:

dcrwallet -u <user> -P <password> --walletpass <PublicKey> --enablestakemining --balancetomaintain=1.0 --ticketmaxprice=20

Open UnlockWallet.txt and write the following:

dcrctl -u <user> -P <password> --wallet walletpassphrase <PrivateKey> 0

Now replace <user> , <password> , <PublicKey> with rpc server username and password and publickey of your wallet .save and close the windows.


If you haven't created a wallet yet.

Checkout the "Creating new wallet" part of this post.

Now save all the three text files.

Rename them to:

StartServer.bat, StartPoSMining.bat and UnlockWallet.bat.

Remember, your Wallet needs to be unlocked all the time while mining!

But, of course you are very lazy!!
so just download the three bat files from here and then replace <user> , <password> , <PublicKey> with rpc server username and password and publickey of your wallet .save and close the windows.

Next run the three .bat files in the following order:

1.StartServer.bat
2.StartPoSMining.bat
3.UnlockWallet.bat       (this cmd window will close immediately and "The wallet has been unlocked without a time limit." will appear in StartPoSMining.bat window)

You can change wallet parameters balancetomaintain and ticketmaxprice as per your need.
I think its best to buy tickets when the price is around 4-5 DCR.
And Its irrelevant to keep a lot of balance. Unless you have a lot of tickets, chances of your wallet voting is lesser.
I keep it at 1.0 , you decide as per your wish.


Some Useful commands:

open cmd and do:

cd C:\PoS\

This will take you to your stake mining directory with the three binary files (dcrd, dcrctl, dcrwallet)

Now type these:

dcrctl -u <user> -P <pass> --wallet getbalance
This will give you the current spendable balance of your wallet.

dcrctl -u <user> -P <pass> --wallet getbalance "default" 0 all
This will give you the total balance of your wallet, both locked(means money spent in buying tickets) and spendable together.

dcrctl -u <user> -P <pass> --wallet getstakeinfo
This will give you the details about the current stake pool.

Example:

{
 "poolsize": 41142,   //Total number of tickets in the pool right now.
  "difficulty": 7.47481456,  //Current Ticket price!
  "allmempooltix": 3,  //Number of tickets being bought in this present block
  "ownmempooltix": 0, //Number of tickets you are buying in the present block
  "immature": 0,  //Number of immature tickets you have ( it takes 256 confirmations for a newly bought ticket to become live and be ready to vote.)
  "live": 99,  //Total number of live tickets you have
  "proportionlive": 0.0024063001312527345,  // That's the fraction, of live tickets you have compared to all the other tickets.
  "voted": 2,  //Number of votes you did.
  "totalsubsidy": 3.72496701,  // Voting rewards in total
  "missed": 0,  //Votes you missed!
  "proportionmissed": 0,
  "revoked": 0  //Votes that were revoked
}

dcrctl -u <user> -P <pass> --wallet gettickets 1
This will show you the ID of all the tickets you have bought!


Hope this guide helps!
comment below if you need any clarifications!

Thanks rohit pawar for the help! :)

Monday, 8 February 2016

How to start mining Decred?

Here are are talking about PoW mining.

For Stake mining guide go here.

Prerequisites i.e. Things you should have ready to use this guide:

  1. Your airdrop seed you saved when confirming your airdrop registration. If you didn't register for airdrop just ignore this.
  2. Already created username & passwords for dcrd & dcrwallet, both should be different for maximum security.
  3. Already created public & private passphrase for wallet, both should be different for maximum security.
  4. Mainnet binaries & key/password to unzip it. You will need 7zip (for windows) or p7zip (for linux) software to unzip this file.
  5. Latest version of cgminer.
  6. Register on a pool if you don't want to do solo mining & create workers.
Running Daemon i.e. dcrd.exe
  1. Extract the mainnet binaries. Goto the folder where you extracted the binaries.
  2. Open a command window in folder.
  3. enter following command:

  4. This will start the daemon & it will start syncing the mainnet blockchain.

Importing the Airdrop seed & Creating an address for solo mining
  1. open a new command window in folder where you extracted mainnet binaries. Enter this command in the command window
  2. Command window will ask you to input a wallet passphrase. Enter a passphrase you created as prerquisite for dcrwallet & Press enter. Note: While entering the passphrase, command window will show no activity but it is accepting your input.
  3. Confirm your passphrase by typing it again & press enter
  4. Now it will ask you for a passphrase for public data. Choose yes, and enter the public passphrase you created as prerequisite. Remember this passphrase as you will need it for staking in the future.
  5. Note: Make sure you enter your seed with only spaces (no line breaks). Total of 32 space-separated words. Also seed is case sensitive. If you want to verify a seed, use "verify.bat" included with dcraddrgen utility you used to create your airdrop address.
  6. It will now ask if you have existing wallet seed.
    Choose Yes (If you have a AirDrop wallet seed). Now is the time to get your airdrop seed, the one that you saved when you confirmed your airdrop registration. Enter your seed with only spaces (no line breaks). Now press enter only when you have typed the whole seed.
    Choose No. (If you dont have AirDrop wallet seed. Then just continue to follow the prompts. 
  7. Congrats! You have now imported your airdrop hopefully.
    Or, have generated a new wallet!!
  8. Now run your wallet using following command:

  9. Skip following steps if you don't need a new address for mining or already created one.
  10. This will start the wallet & connect it to daemon so that wallet becomes upto date.
  11. Now that wallet is running & connected to daemon.
  12. Open a new command window & run :

  13. Copy the address shown, you will need it for solo mining.
Creating new wallet & address if you missed the Airdrop

  1. open a new command window in folder where you extracted mainnet binaries. Enter this command in the command window
    • Command window will ask you to input a wallet passphrase. Enter a passphrase of your choice & Press enter. Note: While entering the passphrase, command window will show no activity but it is accepting your input.
    • Confirm your passphrase by typing it again & press enter
    • Now it will ask you for a passphrase for public data. Choose yes, and enter the public passphrase you created as prerequisite. Remember/store this passphrase as you will need it for staking in the future.
    • It will now ask if you have existing wallet seed. As this is your first wallet, choose no.
    • This will create a wallet file save your seed in a safe place and type OK.
       
  2. After that enter this command:

  3. This will start the wallet & connect it to daemon so that wallet becomes upto date.
  4. Now that wallet is running & connected to daemon.

  5. Open a new command window & run:
  6. Copy the address shown, you will need it for solo mining.
Check screenshots of the steps till now: https://imgur.com/a/CaJ4M

Mining Solo
  1. Now goto command window running daemon that we started in step1 of "Running Daemon" & press ctrl+c. This will stop the daemon.

  2. Restart the daemon with following command. (you can use the same command window) :

  3. Now that both wallet and daemon are running & synced, its time to mine.
  4. Unzip cgminer. You will find start_local.bat file in the unzipped folder.
  5. Open it using a text editor & change -u & -p to your username & password used with daemon. Also change the port to 9109 instead of 19109 Save it.
  6. IMPORTANT: change http to https
  7. Run start_local.bat and your gpus will start solo mining.

Mining on the pool
  1. Follow Mining solo guide until step 4.
  2. After that open start_local.bat in a text editor.
  • For MaxMiners pool, use:
         Diff 1: http://dcr.maxminers.net:7727
         Diff 4: http://dcr.maxminers.net:7728

           Diff 1: http://dcr.suprnova.cc:9110
           Diff 4: http://dcr.suprnova.cc:9111
           Diff 8: http://dcr.suprnova.cc:9112
           Diff 64: http://dcr.suprnova.cc:9115



  • Here "webloginID" is your username you chose on the pool while creating your account. You can click the name of a pool above to see their Getting started Guide.
    Create your workers. workername & workerpassword are explained there.

    Try the high-diff port if you're having lots of rejects.

Thanks @sambiohazard for the help!