All lessons · Light client · Start here · Glossary
Light client scan absence does not prove a DAO withdrawing cell was spentWorkingFrom one fix
From one fix · Check: right · Checked 2026-11-19
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.
Why it matters: Retiring on absence alone makes a still-unspent DAO position vanish from the screen and the balance, and the unlock preflight then insists it was already claimed, with no way back.
Pattern
chainVerdict == DaoUnlockChainVerdict.COMMITTED -> DaoUnlockMarkerState.CONFIRMEDTaken from the commit, shortened.
A test changed in the same commit
It sits next to the fix. We did not run it.
- RaheemJnr/pocket-node:
android/app/src/test/java/com/rjnr/pocketnode/data/database/WalkingMigrationTest.kt,android/app/src/test/java/com/rjnr/pocketnode/data/gateway/DaoCellRetirementTest.kt,android/app/src/test/java/com/rjnr/pocketnode/data/gateway/DaoSyncManagerTest.kt,android/app/src/test/java/com/rjnr/pocketnode/data/gateway/GatewayRepositoryDaoUnlockTest.kt,android/app/src/test/java/com/rjnr/pocketnode/data/wallet/WalletRepositoryTest.kt - RaheemJnr/pocket-node:
android/app/src/test/java/com/rjnr/pocketnode/data/gateway/AndroidLightClientApiTest.kt,android/app/src/test/java/com/rjnr/pocketnode/data/gateway/CandidateRegistrationRecordingTest.kt,android/app/src/test/java/com/rjnr/pocketnode/data/gateway/CandidateSelectionTest.kt,android/app/src/test/java/com/rjnr/pocketnode/data/gateway/DaoGatewayUnlockTest.kt,android/app/src/test/java/com/rjnr/pocketnode/data/gateway/GatewayRepositoryResyncStrategyTest.kt
- Concepts
- Indexer queries and cell collection, Other
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-09-30
- Last changed
- 2026-10-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 (2)
- 2026-09-30 · RaheemJnr/pocket-node · more from this project
- 2026-10-09 · RaheemJnr/pocket-node · more from this project
More about Light client
- Give light clients the committing block of a cell, not just its outpoint
- Light client set_scripts "all" replaces the whole registered script set
- Light client still reports a removed script until the new script set lands
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Light client scan absence does not prove a DAO withdrawing cell was spent", CKB lessons, https://pulse.lusocryptolabs.com/learned/light-client/light-client-scan-absence-does-not-prove-a-dao-withdrawing-c, CC BY 4.0, last changed 2026-10-09.