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.
- toastmanAu/daowow:
apps/web/test/codec.test.js,crates/daowow-core/tests/gen_vectors.rs - toastmanAu/daowow:
tests/integration/tests/round_validation.rs,tests/integration/tests/security_refunds.rs,tests/integration/tests/security_seal.rs
- 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)
- 2026-11-17 · toastmanAu/daowow · more from this project
- 2026-11-17 · toastmanAu/daowow · more from this project
More about Rust scripts and ckb-std
- Comparing packed epoch values
- Median time vs tip timestamp for deadlines
- Absolute epoch since needs the 0x20 metric flag in the top byte
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.