Odaily Planet Daily News Matter Labs developer relations engineer Antonio said on Github that, as announced a few weeks ago, the team is making important changes to the behavior of block.timestamp, block.number and blockHash on zkSync Era.
It is reported that block.timestamp, block.number and blockHash currently return the number, timestamp and hash value of the L1 batch respectively; after this update is completed, they will respectively return the number, timestamp and hash value of the L2 block .
Antonio explained: “Many applications require higher temporal fidelity, which can be achieved by referencing L1 batches. With these changes, contracts will be able to be timed at the L2 block level (roughly every few seconds) Once), this information is already available on the API, but with an upcoming change, developers will be able to access it directly in the smart contract. We are currently working on this change, which will be available on the Internally testing the update process."
Antonio also mentioned that in order to maintain the consistency and effectiveness of the protocol state and reduce the impact on existing projects, this update will not be done immediately, but will be changed during the catch-up period.