All lessons · Developer tooling · Start here · Glossary
Verify header_deps against independently fetched headers, not against the tx's own listWorkingFrom one fix
From one fix · Check: right · Checked 2026-11-19
When checking a transaction that uses header_deps for entropy (for example, headers at fixed offsets from a cell's inclusion block), derive the expected headers yourself: get the creating tx with get_transaction, then get_header on its block_hash, then get_header_by_number for the scheduled heights. Only then compare them to the tx's header_deps. Taking the headers from header_deps makes the check circular, since it only confirms the transaction agrees with itself.
Why it matters: A checker that takes headers from the transaction's own header_deps would approve a transaction listing the wrong blocks, so wrong entropy inputs would reach the node marked safe to send.
Pattern
const h = await rpc.call("get_header_by_number", ["0x" + n.toString(16)]);Taken from the commit, shortened.
- Concepts
- Since and time locks, Network and RPC reliability
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-10-02
- Last changed
- 2026-10-02
- Last checked
- 2026-11-19
- Check against the commit
- right: the lesson follows from its commit and still holds in the code today
Sources (1)
- 2026-10-02 · toastmanAu/daowow · more from this project
More about Developer tooling
- Mirror on-chain rules off-chain with mutation tests
- Reset devnets instead of skewing the chain clock
- Separate submit and commit verification environments
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Verify header_deps against independently fetched headers, not against the tx's own list", CKB lessons, https://pulse.lusocryptolabs.com/learned/tooling/verify-header-deps-against-independently-fetched-headers-not, CC BY 4.0, last changed 2026-10-02.