Which variable among the components of the block header is computed (or rather obtained) to achieve the difficulty posed by the bitcoin network?
Nonce or Previous block hash?
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.Sign up to join this community
The question is twisted here.Miners has to find nonce with their computation power inorder to solve the difficult puzzle and add the block to blockchain.
I think you're confusing terms here.
Which variable among the components of the block header is computed
The block components which are computed (hashed) are all of the components which make up the block header: version, previous block hash, merkle root, unix epoch time, difficulty target (bits), and nonce.
A value which represents how hard it will be to mine a block. Higher difficulty value = harder to solve. The difficulty of the genesis block is 1. All block difficulties are calculated as a ratio to the difficulty of the genesis block.
Proof of Work
When you calculate a proof of work, you must meet the minimum difficulty posed by the network, as you state. This validation step makes sure that the value of the block hash you provide is less than or equal to the difficulty target.
To illustrate this concept, you can validate one of the block hashes manually.
Concatenate (in this order, little endian, hex format) the version, previous block hash, merkle root, unix epoch time, difficulty target (bits), and nonce. You’ll see you can copy the first 160 characters from the Block 3 in hex link.
Run the command:
$ echo 01000000bddd99ccfda39da1b108ce1a5d70038d0a967bacb68b6b63065f626a0000000044f672226090d85db9a9f2fbfe5f0f9609b387af7be5b7fbb7a1767c831c9e995dbe6649ffff001d05e0ed6d | xxd -r -p | openssl sha -sha256 | xxd -r -p | openssl sha -sha256
Reverse the output from
And there’s the block hash!