64. On Pool Mining Technicalities

64

On Pool Mining Technicalities

IN THIS THREAD, the concept of how Bitcoin pool mining works is discussed and how it should be done to avoid cheaters becoming part of the pool without sharing. Today, mining pools are the largest contributors to mining. Mining pools were not initially a concept that Satoshi Nakamoto described. They came up later as a suggestion by someone on the forum when the difficulty of mining began to increase as interest in Bitcoin increased. The best analogy to a bitcoin mining pool is co-workers sharing lottery tickets.

Cooperative mining

Posted by slush, November 27, 2010, 01:45:41 PM

Hi all,

since the bitcointalk has been hacked few months ago I temporary lost the access to this forum. Now the access is recovered, but Iā€™m not planning to continue with the pool support in this thread anymore, for more reasons. Mostly as newbies cannot post here, it cannot work as a full customer support; Iā€™ve received many complains about this particularly. Then, it is spaghetti-style forum and it is very hard to follow the discussion.

Few days ago we started official pool support ticket systemat http://support.bitcoin.cz. This support system is integrated also with support@bitcoin.cz, so writing an email to support@ bitcoin.cz is the right place if you need authorized reply from one of pool admins anytime soon. Right now weā€™re processing quite long backlog of emails there, but our target is to replyto all tickets in 24 hours. On http://support.bitcoin.cz is also knowledge base where weā€™re filling more and more Q&A every day.

I would like to invite you also to IRC #mining.bitcoin.cz,where is quite many people online, ready to chat and provide basic help with all the stuff.

Iā€™ll leave this thread open for unofficial discussion, but it is out of my time possibilities to follow the discussion here.

Join us on http://mining.bitcoin.cz! EDIT 27.12.2010: wiki page about pooled mining EDIT 17.03.2011: DaCoinMinster published GreaseMonkey script which tweaks the pool website itā€™s 3rd party tool, use it on your own risk.

What is Pooled Mining?

Pooled mining is a way for multiple users to work together to mint bitcoins, and to share the benefits fairly.

Why do I need it?

Bitcoins are ordinarily only ever created in chunks of 50 at a time, with the whole 50 paid to a single person. Furthermore, the race to get the 50 BTC prize in a given block is highly competitive.

If you set out mining on your own, it may be a long time before you can make a return. Pooled mining allows you to receive smaller, more frequent, steadier payouts instead. If you have a slower computer, or a CPU miner, then pooled mining may be the only way that you will ever mint any bitcoins at all.

How do I get started?

You need less than 10 minutes to start mining in pool. Visit http://mining.bitcoin.cz and follow instructions.

Original post:

Once people started to use GPU enabled computers for mining, mining became very hard for other people. Iā€™m on bitcoin for few weeks and didnā€™t find block yet (Iā€™m mining on three CPUs). When many people have slow CPUs and they mining separately, each of them compete among themselves AND against rich GPU bastards ;-), because everybody counts sha256 hashes from the same range. Two separate CPUs with 1000khash/s isnā€™t the same as one 2000khash/s machine!. But new feature of the official bitcoin client calledā€˜getworkā€™ now enables work of many computers together, so they donā€™t compete. Because there is now standalone CPU miner (thanks to jgarzik!) and ā€˜getworkā€™ patch is in official client now, I have an idea:

Join poor CPU miners to one cluster and increase their chance to find a block!

How that should work? There will be web page where you can register, enter your wallet address and get URL and your personal rpcuser/rpcpassword for your CPU/GPU miners. When you start own miner with these credentials, serverwill send you work which was not calculated yet by other members of cluster.

But when your client find winning hash, you do not get full reward for block (50BTC right now), but only proportional part, which you calculate. When you offer 1000khash/s for one day and whole cluster performance will be20000khash/s and it takes two days to find a block, your reward will be (50/20/2=)1.25BTC.

Advantages? When you have poor standalone computer, you need to wait many weeks or even months for finding full 50BTC reward. When you join cluster like this, you willconstantly receive small amount of bitcoins every day or week(depends on full cluster performance).

Disadvantages? You need to trust in central authority (me) that I donā€™t steal block for myself. But Iā€™m goofing around for few week and Iā€™m amazed with bitcoin idea, so I donā€™t plan to steal anybody right now :-).

Another possible problem is that somebody will ask for new work very often, but in fact he will not count real hashes. In this case it will look like he has very strong CPU and he should get big part of reward if cluster find a block. But there is a simple defense against cheaters: Central server sometimes send work which leads to ā€˜winningā€™ hash. Worker which donā€™t return this hash as matching will be permanently banned (login/password and IP address). This was succesfully solved by letting miners calculate proof-of-work. It is not anymore possible to be a part of cluster and not count hashes.

Are you interested in?

Re: Cooperative mining

Posted by ribuck, November 27, 2010, 10:21:02 PM

Quote from: grondilu on November 27, 2010, 10:21:27 PM

To me it seems that cooperative mining is a tough task, because the honnesty of participants has to be checked. Whatā€™s preventing someone to run a modified version of the client, that would just keep generated bitcoin for himself, while receiving bitcoins from others ?

<sigh>

Either I havenā€™t been very good at explaining why thereā€™s no possibility to cheat, or Iā€™m wrong. But if Iā€™m wrong, no-one has posted a specific objection. So Iā€™ll try to explain it again, by presenting a specific design to show that a dishonest client cannot cheat.

Suppose I operate a pooled mining server, and I recruit some clients who wish to pool their mining.

My server asks each client to do some hashing for it. It asks each client to submit any hashes they find that are above a certain threshold of difficulty. The server chooses a difficulty that is one-fortieth (1/40th) of the current ā€œofficialā€ difficulty level.

My server gets a constant trickle of candidate hashes sent back by the remote mining clients. Every now and then, oneof those hashes meets the official difficulty level and my server can generate a block, which earns my server 50 bitcoins.

I now distribute bitcoins to the remote mining clients, at the rate of one bitcoin for each hash that was submitted for the current block that was at or above 1/40th of the official difficulty level.

In the long run, I would expect to distribute 40 coins out of every 50 that my server generates, although there will be some fluctuation from block to block. Nothing in this scheme requires the clients to be honest, because there is no way that a dishonest client can cheat!

The client is calculating hashes that will generate 50 BTC for my server. Those same hashes are not of any use to a dishonest client. They cannot be used to generate 50 BTC for the dishonest client, because a different hash code is needed to encode the payment of the generated bitcoins to someone else. And if the dishonest client tries to cheat by generating hashes that will pay the generated bitcoins to themselves, then the hash codes they submit wonā€™t validate at my server and I wonā€™t distribute any share of the payouts to them.

So this scheme requires absolutely no trust of the client.

This scheme also does not require the mining client to have faith that the server is honest. If the server advertises that it is paying out 1BTC for each hash that is at least 1/40th of the official difficulty level, then every client that submits an ā€œeasyā€ hash for a block that was generated can check that they received their bitcoin. Any fraud would show up immediately.

Re: Cooperative mining

Posted by satoshi, November 28, 2010, 04:03:30 PM

ribuckā€™s description is spot on.

Pool operators can modify their getwork to take one additional parameter, the address to send your share to.

The easy way for the pool operator would be to wait until the next block is found and divy it up proportionally as: userā€™s near-hits/total near-hits from everyone

That would be easier and safer to start up. It also has the advantage that multiple hits from the same user can be combined into one transaction. A lot of your hits will usually be from the same people.

The instant gratification way would be to pay a fixed amount for each near-hit immediately, and the operator takes the risk from randomness of having more or less near-hits before a block is found.

Either way, the user who submits the hit that solves the block should get an extra amount off the top, like 10 BTC.

New users wouldnā€™t really even need the Bitcoin software. They could download a miner, create an account on mtgox or mybitcoin, enter their deposit address into the miner and point it at anyoneā€™s pool server. When the miner says it found something, a while later a few coins show up in their account.

Miner writers better make sure they never false-positive near-hits. Users will depend on that to check if the pool operator is cheating them. If the miner wrongly says it found something, users will look in their account, not find anything, and get mad at the pool operator.

Last updated