CKB Pulse

All lessons · CKB node, RPC and indexer · Start here · Glossary

Verifying an indexer funding cell against an advancing tip instead of a frozen snapshotWorkingFrom one fix

From one fix · Check: right · Checked 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.

Why it matters: 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.

Pattern

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

Taken from the commit, shortened.

Concepts
Indexer queries and cell collection, Network and RPC reliability
Evidence
From one fix: from one project, checked against its commit
First seen
2026-11-09
Last changed
2026-11-09
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)

More about CKB node, RPC and indexer

All 45 in this topic

Do you maintain a project this lesson came from? Confirm or correct it

Cite this lesson
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.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.