CKB Pulse

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.

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)

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, "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.

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.