> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metalntwx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Block Timestamps

> Read Metal's millisecond-precision block time and understand its EVM behavior

Metal's canonical block time has millisecond precision. JSON-RPC block responses
expose the millisecond remainder in `timestampMillisPart`, while EVM
`block.timestamp` remains second-resolution.

## Read the canonical block time

The standard `timestamp` field contains seconds since the Unix epoch. Existing
block decoders can continue to read this field at second resolution.

For millisecond precision, read `timestampMillisPart` from block responses
returned by `eth_getBlockByNumber` or `eth_getBlockByHash`, then compute:

```text theme={null}
canonicalBlockTime = timestamp * 1000 + timestampMillisPart
```

Both fields are JSON-RPC quantities encoded as hexadecimal strings. Decode them
before applying the formula. `timestampMillisPart` is in the range `[0, 999]`.

## EVM behavior

Contracts continue to read whole seconds from `block.timestamp`.

> [!WARNING]
>
> Do not use `block.timestamp` to distinguish blocks produced within the same
> second. Consecutive blocks produced within that second may expose the
> same value. Deadlines, vesting cliffs, and other time windows continue to
> operate at whole-second precision.

## Monotonicity

Canonical block time is strictly increasing. Consensus rejects a block whose
computed time is less than or equal to its parent's.

## Wall-clock skew tolerance

Validators check proposed block timestamps against a 60-second window on
either side of their local wall clock. A block more than 60 seconds ahead or
behind that clock is rejected. The timestamp must also be strictly greater
than the parent's. This tolerance allows for differences between validator
clocks while bounding both forward-dating and back-dating.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.