CKB Pulse

Todas as lições · Wallets and signing · Começa aqui · Glossário

Devnet tests need a real secp256k1 lock to exercise signingPráticoDe uma correção

De uma correção · Verificação: em parte certa · Verificada em 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.

Porque importa: 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.

Padrão

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.

Um teste mudou no mesmo commit

Está ao lado da correcção. Nós não o corremos.

Conceitos
Witnesses and signatures, Testing and devnet, Capacity and cell size
Evidência
De uma correção: de um projeto, verificada contra o commit
Vista pela primeira vez
2026-11-14
Última mudança
2026-11-14
Última verificação
2026-11-19
Verificação contra o commit
em parte certa: um núcleo verdadeiro, com uma parte solta ou demasiado larga

Fontes (1)

Mais sobre Wallets and signing

Ver as 23 deste tema

Manténs um projeto de onde esta lição veio? Confirma ou corrige

Citar esta lição
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.

Tiradas de commits públicos e verificadas contra o commit de onde cada uma veio e o código de hoje do projeto. Lê a fonte antes de confiar numa. Texto sob CC BY 4.0: dá crédito à LusoCryptoLabs, CKB lessons, com uma ligação para a lição. Queres que uma lição seja mudada ou retirada? Abre um issue.