CKB Pulse

All lessons · Wallets and signing · Start here · Glossary

Use the secp256k1 sighash dep group, not the bare code cell, as the lock depWorkingFrom one fix

From one fix · Check: right · Checked 2026-11-19

When a hand-built transaction spends a secp256k1_blake160_sighash_all cell, it needs a cell dep for that lock. That dep should be the genesis dep group (dep_type dep_group), not the bare code cell in genesis tx0, because the lock also loads the secp256k1_data table from a second cell. With only the code cell, ScriptNotFound goes away but the lock then fails inside execution.

Why it matters: A transaction that carries only the bare sighash code cell as a dep gets past ScriptNotFound, but the lock then fails during execution because the secp256k1_data cell it loads is missing.

Pattern

Prefer
return { out_point, dep_type: "dep_group" };

Taken from the commit, shortened.

A test changed in the same commit

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

Concepts
Cell deps and script lookup, Transaction building and fees
Evidence
From one fix: from one project, checked against its commit
First seen
2026-09-24
Last changed
2026-09-25
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)

More about Wallets and signing

All 23 in this topic

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

Cite this lesson
LusoCryptoLabs, "Use the secp256k1 sighash dep group, not the bare code cell, as the lock dep", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/use-the-secp256k1-sighash-dep-group-not-the-bare-code-cell-a, CC BY 4.0, last changed 2026-09-25.

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.