P2Pool code documentation

From Bitcoin Wiki
Revision as of 22:37, 11 June 2012 by Nibor (talk | contribs)
Jump to: navigation, search

Ignore this page for the minute. Is just a scratch pad for documenting the p2pool code. Will tidy up once initial pass done.


Makes extensive use of twisted.defer. This allows it to "yield" to allow long running network code to complete. Read up on Python Generators and this before progressing!

Contains main startup code.

Tests connection to bitcoind. Prints hash of latest block to show bitcoind is up to date.

Tests connection to p2pool network.

Gets address to use for payout either from file or bitcoind. Validates address and checks local bitcoind owns it.


I think this handles all the binary data types used in the bitcoin protocol to send data over the network wire. These are nasty as very low level and many big endian/little endian complications. The p2pool network protocol uses these also. Do not think you need to really understand this unless making changes at this low level.