📜 ⬆️ ⬇️

Bitcoin: you can’t take it easy

Bitcoin

Recently, our clients are increasingly turning to us with questions: can we use our dedicated and virtual servers for mining Bitcoins?

Mining bitcoins using virtual servers poses some difficulties. If we are talking about cloud servers, the payment for their use is calculated on the basis of actual consumption, and the mining process will bring not profit, but rather losses. If we are talking about virtual dedicated servers, then the generation of bitcoins with their help is hardly possible due to the limitations imposed by the virtualization system. Since for high-level services we use almost the same servers as in the selected configurations, we decided to conduct a special test for them and check how they would cope with the task of generating bitcoins.

')

A little bit about generating bitcoins


Bitcoins, as well as their numerous forks, are the so-called cryptocurrency. Cryptocurrencies call a special type of electronic currency: decentralized, not tied to any national currency, not subject to inflation, not controlled by any governing body.

In traditional monetary systems, the so-called gold standard was used for a long time, which guaranteed that each released currency could be exchanged for the corresponding amount of gold on demand. In cryptocurrencies, there is a peculiar analogue of the gold standard, called “proof of work”: the “release” of each monetary unit is carried out in the case of solving a cryptographic problem. This task is to calculate the value of the function. Over time, the level of complexity of this task grows.

Bitcoin generation is essentially a calculation of new blocks. A block is a data set consisting of two main parts: a header and a list of transactions. The header includes its own hash, the hash of the previous block, transaction hashes, as well as service information. As the first transaction, the generation of new bitcoins is recorded in the block, which, if successful, will be listed to the finder. Further, all or some of the recent transactions not yet included in the previous blocks are indicated.

The found block will be accepted by all other users if the numeric value of the header number is less than or equal to the target number, the value of which is regularly adjusted. If the block does not match the target, the service information in the header is changed, and the hash is recalculated. To find the block requires a very large number of attempts.

When an option is found, the node reports this to other connected nodes that are checking the block. If there are no errors, the block is considered to be added to the chain, and the following blocks will have to include its hash.

As mentioned above, over time, finding a new unit that meets the conditions of the problem becomes more and more difficult. The meaning of the test we had planned was to check how many bitcoins and for how long the processors of our dedicated servers can generate.

Description


Servers with the following characteristics of processors were selected for testing (indicators such as memory size and hard disk size do not affect the bitcoin generation process, so we do not indicate them; for the same reason, we did not take into account the use of HyperThreading technology; for better visualization The power of the cores of all the processors listed in the list is summarized)



Shortly after the test was launched, the Atom processor unexpectedly stopped responding to requests to the API, not even reaching the current level of complexity. Therefore, we decided to exclude it from further testing (the level of complexity at this point was 37392766.1364745; it took the processor a little more than a day to reach it).

The remaining processors reached the required level of complexity, which at the time of testing was 609482679.88835. After the current level of complexity was reached, we collected data on the calculation speed in hashes per second (hashespersec) for an hour; their average values ​​are shown in the graph below:

Bitcoin

findings


For a week of testing, none of the configurations managed to generate a single bitcoin block. To use even the most powerful server for mining only on a processor is completely useless. More recently, it was possible to generate bitcoins with the help of several powerful graphics cards. Recently, ASIC USB Block Erupter became popular - specialized computing devices for mining, which have already been written on Habré many times - see, for example, here , but they do not guarantee quick success.

At the moment, due to the increasing complexity, it is almost impossible to get a block without possessing gigantic computing power. Of course, you can connect to the pool - but you still have to wait a long time. You can also generate alternative cryptocurrencies (Litecoin, Namecoin, PPCoin, etc.), and then convert them into Bitcoins - but here, too, there are no guarantees of success.

You can earn money using dedicated servers in other, more traditional ways - of course, they are associated with a huge number of problems, but they are much more profitable and reliable.

For those who can not comment on posts on Habré, we invite to our blog .

Source: https://habr.com/ru/post/204044/


All Articles