Monday, 5 January 2015

Bitcoin Mining with p2pool and cgminer on ubuntu 2015

Doing bitcoin mining with p2pool lets you get incomes as stable as other pools, while avoiding some problems of centralized pools like deepbit and bitminter.

p2pool advantages : You do not have to trust the owner of a pool for you to pay your Bitcoins honestly. You are protected from DDoS attacks against the pool. You participate to prevent any pool to get 50% of the computing power of the network. And your payments are immediate to each block detected.

p2pool disadvantages : To operate, p2pool needs to be started on a computer with Bitcoin server software permanently open. This requires more memory. p2pool is also a bit more complicated to implement for a novice.

Password for the Bitcoin software : For the next steps, replace user by any user name of your choice, and password with any password of your choice. This password must be very difficult to guess, particularly if the computer on which the Bitcoin server is installed is accessible via the Internet without a firewall to protect its port 8332.

Ubuntu 64 bit with graphic drivers: These steps demonstrate how to install p2pool and cgminer on a computer with ubuntu. To work correctly, cgminer needs the 64bit version of ubuntu. And if you use an ATI graphics card, it is also necessary that the fglrx proprietary drivers are installed to take advantage of its calculation strenght.

Install Bitcoin

  1. Install Bitcoin software.
  2. Edit ~/.bitcoin/bitcoin.conf file on which you will add the following text :
    rpcuser=user
    rpcpassword=password
    server=1
    rpcport=8332

Install cgminer

  1. Download the last version of cgminer on the official website. (Choose the version with name ending with x86_64-built).
  2. Create the folder ~/cgminer and unpack the content of the downloaded file in this folder.

Install p2pool

  1. Open a terminal.
  2. Install required packages by using the following commandsudo apt-get install git python-zope.interface python-twisted python-twisted-web
  3. Download p2pool by using the following commandgit clone git://github.com/forrestv/p2pool.git ~/p2pool

Start bitcoin mining

  1. Open your Bitcoin software and wait until it is open and synced.
  2. Open a terminal, use the following command to start p2pool and wait until it is started.
    python ~/p2pool/run_p2pool.py
  3. Open a terminal, use the following command to start cgminer
    ~/cgminer/cgminer -o http://127.0.0.1:9332 -u user -p password

Bitcoin mining in a pool with BitMinter 2015

If you have an ATI graphics card, you must ensure you have the latest official graphics drivers installed, otherwise it won't work.

  1. Go to http://bitminter.com/.
  2. Click on JOIN to create your account.
  3. Select a service from the list from those displayed if you have an account with one of them. If you don't, you can simply create a Google account. Finalize your registration by choosing your password.
  4. Once you are in your BitMinter account, click on START ENGINE.
  5. Depending on your computer and your browser, you are asked if you really want to allow the execution of BitMinter. To our knowledge, BitMinter poses no risk at the time of writing. So you can answer yes.
  6. The BitMinter software displays your CPU and video cards. Click ENGINE START for each video card and CPU you want to start working on Bitcoin mining.
  7. Type your Bitminter username and password. You can wuse what you want for the Worker Name.
  8. Your graphic cards start working and BitMinter shows the performance of your hardware in MH / s in real time!
  9. Observe how many BTC you get over a few days in your BitMinter account. You can at any moment add a Bitcoin address in your BitMinter account where BitMinter should send your BTC earned!
Screen Shots
Bitcoin mining in a pool with BitMinter 2015Bitcoin mining in a pool with BitMinter 2015

Bitcoin mining in a pool with BitMinter 2015

Bitcoin mining in a pool with BitMinter 2015

Bitcoin mining in a pool with BitMinter 2015

Bitcoin mining in a pool with BitMinter 2015

Bitcoin mining in a pool with BitMinter 2015


Import a Bitcoin private key 2015

Importing a Bitcoin private key can allows to use a different Bitcoin wallet software or service without changing Bitcoin address. It can also be used to restore exported addresses for security purposes.

Private keys must be protected

Caution, private keys can allow to use funds associated with these addresses. Do not expose the private keys to a situation where they could fall into wrong hands. It is therefore preferable to encrypt the keys and securely erase any hard drive or USB key that contained an unencrypted private key.

Bitcoin software is not designed to share a key

Another important note, it is important not to use a private key simultaneously with the Bitcoin software and other online wallets. This practice is considered experimental and may cause operational problems with the Bitcoin sofware. If a problem occurs after this mistake, it is be necessary to export the private keys, reinstall Bitcoin and re-import private keys.

  1. Open your Bitcoin software.
  2. Click on the menu Help / Debug window (at the top).
  3. Click on the Console tab.
  4. If your wallet is encrypted, type the following command followed by the Enter key to unlock the wallet
    walletpassphrase (password) 600
  5. Type the following command to import the key
    importprivkey (private key) (label)
  6. Wait patiently for the import to be completed. The software will not respond for several minutes. It is important not to close the software while the import is still incomplete. The import is complete when the console is ready for a new command.
  7. Close and open the software to refresh the Bitcoin addresses list.

 


    

Generating Bitcoins 2015

Generating Bitcoins

In the Bitcoin system, the production of all the new money is done on a stable base. This money is equally paid to those who operate the Bitcoin network by doing Bitcoin mining.

Making money with your computer

So yes, Bitcoin mining allows to make money by letting a computer work. However! Bitcoin mining is a free and open market. It is not a easy way to make money out of thin air.

Gains with Bitcoin mining are proportional to the power of computer hardware to solve the mathematical calculations. The whole network is powered by these calculations, which rewards you for your services. To be profitable, Bitcoin mining have to generate profits despite the cost of equipment and the electrical cost to operate at full capacity. That may be difficult.



Technologies used for Bitcoin mining

At the dawn of Bitcoin, classic computers were enough to run the network. However, competition has intensified gradually as the use Bitcoin increased as a dynamic market. In order of effectiveness, CPU processors, ATI graphics cards and FPGA chips succeeded to each other. Today, all these technologies are outdated and are no longer profitable.

Due to strong competition, ASIC is the only technology that can now offer potential income. An ASIC chip is a chip specialized to perform specific calculations. Some companies such as Avalon and ButterflyLabs faced the challenge of producing ASICs for Bitcoin network. ASIC chips can produce up to 40 times more calculations per second than a graphic card for the same price with a much lower power consumption. However, unlike graphics cards, ASICs have no resale value outside of a use with Bitcoin.

Pool have more stable incomes

When starting with Bitcoin mining, it is important to understand that a computer has very little chance of solving a mathematical problem aired by Bitcoin. It is a matter of chance. The more powerful is the equipment used, the more it can make attempts per second, increasing the chances of success. However, without buying a fleet of very expensive ATI cards, Bitcoin mining alone can take weeks, months or years before touching any gain.

The pools are small cooperation of bitcoins miners who wish to combine their strength in order to share Bitcoins earned fairly. Being part of a pool is the best way to raise Bitcoins stably when you don't wish to invest heavily in computer parts. Many free open pools exists, such as bitminter.

the evolution of incomes with Bitcoin mining over time

Bitcoin mining is not a guaranteed investment. Indeed, the income can be earned with Bitcoin mining depend on several things. The value of the BTC (Bitcoin) is the first of all, because the value of Bitcoin fluctuates according to supply and demand. Since the creation of new BTC is stable and limited, an increase in demand for Bitcoin also means an increase in its value, and vice versa.

Competition and the difficulty are also important factors. The more there is people mining, the more the mathematical difficulty factor to generate Bitcoins increases, because the network Bitcoin is designed so that the same amount of money is created each month, regardless of the number of people working to generate this amount. This way, Bitcoin mining is a perfect market. If Bitcoin mining is too profitable, new investors arrives and dilute earnings. When Bitcoin mining is not profitable enough, some investors abandon, increasing the gains of subborn investors.

It is also interesting to note that the creation of new BTC is designed to gradually stop. Deprived of this source of income in the coming years, then Bitcoin miners will increasingly perceive optional transaction fees. Since transactions with fees are likely to be processed more quickly by the Bitcoin miners, banks and network users will be likely to add a tiny fee like a fraction of a cent for certain transactions.

How to start Bitcoin mining

The bitminter pool probably offers the easiest way to start without having computer knowledge. You can simply register with bitminter and click to start their software. The software immediately displays the calculation speed your computer gets to reach and earnings are displayed consistently and rapidly inside the bitminter account. It is then possible to transfer the obtained Bitcoins Bitcoin to an address that belongs to you.

In contrast, if you want to make Bitcoin mining alone, the procedure is generally more complicated. It requires to install the bitcoin software on a computer and change its configuration to start in server mode. Then, it requires to use a specialized command line software such as poclbm or cgminer on each computer used to generate Bitcoins. This software must connect to the server to receive Bitcoin calculations to be done and transmit the results.

There is also a possibility to avoid centralized pools and take good sides of both world with p2pool, which is a decentralized pool. It is still more complicate to setup than just using bitminter. However, you don't rely on a pool that is vulnerable to DDoS attacks or dishonnest pool owners practises and you get paid directly on your Bitcoin wallet without intermediate.

Participating on the Bitcoin network operations

Bitcoin mining is a way to participate in the Bitcoin network operation. Some only sees Bitcoin mining as an investment since it is designed to be an open and competitive market. Still, some people involved in Bitcoin mining also do it for the interest of helping the network to function. Each computer used for Bitcoin mining allows the system to verify the validity of each transaction and protects the network from any form of attack.