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
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.
- toastmanAu/daowow:
apps/web/test/aggregate-tx.test.js,apps/web/test/freeze-tx.test.js,apps/web/test/genesis-tx.test.js
- 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)
- 2026-09-24 · toastmanAu/daowow · more from this project
- 2026-09-25 · toastmanAu/daowow · more from this project
More about Wallets and signing
- Binding an off-chain lock proof to the live cell deps it ran with
- JoyID sub key signatures depend on the live CoTA cell dep holding the sub key root
- Lock code hashes differ between testnet and mainnet for Omnilock, JoyID, ACP and PW lock
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.