All lessons · Light client · Start here · Glossary
Give light clients the committing block of a cell, not just its outpointWorkingChecked by the owner
Checked by the owner · Check: right · Checked 2026-11-19
A CKB light client that only watches scripts cannot look a cell up by outpoint, so a service that hands one a cell should also give the block number and hash of the transaction that created it. The client can then fetch that transaction by hash and watch for the cell being spent from that block, instead of scanning from genesis.
Why it matters: Without the committing block, a script-watching light client has to scan from genesis to find the cell and notice when it is spent.
Pattern
blockNumber: a.blockNumber ?? null, blockHash: a.blockHash ?? null,Taken from the commit, shortened.
A test changed in the same commit
It sits next to the fix. We did not run it.
- LusoCryptoLabs/cells-resolver:
test/proof.test.ts
- Concepts
- Indexer queries and cell collection, Network and RPC reliability
- Evidence
- Checked by the owner: checked by the owner of the project it came from, who is also the publisher of these lessons
- First seen
- 2026-09-24
- Last changed
- 2026-09-24
- 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-09-24 · LusoCryptoLabs/cells-resolver · more from this project
More about Light client
- Light client set_scripts "all" replaces the whole registered script set
- Light client still reports a removed script until the new script set lands
- Light client sync progress poll racing set_scripts
Checked by @LusoCryptoLabs (owner of the project), 2026-11-19.
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Give light clients the committing block of a cell, not just its outpoint", CKB lessons, https://pulse.lusocryptolabs.com/learned/light-client/give-light-clients-the-committing-block-of-a-cell-not-just-i, CC BY 4.0, last changed 2026-09-24.