Hi
Let me correct your memory a bit, kjj.
I asked:
Where can I get information how the "best chain value" and the "work" is computed/defined?
In the file $HOME/.bitcoin/debug.log, there are messages like:
SetBestChain: new best=0000000000000419f719 height=212580 work=666804971104474944731
This new best value are simply the first (highest) 10 bytes of sha256 (2 times sha-256 hashed) of the block's raw header data printed in hexadecimal. Nothing else.
work is "something" summed up from the target of the blocks in decimal notation. Firstly I looked at successive differences in hexadecimal.
At the beginning it is 100010001 (in hexa) , later e.g. at height 212580 1FFC8061F54 (in hexa decimal), so it seems to be increasing, but rather strong.
Finally I looked it up in the source of bitcoin-0.7.2, file src/src/main.h
(CBigNum(1)<<256) / (bnTarget+1) is the result which GetBlockWork() returns for each block, and the above mentioned "work" is the sum of these values.
Hence "work" is defined as 2
256 / (target+1) , rounded down to the next integer, and summed up until the current block of the block chain.
Thanks for pressing me to look the correct answer up in the source code.
smtp