Linked Questions

0
votes
1answer
25 views

Is there any protection in the Ethereum consensus or network protocol to avoid a block being mined with a timestamp 1000 years ahead of UTC time? [duplicate]

Will other nodes refuse the mined block if the timestamp is too far apart from local or UTC timestamp or will they blindely accept the block if the PoW is correct?
25
votes
3answers
6k views

Can a contract safely rely on block.timestamp?

How safe is it to use block.timestamp as contract expiration time? If a miner provides an incorrect timestamp in a block header, how much can it be off before it is rejected by other nodes? Is there a ...
16
votes
3answers
3k views

How do Ethereum mining nodes maintain a time consistent with the network?

We have established that the timestamp on a parent block has to be before the timestamp of a child block in Can a child block have an earlier timestamp than the parent block?. How are differences in ...
12
votes
3answers
3k views

what is block.timestamp

In a function, does block.timestamp record the time the transaction was processed, or the time the block.timestamp computational step was processed? Is block.timestamp the time the transaction is ...
17
votes
1answer
3k views

Is Solidity block.number more secure than timestamp?

In Solidity, some properties such as block.timestamp are attackable by miners and are not (strongly) protected by the protocol. How about block.number, could a miner introduce a randomly high number? ...
7
votes
2answers
515 views

Can a child block have an earlier timestamp than the parent block?

From From EIP 2, the Homestead difficulty adjustment algorithm is: block_diff = parent_diff + parent_diff // 2048 * max(1 - (block_timestamp - parent_timestamp) // 10, -99) + int(2**...
10
votes
2answers
646 views

What is the measured distribution of block times since Homestead?

The variance of block times should arguably follow a Poisson distribution. But by casual observation I've seen blocks fast as 4 s or 1 m 15 s. The average is around 14 s since Homestead. If it follows ...
3
votes
1answer
896 views

How does Ethereum avoid inaccurate timestamps in blocks?

A contract can reference the currently being mined contract's timestamp. This means that changing the timestamp of an in-progress to be mined block requires executing all contracts referencing that ...
4
votes
2answers
370 views

How Geth and Parity resolve timestamps when validating block headers?

Geth and Parity nodes differ in a fundamental way when they validate block headers. Background According to the yellow paper 4.3 timestamp: A scalar value equal to the reasonable output of Unix's ...
3
votes
2answers
139 views

Are there any misbehaving miners?

Many of the discussions I read about security relate to how miners can manipulate this or that aspect of the way a transaction gets processed, such as whether or not it's included, what it's timestamp ...
2
votes
0answers
417 views

Working with time in smart contracts

I know there have been quite a few questions surrounding time, and the use of block.timestamp. However, I still have a few questions design-wise. At what point exactly is it 'dangerous' to use block....
0
votes
2answers
69 views

Does the consensus going to fail if contract has “now” filed?

now keyword stands for current time. So if contract has now filed, peers may have different times leading to different data in blockchain.