Bitcoind: Difference between revisions
RobertPollak (talk | contribs) added Github link |
Wickrick22 (talk | contribs) Added Theory of Operation. (The dead links will be populated right away.) |
||
Line 1: | Line 1: | ||
[[Image:Bitcoin Original Client.png|thumb|350px|right|The bitcoin original client]] | [[Image:Bitcoin Original Client.png|thumb|350px|right|The bitcoin original client]] | ||
Line 38: | Line 36: | ||
* Version 0.3.22 was released for all supported platforms on May 19th, 2011 <ref>[http://forum.bitcoin.org/index.php?topic=8894.0 Version 0.3.22]</ref>. | * Version 0.3.22 was released for all supported platforms on May 19th, 2011 <ref>[http://forum.bitcoin.org/index.php?topic=8894.0 Version 0.3.22]</ref>. | ||
* Version 0.3.20 was released for all supported platforms on February 21st, 2011<ref>[http://www.bitcoin.org/smf/index.php?topic=3704.0 Version 0.3.20]</ref>. | * Version 0.3.20 was released for all supported platforms on February 21st, 2011<ref>[http://www.bitcoin.org/smf/index.php?topic=3704.0 Version 0.3.20]</ref>. | ||
==Theory of Operation== | |||
Satoshi's Original Bitcoin client is a multithreaded C++ program. It is designed to be portable across Windows, Mac, and Linux systems. The multithreaded aspect leads to some complexity and the use of certain code patterns to deal with concurrency that may be unfamiliar to many programmers. Also, the code is aggressive in the use of C++ constructs, so it will help to be fluent with map, multmap, set, string, vector, iostream, and templates. As typical of a C++ program, l a lot of code tends to end up in the header files so be sure to search both the .cpp and .h files when looking for a function. | |||
The client is oriented around several major operations, which are described in separate detailed articles and summarized in the following sections. | |||
===[[Satoshi Client Initialization and Startup|Initialization and Startup]]=== | |||
Upon startup, the client performs various initilization routines including starting multiple threads to handle concurrent operations. | |||
===[[Satoshi Client Node Discovery|Node Discovery]]=== | |||
The client uses various techniques find out about other bitcoin nodes that may exist. | |||
===[[Satoshi Client Node Connectivity|Node Connectivity]]=== | |||
The client initiates and maintains connections to other nodes. | |||
===[[Satoshi Client Sockets and Messages|Sockets and Messages]]=== | |||
The client processes messages from other nodes and sends messages to other nodes using socket connections. | |||
===[[Satoshi Client Block Exchange|Block Exchange]]=== | |||
Nodes advertise their inventory of blocks to each other and exchange blocks to build block chains. | |||
===[[Satoshi Client Transaction Exchange|Transaction Exchange]]=== | |||
Nodes exchange and relay transactions with each other. The client associates transactions with bitcoin addresses in the local wallet. | |||
===[[Satoshi Client Wallet Services|Wallet Services]]=== | |||
The client can create transactions using the local wallet. The client associates transactions with bitcoin addresses in the local wallet. The client provides a service for managing the local wallet. | |||
===[[Satoshi Client RPC Interface|RPC Interface]]=== | |||
The client offers an JSON-RPC interface over HTTP over sockets to perform various operational functions and to manage the local wallet. | |||
===User Interface=== | |||
The user interface code is currently based on [http://www.wxwidgets.org wxWidgets] and is scheduled to be superseded by [[Bitcoin-qt]] in version 0.5.0. | |||
==See Also== | ==See Also== | ||
Line 57: | Line 91: | ||
[[Category:User Interfaces]] | [[Category:User Interfaces]] | ||
[[Category:Clients]] | [[Category:Clients]] | ||
[[Category:Developer]] | |||
[[Category:Technical]] | |||
[[Category:Free Software]] | [[Category:Free Software]] | ||
[[Category:License/MIT-X11]] | [[Category:License/MIT-X11]] | ||
[[Category:Open Source]] | [[Category:Open Source]] |
Revision as of 21:28, 17 September 2011
The Original Bitcoin client is the first bitcoin client in the network's history. It is also the official client of the bitcoin project. It's available under the MIT license for Windows, 32 and 64-bit GNU/Linux-based OSes and Mac OS X.
The client comes with two executables, a GUI and an command line interface (CLI).
Executables
See running bitcoin for more detail and an example of the configuration file.
Bitcoin (GUI)
The bitcoin GUI provides an easy to use wxWidgets-based interface. It allows to send coins and to monitor:
- transactions from and to the opened wallet
- block creations
- confirmations of transactions
- balance of the wallet
Bitcoind (CLI)
Bitcoind is both a headless daemon and a client for the same daemon. It also provides a JSON-RPC interface, allowing it to be controlled locally (via bitcoind or another CLI client) or remotely. Various commands are made available by the API.
To use locally, first start the program in daemon mode:
- bitcoind -daemon
Then you can use the same program to execute API commands, e.g.:
- bitcoind listreceivedbyaddress 0 true
- bitcoind getbalance
To stop the bitcoin daemon, execute:
- bitcoind stop
History
- Version 0.3.24 was released for all supported platforms on July 8th, 2011 [1].
- Version 0.3.23 was released for all supported platforms on June 13th, 2011 [2].
- Version 0.3.22 was released for all supported platforms on May 19th, 2011 [3].
- Version 0.3.20 was released for all supported platforms on February 21st, 2011[4].
Theory of Operation
Satoshi's Original Bitcoin client is a multithreaded C++ program. It is designed to be portable across Windows, Mac, and Linux systems. The multithreaded aspect leads to some complexity and the use of certain code patterns to deal with concurrency that may be unfamiliar to many programmers. Also, the code is aggressive in the use of C++ constructs, so it will help to be fluent with map, multmap, set, string, vector, iostream, and templates. As typical of a C++ program, l a lot of code tends to end up in the header files so be sure to search both the .cpp and .h files when looking for a function.
The client is oriented around several major operations, which are described in separate detailed articles and summarized in the following sections.
Initialization and Startup
Upon startup, the client performs various initilization routines including starting multiple threads to handle concurrent operations.
Node Discovery
The client uses various techniques find out about other bitcoin nodes that may exist.
Node Connectivity
The client initiates and maintains connections to other nodes.
Sockets and Messages
The client processes messages from other nodes and sends messages to other nodes using socket connections.
Block Exchange
Nodes advertise their inventory of blocks to each other and exchange blocks to build block chains.
Transaction Exchange
Nodes exchange and relay transactions with each other. The client associates transactions with bitcoin addresses in the local wallet.
Wallet Services
The client can create transactions using the local wallet. The client associates transactions with bitcoin addresses in the local wallet. The client provides a service for managing the local wallet.
RPC Interface
The client offers an JSON-RPC interface over HTTP over sockets to perform various operational functions and to manage the local wallet.
User Interface
The user interface code is currently based on wxWidgets and is scheduled to be superseded by Bitcoin-qt in version 0.5.0.