CKB Pulse

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

Preferir
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.

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)

Mais sobre Light client

Ver as 5 deste tema

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.

Tiradas de commits públicos e verificadas contra o commit de onde cada uma veio e o código de hoje do projeto. Lê a fonte antes de confiar numa. Texto sob CC BY 4.0: dá crédito à LusoCryptoLabs, CKB lessons, com uma ligação para a lição. Queres que uma lição seja mudada ou retirada? Abre um issue.