Bitcoin, generate coins in a common pool

    The Bitcoin cryptocurrency continues to evolve, the complexity of generating a block increases each time. Trading on exchanges is already at a very substantial amount. But generating one by one becomes almost impossible.
    Today we will talk about the generation of coins collectively - in a common pool. In this case, the prize for generating a block is shared among all participants in the pool approximately in proportion to the contribution to the generation of 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 less. In the long-term average, it turns out about the same (minus the percentage of the owner of the pool), but more evenly.

    What is Bitcoin, and how it works Habré already have articles. But about the generation in the general pool, the information is very fragmented even in his native wiki . This article discusses the mechanism of operation of pools, available pools, client programs, and some results.

    First a little terminology


    Block - a bundle of bitcoin exchange transactions signed by the SHA-256 cryptographic hash function.
    The signature of the block does not contain any key, anyone can generate and verify it, however, the signature of the block must be less than some “target” (if we consider the signature and target as 256-bit integers), roughly speaking - contain a number of nulls 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 is less than the target. Block example .

    Difficulty- the relative complexity of generating a block signature. Difficulty = 1 corresponds to the goal for which the first 32 bits are zeros. Accordingly, to generate a block signature, an average of '2 ^ 32 * complexity' of attempts (block hashes) is needed. Difficulty is recounted by all bitcoin clients approximately once every 2 weeks, so that the block generation rate is approximately 6 blocks per hour. The current complexity is approximately 157416 (the first 49 bits of the hash must be zeros and then 23 bits of the hash must be less than 6A93B3) Mining is the process of selecting the signature of blocks. It is the only source of increasing the “money supply” of bitcoins and at the same time serves to record all transactions made. Shara (share)





    - candidate for block signature - a block and its hash containing the first 32 bits of zeros. In terms of number, ball pools consider the contribution of each participant to the work of generating a block signature. With complexity equal to one, each ball becomes a signature, with the current one, only every 157416th on average.

    Pool - a server engaged in distributed mining - using the computing power of the participants. The pool distributes the current block to the participants and waits for the ball to be received. As soon as one of the participants sends a ball that is smaller than the current target, the pool announces the generation of a block signature. The prize for generating the block (now it is 50 BTC + voluntary transaction taxes) is distributed among the participants, the pool owner takes a certain share. Distribution rules vary from pool to pool, which will be discussed below.

    Outdated ball (stale share) - a ball that came from the participant too late after the corresponding block was already signed by someone. The client program searches for the block signature until it finds or until it receives a hang up. If the pool does not send a rebound or the client program does not understand these rebounds, then some of the ball (as they say, 0.5% -1.5%) will be outdated. Pooling support is implemented through long polling.

    Miner (miner) - a client-program for mining. To participate in the pool, you need a separate client program, because a regular Bitcoin client does not support mining in the pool.
    Also, an account is called a miner for one client client program on the pool. One participant can create several miners without additional registration on the pool in order to use several client programs (of different types and / or on different computers) and receive income from them in one wallet.

    Score based system- ball rating system, depending on the time they were received by the pool. The cost of balls with glasses grows over time working on one block, i.e. for the most recent balls will pay the most. This system is designed to counter cheating - a strategy for disconnecting from the pool after some time working on the block. If the balls are equivalent, then it turns out to be more profitable to disconnect after the pool receives the 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 the pools


    1) deepbit.net

    The largest of the pools. The aggregate computing power is 854 Ghash / s (gigahashes 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 obtaining your share:
    1) Proportional. In this case, the participant receives a share proportional to the number of found ball, and all balls are considered (except for stale share), and not only for a successfully signed block. Owner's share - 3%.
    2) Fixed per ball (Pay per share, PPS). The participant receives 0.00028584821460503 BTC for each (not stale) ball, 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, the participant will receive 90% of his share in the signature generation work. The owner’s share is thus 10%.
    A model is set for each miner account of the participant, so you can use both models at once if there are several CPU / GPUs.
    You can get your share immediately without waiting for the confirmation of the block. In addition, the share is not selected, 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 power pool. Total processing 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).
    The share of the owner of the pool is 2% (1 BTC for a prize of 50 BTC). Only those participants who sent balls for a successfully signed block receive a share from the prize. Accordingly, if a block was not signed by this pool, all the balls sent to this pool to this block are useless.
    The share of the prize is counted on points (score based system), the author of the points system is actually slush, the owner of the pool.
    Payment of a share is possible only after confirmation of the block - after 120 blocks signed after it (and this is about 20 hours).

    3) btcmine.com

    Power - 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 share of the prize is considered points. Payment of a share is possible only after block confirmation by 120 blocks.

    4) bitcoinpool.com

    Power - 34.3 Ghash / s
    Owner's share - only voluntary taxes (do not charge a percentage of 50 BTC). The share from the block is received by all participants who sent balls from the moment of signing the previous block by the pool.
    The share of the prize is considered proportional to the number of balls. Payment of a share is possible only after block confirmation by 120 blocks.

    5) Eligius

    Power - 31.8 Ghash / s
    A pool without the need for registration - just indicate your bitcoin address and your share will be transferred there, and immediately - 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 share - proportional to the number of balls from the previous block created by the pool. If the block becomes invalid, the number of ball found is recounted in the next block.
    Interestingly, this pool was apparently the first to introduce additional rules on transactions, which the pool includes in blocks - 0.00004096 BTC for 512 bytes of the transaction.

    6) swepool.net

    Power - 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 share (Pay per share). The current value of the balls is 0.00029220039715181 BTC, i.e. the commission is 8%. In addition, the payment of the cost is promised right away, without even waiting for the generation of the block.

    (power and pool rules are given at the time of writing)

    Client programs (miners)


    1) Ufasoft's SSE2 CPU miner - bitcoin-miner

    Uses a CPU that is 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 gives 12.5 Mhash / s if you give it all 4 cores (starting in 4 thread) and 9.5 Mhash / s if in 3 cores.
    The processor heats up to 60 degrees when loading 4 cores, which bothered me a bit (at a simple temperature of about 40), but it is quite possible to work. When loading 3 cores - heating to 53 and you can even watch HD-movies. Most of the time, I generated balls this way.
    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 Q9550 cores.

    2) m0mchil's python miner - poclbm

    Uses OpenCL. He didn’t want to work on the CPU for me, but on the video card 8600GT gives 6.8 Mhash / s. Alas, the miner at the same time loads the GPU core by 95% -99% and the video card is heated to 75 degrees. And it’s extremely difficult to do anything on a computer while the miner is working - the windows are even dragged jerkyly. Playing with the -f option yielded nothing.
    Perhaps the 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 the ATI Radeon HD 5970.

    There are still miners, but I have not tried:

    3) jgarzik's CPU miner
    4) Diablo's java GPU / CPU miner

    My results


    The first time I mined in April (when the difficulty was 82347) was about 26 hours. I mined 198 ball, of which 1 was obsolete. It was calculated about 930 Ghash.
    The first 17 balls were generated on the btcmine pool (in 1 hour 40 minutes), for this I did not get anything, because disconnected long before the end of block generation.
    The remaining balls are on deepbit, 28 in PPS mode and 153 in proportional. On this, I earned as much as 0.13430786 BTC.
    If I generated everything in PPS, I would have earned only 0.09891044 BTC, and if everything is proportional, then 0.14083968 BTC.
    The speed of generating a ball (1 ball on 4.7 Ghash) is in good agreement with the theoretical one (1 ball on 4.295 Ghash).
    If you take the then exchange rates on the exchanges mtgox (1.04 USD / BTC) and MICEX (28.19 RUB / USD), then my income was 3 rubles 81 kopecks.

    Now let’s calculate the rate of income from mining
    1) Each Mhash / s of mining speed gives about 20 balls per day,
    2) Taking into account the current block prize, pool tax, and April complexity, the income on Mhash / s will be 0.0119 BTC
    3) In terms of at the courses it will be 35 kopecks per day.
    After that, you need to estimate how much energy is required for generation (it depends very much on the equipment and its operating mode during the day) and how much this energy will cost.
    It turned out like this:
    4) 3.3 rubles per day of mining income (9.5 Mhash / s),
    5) CPU consumption - 71.25 watts (we consider only the addition for using 3 cores, mine only when the computer is already working - 3/4 from 95 watts of processor), i.e. 1.17 kWh per day,
    6) Which cost 4.55 rubles (tariff 2.66 rubles / kWh).
    That is, it made no sense to me to generate coins, because electricity costs more. What then I stopped at.

    The second time I started mining on May 15, when the cost of BTC on the mtgox exchange almost reached 9 US dollars.
    Given the current complexity, 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.

    conclusions


    In the long run, there is no difference in which mode it is more profitable to participate in mining, proportional to either PPS, by points or by balls, only for a signed block or for all blocks. Everything is determined by the "tax" of the owner of the pool (well, by the cheating of the participants in the pool).
    In the short term, it is a shame to mine for several hours and get nothing. Actually, we need the very uniformity for which it’s worth mining in a pool, and not alone.
    Right now, what I like most on deepbit.net is proportional mode.

    PS The total computing power spent on generation is now about 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.

    Also popular now: