CKB Pulse

Todas as lições · CKB node, RPC and indexer · Começa aqui · Glossário

Verifying an indexer funding cell against an advancing tip instead of a frozen snapshotPráticoDe uma correção

De uma correção · Verificação: certa · Verificada em 2026-11-19

A frozen-tip check ("the indexer tip must not change during the scan") fails often on a live chain, so do not demand it. Select a single funding cell from get_cells, verify it directly against the node (get_live_cell, get_transaction, get_header, output and data equal to the indexed ones), then re-check at the end that get_block_hash at the starting indexer tip still equals the anchor hash, that the cell's block is canonical, and that the cell is still live. New blocks arriving in between are fine, but still fail closed if the indexer lags the node at the start or the anchor hash changed. This gives one verified input, not a snapshot of the whole wallet.

Porque importa: A rule that the indexer tip must stay frozen during the scan makes funding lookups on a live chain keep failing and retrying. It also turns away results that are actually safe, because the anchor block, the cell's block and the cell's liveness can all be checked again directly against the node.

Padrão

Preferir
assert.equal(anchorHash,indexed.block_hash,'Chain reorganized during funding lookup');assert.equal(cellBlockHash,header.hash,'Funding block is noncanonical');

Tirado do commit, encurtado.

Conceitos
Indexer queries and cell collection, Network and RPC reliability
Evidência
De uma correção: de um projeto, verificada contra o commit
Vista pela primeira vez
2026-11-09
Última mudança
2026-11-09
Ú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 CKB node, RPC and indexer

Ver as 45 deste tema

Manténs um projeto de onde esta lição veio? Confirma ou corrige

Citar esta lição
LusoCryptoLabs, "Verifying an indexer funding cell against an advancing tip instead of a frozen snapshot", CKB lessons, https://pulse.lusocryptolabs.com/learned/node/verifying-an-indexer-funding-cell-against-an-advancing-tip-i, CC BY 4.0, last changed 2026-11-09.

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.