Todas as lições · Light client · Começa aqui · Glossário
Give light clients the committing block of a cell, not just its outpointPráticoVerificada pelo dono
Verificada pelo dono · Verificação: certa · Verificada em 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.
Porque importa: Without the committing block, a script-watching light client has to scan from genesis to find the cell and notice when it is spent.
Padrão
blockNumber: a.blockNumber ?? null, blockHash: a.blockHash ?? null,Tirado do commit, encurtado.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- LusoCryptoLabs/cells-resolver:
test/proof.test.ts
- Conceitos
- Indexer queries and cell collection, Network and RPC reliability
- Evidência
- Verificada pelo dono: verificada pelo dono do projeto de onde veio, que também publica estas lições
- Vista pela primeira vez
- 2026-09-24
- Última mudança
- 2026-09-24
- Ú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 (1)
- 2026-09-24 · LusoCryptoLabs/cells-resolver · mais deste projeto
Mais sobre 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
Verificada por @LusoCryptoLabs (dono do projeto), 2026-11-19.
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
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.