Todas as lições · Rust scripts and ckb-std · Começa aqui · Glossário
24-bit epoch number overflowPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 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.
Porque importa: 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.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- 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
- Conceitos
- Since and time locks
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-17
- Última mudança
- 2026-11-17
- Última verificação
- 2026-11-19
- Verificação contra o commit
- certa: a lição sai do commit e continua a valer no código de hoje
Fontes (2)
- 2026-11-17 · toastmanAu/daowow · mais deste projeto
- 2026-11-17 · toastmanAu/daowow · mais deste projeto
Mais sobre 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
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
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.