Testnet Only Guide: How I Got My Daemon, Wallet, And Miner Running & Also Started Solo Stake Mining

Discussion in 'Proof-of-work Mining' started by sambiohazard, Jan 28, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    #1 sambiohazard, Jan 28, 2016
    Last edited: Feb 8, 2016
    NOTE: Dont use this guide for mainnet. It is only meant for testnet. Find mainnet guides here
    My Guide: https://forum.decred.org/threads/pr...import-mining-guide-use-at-your-own-risk.472/
    @anondran's Guide: https://forum.decred.org/threads/br...p-included-with-basic-commands-os-neutral.478

    Here is a guide to get you from starting the daemon to mining. I am assuming that you already downloaded the testnet binaries & Latest miner that supports TLS on windows. To understand all the different passwords/passphrase used in this guide, please read this thread by @davecgh

    After you have extracted the miner and binaries, open a command window/terminal and change directory to where you have unzipped testnet binaries and enter this command:
    1. dcrd --testnet -u user -P pass
    2. This will get daemon up and running & downloading the blockchain. It is recommended to change user & pass to something else.
    3. Now open a new command window and goto same directory where you unzipped testnet binaries. Run the following command
    4. dcrwallet --create
      • 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 no as this is just testnet
      • 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. After that enter this command
      • You can skip step 5-14 if you don't want to do PoW mining using your GPU.
    5. dcrwallet -u walletuser -P walletpass --dcrdusername=[must be same as in step 1] --dcrdpassword=[must be same as in step1]
    6. This will start the wallet & connect it to daemon so that wallet becomes upto date. Use user & pass from step 1 for dcrdusername & dcrdpassword. for -u & -P use a different username & password.
    7. Now that wallet is running & connected to daemon, open a new command window & run
    8. dcrctl --testnet -u [must be same as -u in step 5] -P [must be same as -P in step 5] --wallet getnewaddress
    9. Copy the address shown, you will need it for mining.
    10. Now goto command window running daemon that we started in step1 & press ctrl+c. This will stop the daemon. Restart the daemon with following command. (you can use the same command window)
    11. dcrd --testnet -u user -P pass --miningaddr=[your address from step 9] (Make sure to use same password & username as in step 1)
    12. Now that both wallet and daemon are running & synced, its time to mine.
    13. Unzip cgminer. You will find start_local.bat file in the unzipped folder. Open it using a text editor & change -u & -p to your username & password used with daemon. Save it.
    14. Run start_local.bat and your gpus will start solo mining.
    Here are steps to start Solo Stake Mining.
    1. If you also followed the mining portion of the guide, just close your wallet by pressing ctrl+c, otherwise After step 4 enter following command to start the wallet. You can use the same command window.
    2. dcrwallet --noclienttls --noservertls -u walletuser -P walletpass --dcrdusername=[must be same as in step 1] --dcrdpassword=[must be same as in step1] --balancetomaintain [no of coins you don't want to stake] --ticketmaxprice [maximum price you want to pay for 1 ticket]
    3. Now you need to unlock your wallet for staking. For this open a new command window and enter following command
    4. dcrctl --notls --testnet -u walletuser -P walletpass --wallet walletpassphrase [same as in step 4 during wallet creation] 0
    5. This will unlock your wallet until you close it or lock it manually, remember to lock it when you don't want to stake.
    Enjoy! Post any correction i might need to make here or anyway to improve this guide. I am trying to remain OS neutral so i haven't included any steps on how to open command window or edit batch files. Please do post how to do it on your specific OS.

    Regards

    Sam :)

    Spanish version (Thanks to @davecgh): https://forum.decred.org/threads/guía-como-armar-el-software-para-minar-testnet.360
    French version (Thanks to @Bill007): https://forum.decred.org/threads/gu...-portefeuille-et-miner-pendant-le-testnet.374
    ====================================================
    Update:
    Changed all flags/switches to Unix style as suggested by @davecgh here .
    Changed command in step 8 from "getaddressesbyaccount default" to "getnewaddress"
    Clarified which username & password need to be same
    Changed command formatting as suggested by @davecgh here
    Updated guide to include wallet creation steps.
    Updated to include Solo Stake Mining steps.
    Included link to description of passwords/passphrases by @davecgh
    Removed flags that disabled TLS as new version of cgminer supports it on all OSes.
     
  2. whis

    whis New Member

    Jan 28, 2016
    59
    7
    Thank you, but this is for users that have mined before, i haven't mined before so i would like to go step by step to make sure i do it the right way.

    Which files from testnet binaries & miner do i need to download? i have nvidia

    How do i change directory from command window?

    By do this do you mean just paste this line in command?
     
  3. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    Specific miner for nividia is yet not available but this will work, I have nvidia and it worked. for cgminer

    For windows: https://github.com/decred/cgminer/releases/download/v0.0/cgminer-decred-w32_27012016.zip
    For linux: https://github.com/decred/cgminer/r...gminer-decred-linux-x86_64-20160127-v3.tar.gz (although i am not sure)

    changing directory depends on which OS you have.

    Yes paste that command but change [user] & [pass] with what you want to use as your username & password.
     
  4. whis

    whis New Member

    Jan 28, 2016
    59
    7
    I have windows 10, which testnet binaries to i need to download from that list?
     
  5. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    ok then you can just do this. Goto the directory where you unzipped the testnet binaries (get one which says windows) using Windows Explorer. Now hold "Shift" key and right-click to bring up context menu, choose "Open command window here". That will do it.
     
  6. whis

    whis New Member

    Jan 28, 2016
    59
    7
    I havent downloaded any testnet binaries from here https://github.com/decred/dcrd/releases/tag/v0.0, dont know which one i need to have. I have only the miner downloaded.
     
  7. whis

    whis New Member

    Jan 28, 2016
    59
    7
  8. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    Anywhere you like.
     
  9. whis

    whis New Member

    Jan 28, 2016
    59
    7
    I opened command window, do i have to paste this line in there?
    1. dcrd --testnet -u [user] -P [pass] /notls
     
  10. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    You can paste it or type it, whatever you like. Don't forget to replace [user] & [pass] with username and password of your choice. I hope you are not trolling ;)
     
  11. 418Sec

    418Sec Member
    Advocate (Twitter)

    Jan 3, 2016
    122
    65
    Male
    Very helpful guide!! :)
    Good job.
     
    sambiohazard likes this.
  12. davecgh

    davecgh Hero Member
    Developer Organizer

    Dec 31, 2015
    642
    788
    Male
    United States
    I haven't looked over the guide yet, but thanks for getting one going. One thing I'd suggest is using the same switch style. The windows stuff accepts both unix-style params ('-' and '--') and windows-style params ('/'), so it works with both, but as a matter of consistency they should really all match.

    For example:

    Code:
    dcrd --testnet -u [user] -P [pass] --notls
    OR
    Code:
    dcrd /testnet /u [user] /P [pass] /notls
    Given the unix-style params work everywhere, I'd suggest using those exclusively.
     
    418Sec, Blizzy and sambiohazard like this.
  13. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    Ok done, thanks for the tip. I hope someone gets things running via this. That will make sure i didn't mess something up.
     
  14. davecgh

    davecgh Hero Member
    Developer Organizer

    Dec 31, 2015
    642
    788
    Male
    United States
    I'm pretty sure --create mode doesn't start an RPC server or attempt to connect to dcrd, so you don't need the additional flags here. The only flag needed should be --create.
     
  15. whis

    whis New Member

    Jan 28, 2016
    59
    7
    #16 whis, Jan 28, 2016
    Last edited: Jan 28, 2016
    Im not, i just pasted step 4. dcrwallet --create and it asks me enter the private passphrase of your new wallet: but im unable to type in the field.
    sn.PNG
     
  16. davecgh

    davecgh Hero Member
    Developer Organizer

    Dec 31, 2015
    642
    788
    Male
    United States
    #13 has a typo for "start_local.bat".
     
  17. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    It does not show up in the command window when you type, but it is getting accepted, just type and press enter. Also remember your passphrase as it will be needed if you want to test sending your funds to others and staking.
     
  18. ig0tik3d

    ig0tik3d New Member

    Jan 23, 2016
    23
    6
    Male
    without this
    dcrctl --testnet -u walletuser -P walletpass --wallet getnewaddress /notls
    on step 8 show empty result (windows 7 x64)..
     
    sambiohazard likes this.
  19. ig0tik3d

    ig0tik3d New Member

    Jan 23, 2016
    23
    6
    Male
    #20 ig0tik3d, Jan 28, 2016
    Last edited: Jan 28, 2016
    ps.
    comand dcrctl --testnet -u walletuser -P walletpass --wallet getnewaddress /notls
    show 1 address
    but after that when execute
    dcrctl --testnet -u walletuser -P walletpass --wallet getaddressesbyaccount default --notls
    show 20 address... its bug or what?

    [​IMG]
     

Share This Page