<p>The Lightning Network's timeout to broadcast a justice transaction is measured in blocks, not a specific time. As the Bitcoin network regulates its block interval to approximately 10 minutes, setting a timeout of 144 blocks will give the Lightning user about 24h to react, give or take.</p>
<p>The Bitcoin network itself is not really aware of time, however, every block has a timestamp that generally must be within a couple hours of the actual time for other nodes to accept it. While blocks could have inaccurate timestamps theoretically, most blocks tend to be labeled fairly accurately.</p>
<p>There is another way to specify timelocks in transactions that is not height based, but refers to actual time. For that use, the set time is considered to have passed when the median timestamp of the last 11 blocks exceeds it.</p>

CC BY-SA 4.0
2022-01-24T01:19:38.770Z
2022-01-24T12:34:15.110Z
2022-01-24T12:34:15.110Z
Murch
<p>I recently learned about how the lightning network works, and one particular thing that I found interesting is that, to prevent fraud, the output for each commitment transaction contains a clause for the revocation secret. If a bad actor broadcasts a prior state of the payment channel to the blockchain, the other party can use the revocation secret within 24 hours to claim all the money held by the multi-sig address.</p>
<p>My question is, how does the bitcoin blockchain know how to &quot;count&quot; 24 hours? Is there anything programmed in the blockchain for tracking time (e.g. UNIX time)?</p>

<timestamp><time>
Is the Bitcoin Blockchain aware of time?
urban-jungle
# Is the Bitcoin Blockchain aware of time?

(Asked by: username_0 on 2022-01-24)

I recently learned about how the lightning network works, and one particular thing that I found interesting is that, to prevent fraud, the output for each commitment transaction contains a clause for the revocation secret. If a bad actor broadcasts a prior state of the payment channel to the blockchain, the other party can use the revocation secret within 24 hours to claim all the money held by the multi-sig address.

My question is, how does the bitcoin blockchain know how to "count" 24 hours? Is there anything programmed in the blockchain for tracking time (e.g. UNIX time)?

**Tags:** timestamp, time


---

## 1 answers

### Answer by username_1 on 2022-01-24. Score: 3 | Accepted answer

The Lightning Network's timeout to broadcast a justice transaction is measured in blocks, not a specific time. As the Bitcoin network regulates its block interval to approximately 10 minutes, setting a timeout of 144 blocks will give the Lightning user about 24h to react, give or take.

The Bitcoin network itself is not really aware of time, however, every block has a timestamp that generally must be within a couple hours of the actual time for other nodes to accept it. While blocks could have inaccurate timestamps theoretically, most blocks tend to be labeled fairly accurately.

There is another way to specify timelocks in transactions that is not height based, but refers to actual time. For that use, the set time is considered to have passed when the median timestamp of the last 11 blocks exceeds it.


---

