Todas as lições · Developer tooling · Começa aqui · Glossário
ckb-debugger verifies one script group per runPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
`full` is a VM mode, and by default ckb-debugger runs only input 0's lock, which may be an always-success lock. To check a whole transaction, enumerate every input lock, input type and output type group, run each with --script-group-type/--cell-type/--cell-index, and sum the cycles. Pair each accepted case with a control that must fail with an exact error code.
Porque importa: Running ckb-debugger on a mock tx without selecting script groups only executes input 0's lock, so a test can pass on an always-success lock (634 cycles) while the contract scripts never run, and the cycle budget is mismeasured.
Padrão
spawn ckb-debugger --tx-file mock.json (no group selection) and treat exit 0 as the whole tx passingUm teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- toastmanAu/daowow:
apps/web/test/claim-debugger.test.js
- Conceitos
- Testing and devnet, Transaction building and fees
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-14
- Última mudança
- 2026-11-14
- Ú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 (1)
- 2026-11-14 · toastmanAu/daowow · mais deste projeto
Mais sobre Developer tooling
- ckb-vm-js 0.2.0 (npm) checks header hash instead of rejecting the field
- Derive devnet Spore and system script cell deps from a fresh OffCKB export
- Pass wasm bytes to ckb-vm-js createVerifier in Node
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "ckb-debugger verifies one script group per run", CKB lessons, https://pulse.lusocryptolabs.com/learned/tooling/ckb-debugger-verifies-one-script-group-per-run, CC BY 4.0, last changed 2026-11-14.