I'd like my smart contract to know if it's running on PoW or (in the future) PoS in Mainnet. Does checking for block.difficulty
solve the problem?
If so, what will be the value of block.difficulty
after Mainnet moves to PoS?
Difficulty will be 0 (zero), see https://eips.ethereum.org/EIPS/eip-3675#block-structure.