How to get BIP34Hash and nMinimumChainWork? 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
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)