[PATCH] JSON-RPC getwork
m0mchil starts a discussion: [PATCH] JSON-RPC getwork.
m0mchil, author of getwork and the poclbm GPU miner

On November 23, 2010, Marek Palatinus, known on the forum as slush, posted a request in the thread where Momchil Georgiev (m0mchil) distributed a GPU miner. Was there any way to get the getwork patch into the official client? Patching and compiling on an old server was a pain.
The answer came an hour and 21 minutes later, from someone else. Satoshi Nakamoto started a thread titled “New getwork”. It opens by saying that a redesign of Georgiev’s getwork had been uploaded as SVN revision 189.
SNSatoshi Nakamoto (BitcoinTalk post, November 23, 2010, 7:50:12 PM UTC)m0mchil’s external bitcoin miner idea has solved a lot of problems.
Until then, the search for blocks had run only inside the Bitcoin client. getwork is the interface that hands that work to an outside program. Georgiev had published the patch 53 days earlier.
Georgiev registered on BitcoinTalk on February 5, 2010, and wrote a first post seven minutes later. The post was titled “NewLibertyStandard’s methodology”. NewLibertyStandard had been publishing a dollar exchange rate worked out from the cost of the electricity needed to generate bitcoins. Georgiev’s objection was that as more people joined in generating, the same electricity would produce fewer coins. The price the method gave could only go up, so the method was wrong.
The next day Georgiev added an explanation. The method was right as a way of estimating what it cost you to generate your own coins. But the cost of generation was not the market price.
Mm0mchil (BitcoinTalk post, February 06, 2010, 3:44:47 PM UTC)For evaluation of the market price you need a market.
An exchange service would be easy to build, the post went on: just provide a place where anyone can post bid and ask prices.
On February 22 Georgiev reported that a four-core machine had produced only one block in more than twelve hours, and listed four possible explanations. The third was that someone had built a modified client that computed on a GPU. Satoshi replied that it was “just a random streak of bad luck”. Four days later Georgiev apologised: it had been a connectivity problem. “Bitcoin gold rush paranoia I guess.”
On July 8 Georgiev reported a bug in the Windows build. If the Windows user name contained non-Latin characters, version 0.3 could not open its data folder. Version 0.2 had not had the problem. Satoshi thanked Georgiev the same day, and on July 9 reported having reproduced the bug and fixed it, in SVN revision 102. That was thirty hours after the report. Georgiev answered three days later.
Mm0mchil (BitcoinTalk post, July 12, 2010, 8:26:21 AM UTC)Satoshi, your are fast 😲! Thanks for fixing this!
By the end of July, Olipro and others were building and handing out versions that ran faster than the stock build. The day after Satoshi released 0.3.6, which took in those speedups, Georgiev wrote that the fastest possible stock build removes any advantage the “special” builds would have. That was good, because generation would be more evenly distributed. The official build should use every known optimisation, including CUDA and OpenCL.
On October 1 Georgiev started a thread titled “[PATCH] JSON-RPC getwork”. The patch lets an outside program ask the client for the data of a block that has not been solved yet, and send back a solution if it finds one. “It opens the way for external bitcoin miners,” the post says. Used over a network, it adds, the patch also lets several miners work for one client.
A little over six hours later Georgiev started a second thread, for an OpenCL miner written in Python. It takes block data through getwork, does the computing on a GPU, and returns the answer. It later went by the name poclbm. The opening post that survives is one Georgiev kept rewriting, and it now lists where the source is and answers to common questions. The original wording is preserved in a quotation in nelisky’s reply, posted 13 minutes later: “I hope someone will try this wonderful OpenCL bitcoin miner.” The OpenCL kernel, it says, “uses previous work by laszlo”. It signs off with “Have fun.”
nelisky called it an amazing solution, but added that it was not good for the masses, and that it would be better to build the miner into the client. Georgiev replied that integrating CUDA or OpenCL seemed to raise portability problems, and then gave a second reason.
Mm0mchil (BitcoinTalk post, October 01, 2010, 7:06:06 PM UTC)Also, my goal is actually to convince satoshi to patch the mainline. The patch must be crystal clear for this to happen.
The same post reports about 5,800 khash/s on an ATI 4350 graphics card.
On November 7 Jeff Garzik wrote that a scheme using connections that stay open was superior to getwork, in which the miner has to poll. The next day Georgiev agreed without argument. “I just wanted to make as few changes as possible using existing RPC server,” the reply says. “My hope was that BTC developers will evaluate the idea and make something better to get in the mainline.”
The patch had to be reapplied every time the official SVN moved on, and Georgiev kept announcing updates in the miner thread. On November 20 Satoshi wrote: “Thanks m0mchil for keeping up on the updates!” In the same post Satoshi urged people running GPU miners to upgrade quickly to a new version meant to shut down the abuse of free transactions. Enough of them were running the patched client for that appeal to be worth making.
Three days later came the scene this page opens with. Satoshi’s version returned its data in a slightly different form from Georgiev’s. On November 24 DiabloD3, the author of another miner, asked Satoshi to fix the implementation so that it complied with Georgiev’s specification. Twenty-five minutes later Georgiev stepped in.
Mm0mchil (BitcoinTalk post, November 24, 2010, 11:56:34 AM UTC)No need to do this, I’ll change the miner to comply. I am just a little busy right now.
Satoshi answered the same day: “This is the new spec.” On November 25 Georgiev announced that the miner had been updated to work with the official SVN 189. Version 0.3.17 came out the same day, and its list of changes begins with this line: “new getwork, thanks m0mchil”.
On November 27, four days after asking for the patch to be merged, slush had proposed a way of joining low-powered miners into one cluster. On December 8 slush reported that the server was almost ready. It worked with Garzik’s miner, with Georgiev’s and with DiabloD3’s. There was one problem: when the server handed out a low-difficulty target, the miners did not return the hashes that met it.
Eight hours later Georgiev answered: “I will change my miner to check lower targets.” The reply added a warning. GPUs were perhaps thirty or more times faster than CPUs, so a target that brought in one result a minute from a CPU might bring in one a second from a GPU. On December 16 slush opened the server, saying it worked with every miner that followed the standard getwork interface.
On July 12, 2011, Georgiev wrote a long post in a thread offering a 20 BTC bounty for an improvement to bitcoind. One reason for writing, the post says, was a feeling of some guilt over the “notorious” getwork.
Mm0mchil (BitcoinTalk post, July 12, 2011, 8:38:55 PM UTC)It was made with only one purpose - to experiment with mining outside of Satoshi’s code. I never imagined it will feed heavy loaded servers in the way it is doing it now. Sadly, it made pooled mining possible and at the same time allowed de-democratization of the mining process. I believe this can be fixed.
The post also says how. Pools should change so that a miner only has to prove that the block being solved includes the transaction paying the reward to the pool’s address. Miners would then decide for themselves which transactions to include and which chain to build on. “I am intending to have this implemented soon,” it ends.
| How mining was arranged | Who does the hashing to find a block | Who chooses the transactions and the chain to build on |
|---|---|---|
| Before getwork (until September 2010) | The client | The client |
| getwork (from October 2010) | A separate miner, often running on a GPU | The client that hands out work through getwork |
| Pools (from December 2010) | Many miners | The pool’s server |
| Georgiev’s proposal (July 2011) | The miner | The miner (the pool only checks that the block pays the pool) |
The mechanism that came after getwork was built by slush: Stratum, in 2012. In September of that year Georgiev wrote that poclbm now supported it.
Georgiev’s BitcoinTalk profile shows 171 posts in all and March 28, 2025 as the date of last activity. The last post is from July 2015. Of the 171 posts, 134 were written in the ten months from October 2010 to July 2011, and 88, more than half, are in the miner thread. This site holds 18 of the posts, from February 2010 to July 2011.
Georgiev built the thing before anyone asked for it, and built it to be merged. The patch was kept small so that Satoshi would read it. When Satoshi merged it in a different form, Georgiev changed the miner to match. A little over seven months later, Georgiev wrote about the consequences of getwork.
He never gave his name on the forum. His name is in the poclbm source he published: the author field of the packaging script reads Momchil Georgiev.
18 entries / 4 threads
m0mchil starts a discussion: [PATCH] JSON-RPC getwork.
m0mchil's reply in the thread "RFC: Remove mining from bitcoin?".
m0mchil's reply in the thread "Cooperative mining".
m0mchil's reply in the thread "[20 BTC] Multithreaded Keep-alive Implementation in Bitcoind".
m0mchil starts a discussion: NewLibertyStandard's methodology.
m0mchil's reply in the thread "*** ALERT *** Upgrade to 0.3.6".
Context post by m0mchil in BitcoinTalk topic 61. before msg433.
Context post by m0mchil in BitcoinTalk topic 1901. before msg24095.
Momchil Georgiev ↔ Satoshi Nakamoto
m0mchil starts a discussion: python OpenCL bitcoin miner.
Momchil Georgiev ↔ Satoshi Nakamoto
m0mchil starts a discussion: bitcoin 0.3 win64 - broken access to APPDATA if non-latin characters in username.