All lessons · Rust scripts and ckb-std · Start here · Glossary
Absolute epoch since needs the 0x20 metric flag in the top byteWorkingFrom one fix
From one fix · Check: right · Checked 2026-11-19
An input since meaning "not before epoch N" must be 0x2000000000000000 | N: top byte 0x20 (absolute, epoch metric) with the epoch number in the low 24 bits. Without the flag the node reads the value as an absolute block number, which for any realistic epoch is already past, so the node enforces no epoch bound. A script that reads since as an epoch must check the metric flag itself, as this project's contract does by refusing a since whose top byte is not 0x20.
Why it matters: Without the flag the node treats an epoch number as a long-past block number. The intended epoch lower bound is then not enforced by the node, and the input is either unlocked early or refused by a script that checks the metric.
Builder side rule for setting the epoch flag.
Pattern
{ previousOutput: shard.outPoint, since: ABSOLUTE_EPOCH_FLAG | epoch }Taken from the commit, shortened.
A test changed in the same commit
It sits next to the fix. We did not run it.
- toastmanAu/daowow:
apps/web/test/freeze-tx.test.js - toastmanAu/daowow:
apps/web/test/entry-tx.test.js
- Concepts
- Since and time locks
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-09-25
- Last changed
- 2026-09-25
- Last checked
- 2026-11-19
- Check against the commit
- right: the lesson follows from its commit and still holds in the code today
Sources (2)
- 2026-09-25 · toastmanAu/daowow · more from this project
- 2026-09-23 · toastmanAu/daowow · more from this project
More about Rust scripts and ckb-std
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Absolute epoch since needs the 0x20 metric flag in the top byte", CKB lessons, https://pulse.lusocryptolabs.com/learned/scripts/absolute-epoch-since-needs-the-0x20-metric-flag-in-the-top-b, CC BY 4.0, last changed 2026-09-25.