Bitcoin cryptocurrency continues to evolve, the complexity of generating a block increases each time. Trading on the stock exchanges are already on very substantial amounts. But to generate alone becomes almost unreal.
Today we will talk about the generation of coins collectively - in the general pool. In this case, the prize for generating a block is divided among all the participants in the pool, roughly in proportion to the contribution to generating the block.
Due to the large total computing power of the pool, block generation occurs much more often than if you work alone, but the prize for each participant is smaller. In the long-term average, about the same amount is obtained (minus the percentage of the pool owner), but it is more uniform.
What is Bitcoin, and how it works on Habré already
have articles . But on the generation in the general pool, the information is very fragmented even in
his own wiki . This article describes the mechanism of the pools, the existing pools, client programs and some results.
First some terminology.
A block is a bundle of bitcoin exchange transactions signed by the SHA-256 cryptographic hash function.
The block signature does not contain any key; anyone can generate and verify it, but the block signature should be less than some “target” (if we consider the signature and target as 256-bit integers), roughly speaking, contain some zeroes at the beginning bit. Thus, it is difficult to generate the correct signature - you need to select the block parameters for a long time so that the block hash turns out to be smaller than the target.
Block example')
Difficulty (difficulty) - the relative difficulty of generating a block signature. Difficulty = 1 corresponds to a goal in which 32 first bits are zeros. Accordingly, to generate a block signature, an average of 2 ^ 32 * complexity 'attempts (block hashes) is needed. The complexity is recalculated by all Bitcoin clients about once every 2 weeks, so that the block generation rate is about 6 blocks per hour. The current complexity is approximately 157416 (the first 49 bits of the hash must be zeros, and then the 23 bits of the hash must be less than 6A93B3)
Mining (mining) - the process of selecting the signature blocks. It is the only source of increase in the “money supply” of bitcoins and at the same time serves to fix all the transactions performed.
A ball (share) is a block signature candidate — a block and its hash containing 32 first bits of zeros. In the amount of ball pools, the contribution of each participant to the work on generating a block signature is considered. With a complexity equal to one, each ball becomes a signature, with the current one, only every 157416th average.
Pool (pool) - a server engaged in distributed mining - using the computational power of participants. The pool distributes the current block to the participants and waits to receive the ball. As soon as one of the participants sends a ball that is smaller than the current target, the pool announces the generation of the block signature. The prize for block generation (now it is 50 BTC + voluntary taxes from transactions) is distributed among the participants, the owner of the pool takes a certain share. The rules of distribution vary from pool to pool, this will be discussed below.
Outdated ball (stale share) - a ball that came from a member too late, after the corresponding block was already signed by someone. The client program searches for the block signature until it finds it or until it is released. If the pool does not hang up or the client program does not understand these hooks, then some part of the ball (as it is written, 0.5% -1.5%) will be outdated. Support "rebound" in the pools is implemented through a long polling.
Miner (miner) - client-program for mining. To participate in the pool, you need a separate client program, because ordinary Bitcoin client does not support mining in the pool.
A miner is also called an account for one participant's client-program on the pool. One participant can create several miners without additional registration on the pool in order to use several client programs (different types and / or on different computers) and receive income from them in one wallet.
Score based system - a ball assessment system, depending on the time they are received by the pool. The cost of balls with glasses increases with the time of work on one unit, i.e. for the most recent balls will pay the most. This system is designed to counteract cheating - a strategy to disconnect from the pool after some time working on the block. If the balls are equivalent, then it is more profitable to disconnect after the pool has received a total number of balls equal to 0.435 * complexity and switch to single generation (or to PPS, see below). But this is considered cheating.
Now about pools
1)
deepbit.netThe largest of the pools. The total computational power is 854 Ghash / s (gigageshash per second). According to bitcoinwatch.com, this pool generates almost half of the block signatures (see diagram), which has already begun to cause concern.

There are two models for getting your share:
1) Proportional. In this case, the participant receives a share proportional to the number of found balls, and all balls are counted (except for the stale share), and not just for a successfully signed block. Owner's share - 3%.
2) Fixed per ball (Pay per share, PPS). For each (non-stale) ball, the participant receives 0.00028584821460503 BTC, regardless of the share in the block signing, etc.
It is not difficult to calculate that this price of balls is almost exactly equal to 50 BTC * 0.9 / Difficulty. Those. in the long-term average participant will receive 90% of their share in the work on the signature generation. The share of the owner, thus - 10%.
The model is set for each miner account of the participant, so you can use both models at once, if there are several CPU / GPU.
You can get your share right away without waiting for the block to confirm. In addition, the fraction is not taken even if the block turns out to be invalid (the block will be invalid if a longer chain of blocks is generated somewhere that does not include this one).
2)
mining.bitcoin.cz (also known as slush's pool)
The second pool in power. Total computational power - 312 Ghash / s. Now this pool generates about a sixth of the block signatures (although in April it had a third of the total capacity).
Pool owner's share - 2% (1 BTC for a 50 BTC prize). Only those participants who sent balls for a successfully signed block receive a share of the prize. Accordingly, if the block was not signed by this pool, all the balls sent to this pool on this block are useless.
The prize share is calculated on points (score based system), the actual author of the points accounting system and is slush, the owner of the pool.
Payment of a share is possible only after confirmation of the block - after 120 blocks signed after it (which is about 20 hours).
3)
btcmine.comPower - 146 Ghash / s
Registration is open. Owner's share - 2%. Only those participants who sent balls for this block receive a share from the block.
The prize share is calculated on points. The payment of a share is possible only after the block is confirmed by 120 blocks.
4)
bitcoinpool.comPower - 34.3 Ghash / s
Owner's share - only voluntary taxes (a percentage of 50 BTC is not taken). All participants who sent balls from the moment the pool signed the previous block receive a share from the block.
The share of the prize is considered to be proportional to the amount of the ball. The payment of a share is possible only after the block is confirmed by 120 blocks.
5)
EligiusPower - 31.8 Ghash / s
A pool without the need to register - just enter your bitcoin address and transfer your share there, and right away - directly in the generated block (using the
Generated transaction ).
Owner's share - voluntary taxes in transactions plus 0.00000001 BTC per second (about 0.0003%). Miner's share is proportional to the amount of the ball from the previous block created by the pool. If the block becomes invalid, the number of found balls is recalculated into the next block.
Interestingly, this pool appears to be the first to introduce additional rules for transactions, which the pool includes in blocks - 0.00004096 BTC for 512 bytes of transaction.
6)
swepool.netPower - 1.8 Ghash / s
Fresh replenishment in the list of pools, is positioned as a competitor to the PPS mode on deepbit.
Share for mining - fixed per ball (Pay per share). The current value of the balls is 0.00029220039715181 BTC, i.e. commission is 8%. In addition, the payment of the cost is promised at once, without even waiting for the block to be generated.
(power and pool rules are given at the time of this writing)
Client programs (miners)
1)
Ufasoft's SSE2 CPU miner - bitcoin-miner
Uses CPU, optimized for SSE. According to the author, about 1000 processor cycles are required per hash.
I get about 1100 clock cycles - on my Q9550 quad, the miner issues 12.5 Mhash / s, if you give it all 4 cores (by running in 4 thread) and 9.5 Mhash / s, if it is 3 cores.
The processor heats up to 60 degrees when loading 4 cores, which strained me a little (at a simple temperature of about 40), but it is quite possible to work. When you load 3 cores - heat up to 53 and you can even watch HD movies. Most of the time, this is what generated the balls.
For comparison, the official Bitcoin client (bitcoin-0.3.20.2) mines at a speed of 4.9 Mash / s, if you give him all 4 cores of Q9550.
2)
m0mchil's python miner - poclbmUses OpenCL. He did not want to work with me on the CPU, but on the 8600GT Vidyashka it gives out 6.8 Mhash / s. Alas, the miner loads the GPU core by 95% -99% and the Vidyashka warms up to 75 degrees. And it is extremely hard to do anything on the computer while the miner is running - the windows are even dragged in jerks. Playing with the -f option did not give anything.
Perhaps, owners of more powerful video cards will be able to get higher results and smaller brakes. Judging by the
wiki , you can get 802 Mhash / s on ATI Radeon HD 5970.
There are miners, but I have not tried:
3) jgarzik's CPU miner
4) Diablo's java GPU / CPU miner
My results
The first time I mine in April (when the difficulty was 82347) - about 26 hours. Namaynil 198 ball, of which 1 was obsolete. Calculated was about 930 Ghash.
The first 17 balls were generated on the btcmine pool (in 1 hour and 40 minutes), for which I received nothing, because disconnected long before the end of the block generation.
The remaining balls are on deepbit, 28 in PPS mode and 153 in proportional mode. With this I earned as much as 0.13430786 BTC.
If I had generated everything in PPS, I would have earned only 0.09891044 BTC, and if everything is proportional, then 0.14083968 BTC.
The generation speed of the ball (1 ball per 4.7 Ghash) coincides well with the theoretical one (1 ball per 4.295 Ghash).
If we take the courses on the mtgox (1.04 USD / BTC) and MICEX (28.19 RUB / USD) exchanges, then my income was 3 rubles 81 kopecks.
Now calculate the rate of income from mining
1) Each Mhash / s mining speed gives about 20 balls per day,
2) Taking into account the current prize per block, pool tax, and the April complexity, the income per Mhash / s will be 0.0119 BTC
3) In terms of courses, this will be 35 kopecks per day.
After that, it is necessary to estimate how much energy is required for generation (very much depends on the equipment and its mode of operation during the day) and how much this energy will cost.
I did this:
4) 3.3 rubles per day of mining income (9.5 Mhash / s),
5) Processor consumption - 71.25 watts (we consider only the additive for using 3 cores, mine only when the computer is already running - 3/4 of the 95 watt processor), i.e. 1.17 kWh per day,
6) Which cost 4.55 rubles (tariff 2.66 rubles / kWh).
That is, I had no reason to generate coins, because electricity costs more. What I then stopped.
The second time I launched mining on May 15th, when the cost of BTC on the mtgox exchange almost reached 9 US dollars.
Taking into account the current complexity, the income fell to 0.059 BTC per day, but now it costs 12.25 rubles (mtgox 7.4 USD / BTC, MICEX 28.1 RUR / USD). Those. mining gives 7.70 rubles per day or 32 kopecks per hour.
findings
In the long term, there is no difference in which mode it is more profitable to participate in mining, proportional to either PPS, on points or on balls, only for a signed block or for all blocks. Everything is determined by the "tax" of the owner of the pool (well, and cheating members of the pool).
In the short term, it is a shame to mine a few hours and get nothing. Actually, we need the same uniformity, for which it is worthwhile to mine in the pool, and not alone.
Now I like best on deepbit.net in proportional mode.
PS The total computational power expended on generation is now around 2023 GHash / s, which is approximately equal to 25.7 TeraFLOP / s, i.e. already 4.5 times the total capacity of the BOINC project.