CKB Pulse

All lessons · Developer tooling · Start here · Glossary

ckb-debugger verifies one script group per runWorkingFrom one fix

From one fix · Check: right · Checked 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.

Why it matters: 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.

Pattern

spawn ckb-debugger --tx-file mock.json (no group selection) and treat exit 0 as the whole tx passing

A test changed in the same commit

It sits next to the fix. We did not run it.

Concepts
Testing and devnet, Transaction building and fees
Evidence
From one fix: from one project, checked against its commit
First seen
2026-11-14
Last changed
2026-11-14
Last checked
2026-11-19
Check against the commit
right: the lesson follows from its commit and still holds in the code today

Sources (1)

More about Developer tooling

All 35 in this topic

Do you maintain a project this lesson came from? Confirm or correct it

Cite this lesson
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.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.