All lessons · Developer tooling · Start here · Glossary
Identify script groups by type and hashWorkingFrom one fix
From one fix · Check: right · Checked 2026-11-19
In CKB the same script hash can be both a lock script group and a type script group in one transaction, and each group has its own input and output indices. When selecting or reporting a script group, for example from a verifier's group list, match on group type together with script hash, never on the hash alone.
Why it matters: Matching by hash alone can return the lock group's members when the type group was selected (or the reverse), so the tool reports the wrong inputs and outputs for the verified group.
A test changed in the same commit
It sits next to the fix. We did not run it.
- Hanssen0-Alter-Ego/ckb-vm-js:
tests/browser/workbench.spec.js,tests/js/guided.test.js
- Concepts
- Witnesses and signatures, Other
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-11-16
- Last changed
- 2026-11-16
- 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)
- 2026-11-16 · Hanssen0-Alter-Ego/ckb-vm-js · more from this project
More about Developer tooling
- Charging load_program bytes as cycles when building a custom ckb-vm machine
- ckb-cli deploy info file layout for offline multisig signing
- ckb-cli needs --skip-check to sign and send transactions with custom locks
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Identify script groups by type and hash", CKB lessons, https://pulse.lusocryptolabs.com/learned/tooling/identify-script-groups-by-type-and-hash, CC BY 4.0, last changed 2026-11-16.