Start here · Glossary · Test yourself · Feed
Light client ✕
5 lessons found. All lessons
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 · Sources (1) · 2026-10-11
With the CKB light client, a DAO withdrawing cell older than the script's sync start is never returned by the scan, and the phase-2 unlock output is a plain cell that does not point back at it. So absence from the scan cannot mark the position spent: retire it only when the unlock transaction is confirmed (a verified local inclusion, or getTransactionStatus reporting committed on the node), keep it shown as confirming while the unlock is in flight, and never treat an unreachable node or an unknown transaction as a spend.
#Indexer queries and cell collection #Other · Sources (2) · 2026-10-09
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 · Sources (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 · Sources (1) · 2026-09-30
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.
#Indexer queries and cell collection #Network and RPC reliability · Sources (1) · 2026-09-24
Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. JSON · Want a lesson changed or removed? Open an issue.