All lessons · Wallets and signing · Start here · Glossary
Devnet tests need a real secp256k1 lock to exercise signingWorkingFrom one fix
From one fix · Check: partly right · Checked 2026-11-19
Under an always-success lock, a test never checks that the signature covers the witnesses. That matters most when contract data shares a WitnessArgs with the signature, for example in inputType. Move the test cells to a secp256k1 lock, using its code cell and dep group from genesis, and sign with ccc.SignerCkbPrivateKey. The 20-byte lock args need 6 more CKB of capacity than the 14-byte fixture args.
Why it matters: Tests under an always-success lock pass even when the signed transaction would be rejected or when witness data such as inputType is not covered by the signature.
Pattern
Devnet tests that only used an always-success fixture lock. Now the cell is moved to a secp256k1 lock and the transaction is signed through the same app signing path.A test changed in the same commit
It sits next to the fix. We did not run it.
- toastmanAu/daowow:
apps/web/test/app-shell.test.js,apps/web/test/model-copy.test.js,tests/devnet/js_claims.mjs,tests/devnet/js_claims.py,tests/devnet/test_js_lifecycle.py
- Concepts
- Witnesses and signatures, Testing and devnet, Capacity and cell size
- 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
- partly right: a true core, with a part that is loose or too wide
Sources (1)
- 2026-11-14 · toastmanAu/daowow · more from this project
More about Wallets and signing
- JoyID sub key membership is checked through the CoTA aggregator
- JoyID sub key signatures depend on the live CoTA cell dep holding the sub key root
- Count only empty, typeless lock cells as spendable balance
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Devnet tests need a real secp256k1 lock to exercise signing", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/devnet-tests-need-a-real-secp256k1-lock-to-exercise-signing, CC BY 4.0, last changed 2026-11-14.