Bitcoin Forum
July 30, 2024, 02:28:03 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Beginner info on the default bitcoin client  (Read 803 times)
terabit (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0



View Profile
August 20, 2012, 03:16:47 AM
 #1

This is written for GNU/Linux, I don't know if all the same information holds for other systems.

When you run bitcoind or bitcoin-qt (the two main clients) it creates ~/.bitcoin with some files in it. The biggest are the blk0001.dat and blk0002.dat files (together about 2.6 GB as of Aug 2012), these files are "raw" dumps of transaction history blocks.

wallet.dat and blkindex.dat (800 MB as of Aug 2012) are both Berkeley DB files. This is a library for dealing with big database files, it's got some useful command line tools http://docs.oracle.com/cd/E17076_02/html/api_reference/C/utilities.html

wallet.dat encryption: When you enable password encryption it uses AES-256-CBC encryption with a password derived from your password using iterated sha512 on the private keys fields only (source https://github.com/bitcoin/bitcoin/blob/master/src/crypter.cpp ). All private keys or none will be encrypted in a given wallet. You can still add new addresses to an encrypted wallet without a password (because they were already stored in there with encryption, getnewaddress just reveals them one by one) until you use up the address pool, you need to unlock it with the password to refill the pool of addresses.

blkindex.dat bitcointools: There are some python scripts here https://github.com/gavinandresen/bitcointools/ which can read the parse the index data base file, but I had some errors about database version when I tried to use it. The solution is to use db_dump ~/.bitcoin/blkindex.dat | db_read ~/foo/blxindex.dat to create a new version of blxindex.dat that bitcoin tools will be ok with, you can also cd into foo and ln -s ~/.bitcoin/blk0001.dat blk0001.dat both the block files (since they aren't berkeley db files) in order to use bitcointools. You may also need to use the db_recover command when moving between use of the C++ programs and the python ones.
Nyhm
Full Member
***
Offline Offline

Activity: 216
Merit: 100



View Profile WWW
August 20, 2012, 06:17:02 PM
 #2

This is a good rundown of the technical operations of the Satoshi (bitcoin.org) client. I'd hesitate to label this thread for "beginners." Then again, you've written it for GNU/Linux users, so "beginner" probably implies a technical user.

If you're a non-tech savvy newbie to Bitcoin, don't panic! Consider looking at VanillaWallet, a simple Bitcoin client. Then again, it's still only in Alpha development, so it has some rough edges and might not be 100% reliable yet.

[Bitcoin Game List] ~ [BitcoinGalaxy.net Live Bitcoin Visualization] ~ [PotentialGames.com]
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!