mining principle – A query about transaction broadcasting and block creation
If I undestend the your query, you referer to the lockTime contained in the transaction and never the block timestamp.
The lockTime is a int worth, and this worth rappresent “When the transaction may be unlockd to an inputs” and never “When the transaction was revealed”
Lock time: Defines the primary instantaneous wherein the transaction is taken into account legitimate and may be transmitted on the Bitcoin community, represented by an integer worth between 0 and 500 million, assuming completely different meanings primarily based on the worth assigned, that’s:
- Lock time = 0: the transaction is propagated and executed on the instantaneous of
- 0 < LockTime <= 500: the worth is interpreted as a block top, ie the
transaction might be legitimate solely after the block with top
equal to the lock time worth has been revealed.
- Lock time> 500 million: the worth is interpreted as a unix timestamp and
due to this fact the transaction might be legitimate solely after the
date represented by the lock time worth.
If you happen to imply if the transaction has a timestamp, the reply is 2:
Inside the construction the transaction doesn’t have a timestamp, however
fairly a lock time.
The transaction might have an insertion second within the block, which
is determined by the block, as a result of it’s he who holds the timestamp as a
An actual use case:
My transaction has a block timestamp equal to 8/23/2019, 2:08:43 PM GMT + 2, this represents the time wherein the miner began the cryptographic problem, and it’s the instantaneous wherein the miner has additionally considered my transaction together with it within the block.
My transaction has a lockTime of 0 as a result of it’s an instantaneous execution transaction.
Nobody excuses that my transaction earlier than the block was revealed was ALSO inside another block with a barely completely different timestamp
If you need have flip an in depth clarification of what and the way a transaction works, I like to recommend this studying on bitcoin e book