Todas as lições · Other · Começa aqui · Glossário
Recognizing a Nervos DAO deposit cell (not a withdrawing one)PráticoVista outra vez
Vista outra vez · Verificação: certa · Verificada em 2026-11-19
Treat a cell as a Nervos DAO deposit only if its type script exactly matches the DAO type script and its data is exactly 8 zero bytes. The DAO type script has code hash 0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e, hash_type type and empty args. A phase one withdrawing cell has the same type script but a nonzero block number in its 8 data bytes, so it fails this check, as do data of any other length and look alike type scripts.
Porque importa: Without the exact type and data check, look alike scripts and phase one withdrawing cells are counted as live deposits, so stake or voting weight survives a withdrawal or can be faked.
joined with the ckb-service-runner card teaching the same check
Padrão
return self.exact_dao_type and self.data == DEPOSIT_DATATirado do commit, encurtado.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- ckb-service-runner/ckb-service-runner:
acceptance/a7/p3.test.mjs
- Conceitos
- Indexer queries and cell collection, Data encoding (molecule, hex, bigints)
- Evidência
- Vista outra vez: vista em dois ou mais projetos
- Vista pela primeira vez
- 2026-10-08
- Última mudança
- 2026-10-20
- Ú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-10-08 · poshboytl/omavote · mais deste projeto
- 2026-10-20 · ckb-service-runner/ckb-service-runner · mais deste projeto
Mais sobre Other
- Hand-encoding WitnessArgs in molecule
- Restrict script hashType to data, type, data1, data2 when loading config
- Strict validation of molecule table headers in hand written decoders
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Recognizing a Nervos DAO deposit cell (not a withdrawing one)", CKB lessons, https://pulse.lusocryptolabs.com/learned/other/recognizing-a-nervos-dao-deposit-cell-not-a-withdrawing-one, CC BY 4.0, last changed 2026-10-20.