13
votes
Accepted
January 19th, 2038: RIP Unix Timestamps
The 32-bit signed integer timestamp runs out in 2038. But Bitcoin uses a 32-bit unsigned integer for the timestamp. That runs out it the year 2106. We'll have to find a solution by then, not by 2038. ...
11
votes
Why don't the timestamps in the block chain always increase?
There is no requirement that blocks have a timestamp after the previous block. The only requirement is that the timestamp is greater than the median timestamp of the last 11 blocks. So this means that ...
10
votes
Accepted
What prevents similar time-warp attacks in Bitcoin as happened to Verge?
Nothing directly prevents it in Bitcoin, and indeed the attack has been demonstrated on testnet3 many times---it's the primary reason that testnet3 currently has almost three times as many blocks as ...
7
votes
Accepted
Why is two hours the maximum acceptable offset for Bitcoin blocks?
Transactions don't have a timestamp. Blocks have a timestamp. The difference is important, because the block timestamp on some of the blocks changes the difficulty.
Why is the maximum difference ...
7
votes
Accepted
How strict are the Unix Epoch time validation rules?
How strict are the time validation rules?
Very.
If the next block is mined more than 2 hours after the current block, would this not stall the blockchain?
No.
It doesn't break the rule "Full ...
7
votes
Accepted
Is timestamping needed for anything except difficulty adjustment
It seems to me that PoW overwrites whatever timestamps there may be, and in effect determines what "time" is for the blockchain.
I think this is your confusion: arguably, timestamping is ...
6
votes
Can a miner set the EXACT timestamp of a block?
Bitcoin miners can construct the block header, including the timestamp, however they want, as long as it adheres to the consensus rules. The shift you describe is well inside the 2 hour timerange, so ...
6
votes
Accepted
Can Taproot be used to commit arbitrary data to chain without any additional footprint?
Yes, you can commit to data this way, but there is nothing special about Taproot here.
The Pay-to-Contract construction used to tweak the root key in Taproot is generally usable, and has in fact been ...
6
votes
How strict are the Unix Epoch time validation rules?
I think you have a misconception about what this clause means:
Full nodes will not accept blocks with headers more than two hours in the future according to their clock.
You appear to be ...
5
votes
Accepted
where do the timestamps on blocks come from?
A miner applies their own timestamp to a block.
Nodes add the first block they receive to the top their chain. They will not replace the current tip of their chain with a newly received block just ...
5
votes
how can I insert an arbitrary sha256 hash into the blockchain?
One way to insert an arbitrary SHA-256 hash into the blockchain is by using it to generate a Bitcon address, then sending a very small amount of Bitcoin to that address. The Bitcoin wiki does a good ...
5
votes
Accepted
The role of timestamp
The timestamp is used primarily for establishing the difficulty. Without a timestamp, new nodes would not be able to determine the correct difficulty to be used for each 2016 block period as they ...
5
votes
Why does the median-past time average the last 11 block timestamps and not the last 12?
BIP 113's goal is not to aim for a specific offset.
Its goal is guaranteeing monotonicity (treating every block's timestamp as strictly larger than the timestamp of each of its ancestors). It does ...
5
votes
From where does the 2 hours limitation on bitcoin time stamp come?
I don't ever recall seeing an actual calculation for it, and I strongly suspect the reason is that it is "good enough".
The original, primary use of block timestamps is in difficulty calculations. ...
5
votes
Accepted
How does timejacking enable double spending?
The blog you linked to talks about a fairly sophisticated attack, involving large scale network manipulation.
The basic premise is:
You are able to identify the node that belongs to the person/...
5
votes
Can we look at how long it took to solve for the most recent block in the blockchain? (and how?)
Blocks have timestamps, but they are not very accurate. The protocol rules only (roughly) require them to not be more than 1 hour in the past and not more than 2 hours in the future. At least ...
5
votes
Accepted
How bitcoin miners choose timestamp in block header when mining?
My original understanding of mining is to pick a timestamp (the timestamp of when miners started mining) and then fix it.
There's no reason for that to be the case, as mining is progress-free. It is ...
4
votes
Why don't the timestamps in the block chain always increase?
There is a fair amount of leeway in the block timestamp. The timestamp for block N must be greater than the median network time, which is calculated as the median of the past 11 blocks, and also less ...
4
votes
Accepted
How could a time warp attack be prevented?
The simple solution is a soft fork that requires each block's time be equal to or greater than the time of the previous block on the block chain. That is, time on the block chain can't go backwards.
...
4
votes
How does a time warp attack work?
When there's a re-org of the chain of several blocks, isn't the total chainwork of both chains compared?
Yes, that's true. In fact, that's how a reorg of any size is considered. However, that wasn't ...
4
votes
Can a blockchain from the future be synchronized today?
Extremely creative question. Most of UTF-8's answer is correct. I'd like to observe a few consequences:
If someone brought a future blockchain to current reality and even 11 blocks were immediately ...
4
votes
Accepted
Why do testnet blocks have future timestamp?
Testnet is frequently attacked, abused, due to the complete lack of value and proof of work. A piece of code which is intended to allow a difficulty 1 block is none has been found in 20 minutes also ...
4
votes
Accepted
How is PSZ Timestamp encoded in Bitcoin core code?
04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73
The above is actually Bitcoin Script, not ...
4
votes
Does Cryptocurrency really need timestamps?
I think the question isn't so much whether this is possible, but whether this is desirable.
The block rate limit has several functions:
Keeping the stale block rate low, so that the effort a ...
4
votes
Accepted
what if the timelock is in the past?
If the nLockTime is less than or equal to the next block height, it can be included in the next block.
To explicitly answer your questions:
The CLTV op restricts the nLockTime field of the spending ...
4
votes
Proof of Work vs. Proof of History
To put it simply: digital things are infinitely reproducible with very little cost, and so if we are attempting to create a digital money system, we need to make sure that users cannot simply copy &...
4
votes
What would happen to Bitcoin if GPS/Galileo timing ceased to be available?
Bitcoin needs approximately sundial time accuracy to operate. Computers have their own free running clocks which provide more than enough accuracy in the absence of other references, and NTP sources ...
4
votes
Accepted
Why is there no block time bias to <10min due to increasing hashrate?
you are right, there is a bias. You can easily see it in the time between halvings:
3 years, 10 months, 19 days for the first epoch
3 years, 7 months, 12 days for the second epoch
3 years, 10 months, ...
4
votes
Accepted
Question about Bitcoin's Median Time Past
It is a bit weird, but it is simply not possible to have everyone's clocks be in sync, and so there must be leeway for a block to have a timestamp earlier than its predecessor. If my clock is a few ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
timestamp × 102blockchain × 23
block × 18
bitcoin-core × 13
transactions × 9
time × 8
hash × 7
protocol × 7
security × 6
mining-theory × 6
block-header × 6
network × 5
locktime × 5
time-warp-attack × 5
bitcoind × 4
attack × 4
block-interval × 4
difficulty-retargetting × 4
mining-pools × 3
blockchain.info × 3
api × 3
difficulty × 3
proof-of-work × 3
consensus × 3
hashpower × 2