Todas as lições · Light client · Começa aqui · Glossário
Light client scan absence does not prove a DAO withdrawing cell was spentPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 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.
Porque importa: 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.
Padrão
chainVerdict == DaoUnlockChainVerdict.COMMITTED -> DaoUnlockMarkerState.CONFIRMEDTirado do commit, encurtado.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- 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
- Conceitos
- Indexer queries and cell collection, Other
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-09-30
- Última mudança
- 2026-10-09
- Última verificação
- 2026-11-19
- Verificação contra o commit
- certa: a lição sai do commit e continua a valer no código de hoje
Fontes (2)
- 2026-09-30 · RaheemJnr/pocket-node · mais deste projeto
- 2026-10-09 · RaheemJnr/pocket-node · mais deste projeto
Mais sobre 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
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
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.