从这里开始 · 术语表 · 自测 · 订阅
经验用英文撰写,请用英文搜索。
“Indexer queries and cell collection” ✕
找到 43 条经验。 全部经验
上一页第 4 页,共 4 页
A CCC client caches the outputs of every transaction it sent, so when that transaction loses a race for the same input and never commits, its change cells still look usable to later builds. This campaign calls client.cache.clear() on every client before rebuilding and confirms candidate cells with getCellLiveNoCache rather than trusting cached state.
#Indexer queries and cell collection #Transaction building and fees · 来源(1) · 2026-10-29
A signed CKB transaction that is not committed (not pending, proposed or sent) is still valid and can be broadcast by anyone while all its inputs are live, so do not release its input reservations yet. Release them only after a committed-state live-cell check shows at least one input spent (a spend still in the tx pool does not count), and a second status check confirms the transaction still has not committed. A conflicting spend can still be reorganized away, so require the operator to acknowledge that risk.
#Transaction building and fees #Indexer queries and cell collection #Network and RPC reliability · 来源(2) · 2026-10-22
The CKB light client keeps reporting a script, with its block number, from get_scripts until you register a new script set that leaves it out. A sync poll that runs between your local delete and that set_scripts call will still see the removed script. Do not let that poll recreate local per script progress for an owner that no longer exists, and clear that progress again once the new set is registered while polling is excluded.
#Indexer queries and cell collection #Network and RPC reliability · 来源(1) · 2026-10-11
In a CKB devnet reorg test, transactions from detached blocks can return to the txpool and be committed again on the winning branch, which hides the rollback you want to observe. Have the winning branch spend one input of the orphaned transaction, such as its fee input, before the branches reconnect. Resubmitting the old transaction is then rejected with TransactionFailedToResolve (-301), and you must rebuild it with fresh funding.
#Testing and devnet #Indexer queries and cell collection · 来源(1) · 2026-10-10
A locally maintained index of CKB blocks can lag the node or still hold an orphaned block after a reorg, so before serving its tip as an anchor, fetch the node's tip number, wait briefly for the index to reach it, then ask the node for the canonical block hash at the indexed height and refuse (503 with NOT_SYNCED or REORGANIZING) unless it equals the indexed hash. The check narrows the window but is not atomic, so a client that signs over the anchor should also compare it with an independent source.
#Network and RPC reliability #Indexer queries and cell collection · 来源(1) · 2026-10-08
If an app saves per-script sync progress from the light client's get_scripts while another path calls set_scripts to reset or re-register scripts, a get_scripts result read before the set landed can overwrite the reset progress. Do the get_scripts read and the progress write under the same lock that guards set_scripts, and have the poll use tryLock and skip that tick while a registration is in flight, so it never queues behind it. Pocket Node does this in SyncCoordinator.tryWithRegistrationLock.
#Indexer queries and cell collection #Network and RPC reliability · 来源(1) · 2026-10-06
The CKB light client's set_scripts with the all command replaces every registered script, so a call carrying only one wallet's lock script unregisters all other wallets. When several scripts must stay tracked, either pass the full set with each script's own start block, or use the partial command to update only the changed script. If registrations can race, serialise them so a stale full set cannot overwrite a newer one.
#Indexer queries and cell collection #Network and RPC reliability · 来源(1) · 2026-09-30
上一页第 4 页,共 4 页
文本采用 CC BY 4.0:请署名 LusoCryptoLabs, CKB lessons,并附上经验的链接。 JSON · 想修改或撤下某条经验?请提交 issue。