CKB Pulse

All lessons · Rust scripts and ckb-std · Start here · Glossary

24-bit epoch number overflowWorkingFrom one fix

From one fix · Check: right · Checked 2026-11-19

An absolute epoch since carries only a 24-bit epoch number (max 0xFFFFFF). When a script requires an input since at or after an epoch computed from cell data (for example entry_end plus a wait), compute it with checked addition. Refuse any result above 0xFFFFFF when the cell is created, otherwise the guarded transition can never be satisfied.

Why it matters: A round whose draw epoch is past 0xFFFFFF would accept tickets but could never be sealed or drawn, so the participants' funds could not be returned through the draw.

A test changed in the same commit

It sits next to the fix. We did not run it.

Concepts
Since and time locks
Evidence
From one fix: from one project, checked against its commit
First seen
2026-11-17
Last changed
2026-11-17
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)

More about Rust scripts and ckb-std

All 35 in this topic

Do you maintain a project this lesson came from? Confirm or correct it

Cite this lesson
LusoCryptoLabs, "24-bit epoch number overflow", CKB lessons, https://pulse.lusocryptolabs.com/learned/scripts/24-bit-epoch-number-overflow, CC BY 4.0, last changed 2026-11-17.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.