All lessons · CKB node, RPC and indexer · Start here · Glossary
Nervos DAO phase 1 withdrawing cells keep the DAO type; count deposits by 8 zero bytes of dataWorkingChecked by the owner
Checked by the owner · Check: right · Checked 2026-11-19
A Nervos DAO cell in phase 1 of withdrawal still has the DAO type script (code hash 0x82d76d...3f2e, hash_type type, args 0x), so filtering by type alone counts it as a deposit. Only cells whose output data is exactly 0x0000000000000000 are deposits; a withdrawing cell's data holds its deposit block number. The commit's testnet test shows a type-only count giving 500 CKB where the true deposit total is 300 CKB.
Why it matters: Counting Nervos DAO cells by type script alone also counts phase 1 withdrawing cells as deposits, so a deposit already being withdrawn still adds weight; in the testnet history this gave 500 CKB instead of 300 CKB.
Pattern
(data === DAO_DEPOSIT_DATA ? deposits : withdrawing).push(cell);Taken from the commit, shortened.
A test changed in the same commit
It sits next to the fix. We did not run it.
- LusoCryptoLabs/ckb-ward:
tests/weight.test.ts
- Concepts
- Indexer queries and cell collection, Data encoding (molecule, hex, bigints)
- Evidence
- Checked by the owner: checked by the owner of the project it came from, who is also the publisher of these lessons
- First seen
- 2026-11-06
- Last changed
- 2026-11-06
- 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-11-06 · LusoCryptoLabs/ckb-ward · more from this project
- 2026-10-20 · ckb-service-runner/csr-network-monitor · more from this project
More about CKB node, RPC and indexer
- Filter prefix get_cells results by data length before decoding
- Finding cells of a ckb_js_vm JS contract needs a second indexer prefix search
- Check chain-wide script users before consuming a deployed code cell
Checked by @LusoCryptoLabs (owner of the project), 2026-11-19.
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Nervos DAO phase 1 withdrawing cells keep the DAO type; count deposits by 8 zero bytes of data", CKB lessons, https://pulse.lusocryptolabs.com/learned/node/nervos-dao-phase-1-withdrawing-cells-keep-the-dao-type-count, CC BY 4.0, last changed 2026-11-06.