Sunday 28 February 2016

Auto-login Script to connect to Internet using ISP or other portal.

When you use a cable internet in India, your biggest problem is not speed.. cause speed is very stable.
The problem is when u need your computer to stay online and it just disconnects.. and you have to login again through their portal.

I have wishnet and when I put something on download at night, I wake up the next morning to find somewhere around 2 in the night I got disconnected.
Or in case you are stake mining, you need your PC online 24/7.


Even if you Alliance, Sity cable internet or any other ISP's net connection that requires you to login every time you need to connect- this will be very helpful.

So I wrote this quick python script to keep an eye on my net connection and reconnect me when I get disconnected.
Just change the ID or class parameters to suit your needs.

https://gist.github.com/Retord/8d420ccef9b30d5168f5

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!


Decred Is Free And Open-source Software!

Before I say anything else...
Let me just SHOUT IT OUT!!!

MAIN NET IS GONNA LAUNCH IN 4 HOURS!!!

Everyone is very excited and eyeing the genesis block!

But there is time for that.. before that let me add in a few essential details in this blog post.

It is with great honour that the project can announce Decred is now free and open-source software. The project's GitHub has been filled with software repositories. As always, the most efficient way to raise an issue is to open one in the corresponding repository. The project can now accept pull requests in all of the repositories as well. Pull requests are greatly appreciated and the foundation upon which Decred is built.

In addition, final binaries for mainnet are now also available. These are encrypted 7z archives and can be decrypted using a key announced upon launch through a file archiver such as 7-Zip or p7zip. Thank you for your help and continued patience as we now brace ourselves for the launch of mainnet at 12:00 PM CST February 8th, 2016!
  • dcrd 433 files changed, 65252 insertions(+), 30116 deletions(-)
  • dcrwallet 106 files changed, 16328 insertions(+), 3728 deletions(-)
  • dcrrpcclient 24 files changed, 2538 insertions(+), 891 deletions(-)
  • dcrutil 52 files changed, 2053 insertions(+), 1062 deletions(-)
Sincerely,
Decred Project

Note: Commits to GitHub for the genesis block and network configurations will be made tomorrow as well.

Now with that out of the way----
There are 10^77 possible combinations for the password, that's been put on the binaries..
Sadly even if we had a few super computers, its not enough to brute that password.

I guess we will just have to wait a few more hours..

*Oh Gawd I wish I get the Genesis block!!* 

Sunday 7 February 2016

Decred PoS-PoW Hybrid System Explained

Okay, Slow down for a moment..
Let's get to understand what's PoW and PoS, and then we will see how Decred uses it.

But before that, lets talk about the hashing algorithm that Decred uses, Blake-256. As per the highly educated experts and everyone who knows that they are talking about, this type of algorithm is less vulnerable to the security issues facing the Merkle-Damgård construction-based hashing algorithms (such as SHA-256, the hashing algorithm of Bitcoin). So, when all the professors are saying something.. we can accept it.

Now, PoW and PoS!! As many of you know, a lot of cryptocurrencies use either pure PoW or pure PoS (check out the video below for a clear explanation of the two).



The challenges with using pure PoW are that, over time, miners have an outsized influence over the blocks that get mined, which can be used to gain consensus and to censor transactions. The main challenge with pure PoS is that early holders of the currency end up owning everything by merit of passive income on their coins.

Decred will create a hybrid of the two systems. This way, a balance between miners and currency holders (voters) can be achieved, which will create system of community-based governance.
The decisions around Decred will be made by both insiders and outsiders. The community will include bottom-up decision making through the Decred Assembly. Community members who make non-financial contributions to the project will thus have a voice as well.

The last important reason why Decred may become big is related to its development. Decred is built in Go, a future-oriented programming language developed by Google. Decred welcomes and empowers participants who want to build new and improve on existing features. Development is open and self-funded, to ensure long-term development sustainability.

Furthermore, the core-development team has expert knowledge and experience with cryptocurrencies, since it has been involved in the development of bitcoin and btcsuite, and trust me I have been talking to many of them on a regular basis... And they know their shit.

What is Decred?

No no no... Its not one of those 1000 bitcoin-wannabe crypto currencies!
Its different. I am gonna prove it.

So what makes Decred unique?

You might be wondering why another cryptocurrency in the first place.. Well, when Bitcoin was originally released, they were working in a market that didn't even exist yet. There were flaws in the concept that needed to be fixed. Bitcoin wasn't a failure, it changed the idea of currency for better or for worse. While a more extensive list of Decred's innovative features can be found on their website, the entire currency is mainly based on the idea eliminating the possibility of any centralized decision making by a handful of people. The idea of combining the very best of proof-of-work and proof-of-stake Blockchains in an attempt to utilize both systems is being implemented in Decred.

For more detailed info on the technical aspects checkout their thread on bitcointalk:
https://bitcointalk.org/index.php?topic=1290358.0

One of the most interesting things I like about Decred is their Funding Strategy.
The cryptocurrency itself is self-funding!!

So, rather than asking interested people for donations, the network will give a percentage to the developers for their contributions. This will help bring in more talented people into the development of Decred and the currency will self-sustain.

Decred includes a mechanism for self-funding development to ensure the project is and remains sustainable. A major sticking point for many open-source projects is that they require funding to survive, meaning they typically need to ask for donations and are limited by the funding they receive. To ensure that Decred remains free from the problems related to lack of funding, Decred's consensus rules include a 10% development subsidy in each block that is paid to a development organization on an ongoing basis.  - Source: wiki.decred.org
A digital currency that will attempt to shift the traditional dominance that proof-of-work miners have over the network to a more harmonious relationship with other users of the software. It is through this relationship between miners and users that Decred believes an environment is created that makes sustainable funding for the development of the software possible. "A consensus rule supported by miners and users that makes funds available for the development of the software through its use frees current and future developers from obligations to outside parties and keeps them beholden only to their userbase. If users are unhappy with development, they finally have a means to communicate their discontent in a way that has effect through a vote in the blockchain. This sets the stage for a system of community-based open governance directly connected to developers", said Jake Yocom-Piatt, CEO at Company 0, who has funded development of btcsuite since early 2013.

If that isn't BRILLIANT!!! I dont know what is.

Less than 22 hours left for the Mainnet launch, I am very excited!
I will be adding details about the AirDrop, wallet and mining in my subsequent blog posts.