1

What role does the time play in the bitcoin header? Is it ok to set it to 1 sec after the last block and never change it while calculating? Will the block be rejected when the gap is to large?

If 2 people get the correct block ( reach the traget ) who will win? Does the time decide?

Information about the header is taken form here: https://en.bitcoin.it/wiki/Block_hashing_algorithm

    0

    What role does the time play in the bitcoin header?

    nTime is primarily used for calculating the difficulty at the next difficulty retarget.

    Is it ok to set it to 1 sec after the last block and never change it while calculating?

    Yes, but this will cause the difficulty to increase in a manner that is undesirable. Furthermore, if the time of the block is too far from real time, nodes may reject that block.

    If 2 people get the correct block ( reach the traget ) who will win? Does the time decide?

    The "winner" is decided by the blocks mined afterwards. The time is completely unrelated to this.

      0

      the time feature really doesn't play a role in the broadcasting of two simultaneously mined blocks. Those are just handled through broadcasting effect, forking and subsequent blocks mined. Time is started from the moment the miner began hashing to solve the POW. Its used to know how long it took in comparison with recent blocks found for the difficulty re-targeting calculation. It also serves as a record to know when a block was mined.

      • I believe OP is asking about the nTime field in the block header, which is an absolute timestamp, not the time since the miner started hashing. – Pieter Wuille May 13 '18 at 19:28

      Your Answer

      By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

      Not the answer you're looking for? Browse other questions tagged or ask your own question.