How to get BIP34Hash and nMinimumChainWork?

5

1

I'm interested in the technical question of how you got BIP34Hash and nMinimumChainWork.

The changes were introduced here:

nMinimumChainWork: https://github.com/bitcoin/bitcoin/commit/ad20cddce2097c6561202777fccd257deb1a9810

BIP34Hash and BIP34Height: https://github.com/bitcoin/bitcoin/commit/33c90cf197223fb95f858db80d090d570d70498a

DATSEC

Posted 2017-02-02T11:33:30.630

Reputation: 83

You can run the rpc getblockchaininfo to get the current chain work. Consequently this is the minimum chain work, as the chain work can never decrease.user2084795 2017-02-13T14:24:14.883

Answers

3

The BIP 34 hash is the block hash at which BIP 34 was fully activated and all blocks less than version 2 were rejected as invalid.

nMinimumChainWork is a value that is updated at every release. It is retrieved from the getblockchaininfo RPC of a node that is up at the time of release. nMinimumChainWork is updated at the same time as assumevalid. It is calculated by summing the work done in each block which is calculated by doing 2^256/(target+1)

Andrew Chow

Posted 2017-02-02T11:33:30.630

Reputation: 40 910