0

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

3

The keyword now returns the timestamp of the block in which the transaction was included. This value is provided by the miner when creating the block. When other miners validate that block, they just check that the timestamp of the block is correct (inside some range), and substitute the now keyword for that value when executing the code.

For more information on how is the block timestamp calculated, see this related answer: How would a miner cope with a huge block time?

0

Time needs to be in sync for nodes to connect in the first place (info from experience where several raspis running a private node without time sync could not connect).

I assume that the now keyword takes the time when the transaction was created on the local node. This time will then be sent to other nodes with the transaction.

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.