Bitcoin Forum
April 26, 2024, 06:33:09 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Mining Pool Developer's Reference  (Read 1158 times)
sinisterchipmunk (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
August 29, 2011, 09:27:24 PM
 #1

I've been working on a new mining pool, written in Ruby. Yesterday, it passed its first major milestone: with 2 miners connected, the pool's first block was minted on testnet. This proved that the pool knew the difference between good blocks and bad, and what to do with the data.

I'm not yet ready for a live test, but am hoping to recruit some beta testers at some point in the not-too-distant future to run the pool in the Real World.

For now, there's lots more to be implemented. The software in its current state is a basic, no-frills pool. Now that it's demonstrated at least the minimum expected capabilities of a pool (that is, turning shares into blocks and appropriately converting both into credits), I'm ready to start implementing more advanced capabilities such as long polling.

After digging deep into the wiki and forums for an ungodly number of hours, I realized I had to dump everything I've learned about Bitcoin development (at least, from a mining pool's perspective) somewhere. Besides helping me remember what I was thinking when I have to maintain the code 6 months from now, it's my hope that my brain-dump will be helpful to other developers out there. It's nothing new, it just takes everything I've discovered (through trial and error, reading raw data dumps, crawling the Wiki and scouring the forums) and puts it all in one place.

So without rambling on too much more, here're the links to both:


In addition to hopefully being of some help to someone out there, I'd also really appreciate anyone correcting me where I've got my facts wrong and/or pointing out where I need to elaborate. The existing documentation is woefully sparse, and as someone with fairly little Bitcoin experience, I've had to do a moderate amount of guesswork.
1714156389
Hero Member
*
Offline Offline

Posts: 1714156389

View Profile Personal Message (Offline)

Ignore
1714156389
Reply with quote  #2

1714156389
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
willphase
Hero Member
*****
Offline Offline

Activity: 767
Merit: 500


View Profile
August 29, 2011, 09:47:09 PM
 #2

Nice guide. The getwork completion response error value isn't always null - it can contain a json array consisting of e.g.

"error": {
  "code": int,
  "message": string
}

Not sure what miners do with this though, probably throw it away.

Will

sinisterchipmunk (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
August 29, 2011, 10:10:20 PM
 #3

Thanks!

--and nice catch! I completely overlooked error handling. I've now added a section to the guide.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!