全部经验 · CKB node, RPC and indexer · 从这里开始 · 术语表
Verifying an indexer funding cell against an advancing tip instead of a frozen snapshot实践来自一次修复
来自一次修复 · 核对结果:正确 · 核对于 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.
为什么重要: 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.
代码模式
assert.equal(anchorHash,indexed.block_hash,'Chain reorganized during funding lookup');assert.equal(cellBlockHash,header.hash,'Funding block is noncanonical');摘自提交,已缩短。
- 概念
- Indexer queries and cell collection, Network and RPC reliability
- 证据
- 来自一次修复: 来自一个项目,已对照其提交核对
- 首次出现
- 2026-11-09
- 最近改动
- 2026-11-09
- 最近核对
- 2026-11-19
- 对照提交的核对结果
- 正确:这条经验出自该提交,并且在今天的代码中仍然成立
来源(1)
- 2026-11-09 · Ticoworld/QuotaCell · 这个项目的更多经验
更多关于CKB node, RPC and indexer
- get_live_cell may return "unknown" rather than "dead" for a spent output
- Wait for get_indexer_tip to reach the commit block before re-reading cells
- Check indexer lag with get_indexer_tip before signing
引用这条经验
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.