DCR (Decred) The New Crypto Currency

Decred which is traded as (DCR) on only a couple of CryptoCoin exchanges at the time of this post is very promising.

Promising in a way that it addresses Bitcoin’s current flaws and may be the next dominant CryptoCurrency. Such a bold claim to become Bitcoin 2.0, but this coin and the community has what it takes.

Want technical details? Go here: https://www.decred.org/

There is still a lot to do, and a long way to go, but they have a solid plan and a Decred Constitution.

I was amazed when I read this, as they have clear direction and seek to bring back the spirit of what Bitcoin was supposed to do.

I’ve been able to set up my Decred Wallet, and even attempted to mine decred both solo and in a pool.

During testnet, my humble ~375 MH/s graphics card would find blocks and let me know everything is working.

Now that mainnet is up, I haven’t found any blocks as there is already too much competition with those who have mining rigs with open air GPU card sleds that will put gaming systems to shame.

This did not daunt me however, as I was able to purchase some DCR from the exchanges and set up my system for POS (Proof of Stake) mining.

Hybrid Proof-of-Work Proof-of-Stake

Since my 5 ASIC’s that were used for Bitcoin and other sha256 alt coins are useless for mining Decred, I point them to coins that can be traded for Decred.

Later, I’ll set up the POS wallet somewhere that will not be affected by my home internet connection and power grid. Will give more details about this later.

Decred setup on Windows x64 and mining on Testnet

Since Decred is using blake256, I will be setting up mining on my windows machine because it has a better graphics card.

Info for the setup came from here:

https://forum.decred.org/threads/public-testnet-binaries-source-code-and-documentation.334/

Download the binaries:

https://github.com/decred/dcrd/releases/tag/v0.0
https://github.com/decred/cgminer/releases/tag/v0.0

The quick reference guide will help you:

https://wiki.decred.org/Quick_Reference

Start the decred daemon the first time:

dcrd.exe -u YourUserName -P YourPassword

Start the decred wallet and get a new address:

dcrwallet --create
dcrwallet --dcrdusername=YourUserName --dcrdpassword=YourPassword /noclienttls

You will need to set up a passphrase that you should save. You will need it to unlock your wallet later.

Your wallet will get created somewhere here:

C:\Users\YourWindowsUserName\AppData\Local\Dcrwallet\testnet

Get a new address:

dcrctl --testnet -u YourUserName -P YourPassword --wallet getnewaddress

At this point, you will not need this wallet open to start mining, so you can shut it down, but you can unlock it and check the balance anytime you want when the wallet is running.

dcrctl --testnet -u YourUserName -P YourPassword --wallet getbalance
dcrctl --testnet -u YourUserName -P YourPassword --wallet walletpassphrase "your passphrase here" 9999999

Shut down and start the decred daemon again. Note that if you are on windows, you will need the –notls flag if you want to mine:

dcrd.exe --notls -u YourUserName -P YourPassword --miningaddr=YourNewDecredAddress

Now to start mining:

cgminer.exe --blake256 -o http://127.0.0.1:19109 -u YourUserName -p YourPassword --intensity d

Decred Installation on Ubuntu

Attempting to install Decred

Github project:

https://github.com/decred/dcraddrgen.git

GO installation:

sudo apt-get install gccgo-go
mkdir ~/gocode

Add to .bashrc

export GOPATH=$HOME/gocode

Now get the address generator:

go get -u github.com/decred/dcraddrgen

Currently getting errors, will update this post later…

EDIT: This post is old, I was able to get my decred wallet working and will post details in later posts.

Using Upstart on Ubuntu for bitcoind

My bitcoind was always crashing after about 12 hours and I would restart it. I had a script that ran after a reboot, but that didn’t help to restart it after a crash. I tried Upstart scripts but they wouldn’t work at reboot, although I could start/stop them at will after configuration.

I found the answer here:
https://bitcointalk.org/index.php?topic=25518.msg8733922#msg8733922

So this is what my /etc/init/bitcoind.conf looks like now.

description "bitcoind"

start on filesystem
stop on runlevel [!2345]
oom score -500
expect fork
respawn
respawn limit 10 60 # 10 times in 60 seconds

script
	user=yourusername
	home=/home/$user
	cmd=/usr/local/bin/bitcoind
	pidfile=$home/bitcoind.pid
	# Don't change anything below here unless you know what you're doing
	[[ -e $pidfile && ! -d "/proc/$(cat $pidfile)" ]] && rm $pidfile
	[[ -e $pidfile && "$(cat /proc/$(cat $pidfile)/cmdline)" != $cmd* ]] && rm $pidfile
	exec start-stop-daemon --start -c $user --chdir $home --pidfile $pidfile -m --startas $cmd
end script

I have similar scripts for my other coins.

NameCoin compile from source on Ubuntu

I’ve been having trouble with the binary qt on my windows machine. So I backed up the Namecoin wallet and compiled from source.

First, I got the source from the official namecoin-qt github project:

https://github.com/namecoin-qt/namecoin-qt.git

After getting this setup, I found that it did not work with the NOMP pool because of the batch processing.

So after asking some questions in the NOMP project, I was informed that the NOMP project is dead, but UNOMP is the new version. So I set up UNOMP (more on this later), and also that UNOMP has their own version of NameCoin.

Get the source:

cd ~/source
git clone https://github.com/UNOMP/namecoin-core.git

Install all the dependencies:

sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
sudo apt-get install libboost-all-dev

sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev

sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler

Compile:

cd ~/source/namecoin-core
./autogen.sh
./configure --with-incompatible-bdb
make

Getting NOMP to run at reboot on Ubuntu

There are several things you must do to accomplish this without any user intervention. It is up to you to decide if any of these pose as a security risk depending on your situation.

  1. Enable your user to automatically login
  2. Start all your CryptoCoins at login
  3. Unlock all your CryptoCoin Wallets at login
  4. Run NOMP as root

Enable your user to automatically login:

  • System Settings
  • User Accounts
  • Automatic Login

Start all your CryptoCoins at login:

    • Create a script for each coin “run_bitcoin-qt”
/usr/local/bin/bitcoin-qt -server
    • Create a “start_all_coin_wallets” script
echo Starting Crypto Coins...
/usr/local/bin/bitcoin-qt -server &
/usr/local/bin/mazacoin-qt -server &
/usr/local/bin/titcoin-qt -server &
/usr/local/bin/UniversalCurrency-qt -server &
/usr/local/bin/zetacoin-qt -server &
echo Wallets Started.
  • Here is the daemon version.  Seems to be more stable, but you have to compile the daemon’s for each coin.
echo Starting Crypto Coins...
/usr/local/bin/bitcoind -daemon &
/usr/local/bin/mazacoind -daemon &
/usr/local/bin/titcoind -daemon &
/usr/local/bin/UniversalCurrencyd -daemon &
/usr/local/bin/zetacoind -daemon &
echo Wallets Started.
  • Add the “start_all_coin_wallets” script to “Startup Applications”

Unlock all your CryptoCoin Wallets at login:

  • Create a script that passes the “walletpassphrase” command
  • Example:
    /usr/local/bin/bitcoin-cli walletpassphrase "this should be your passphrase in these quotes" 9999999
    
  • Since you don’t know how long it will take to bootup all your wallets, you can set this to run every 5 minutes just to be sure.
    • Do this by adding it to the “Scheduled Tasks”

Run NOMP as root

  • Why? because “node” needs to run as root or your website won’t work.
  • Create a “run_nomp” script, something like this
    echo Starting NOMP...
    cd /home/yourusername/www/nomp
    sudo node init.js
    
  • You will have to add a line to /etc/sudoers
    yourusername ALL=(ALL) NOPASSWD:ALL
  • Add “run_nomp” to “Startup Applications”
    gnome-terminal -e "/home/yourusername/bin/run_nomp"
    

Reboot your server and watch it boot up.

NOMP Setup

Nomp:
—-

cd ~/source
sudo apt-get install nodejs-legacy
sudo apt-get install redis-tools
sudo apt-get install redis-server
git clone https://github.com/zone117x/node-open-mining-portal.git nomp
cd ~/source/nomp

—-
Copied the nomp to my www folder and configured.
—-
Folders that needed configuring:
coins
pool_config
—-
Files that need configuring:
config.json
package.json
—-

Well, I got this configured and I’m happy to say that all the alt coin wallets that I attempted to mine solo before, but got 100% rejects, are now working. Perhaps it is because of the startum protocol built into this mining pool.

I also got the profitability coin switching working, although I only enabled Cryptsy for the profit checking.

So far, I like this little piece of software, and great job developers. It does seem to still be in beta, but for now is functional for what I need to do. Which is solo mining alt coins.

If I have time, I’ll see if I can help out, but doesn’t seem likely with my schedule.