CKB Pulse

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

Multisig sighash placeholder lock: script plus M zeroed signaturesPráticoDe uma correção

De uma correção · Verificação: certa · Verificada em 2026-11-19

When computing the signing message for a secp256k1_blake160_multisig_all input, set the first witness's WitnessArgs.lock to the multisig script bytes followed by threshold × 65 zero bytes (a single key sighash lock uses just 65 zero bytes), and keep the inputType and outputType fields, before calling CCC's tx.getSignHashInfo(script, client). The same placeholder length must be used here as in the signed witness, otherwise the message differs from what the lock script hashes on chain.

Porque importa: If the placeholder lock has a different length or content from the final signed lock, the signers sign a message the on-chain multisig script never reproduces, so every signature fails verification.

Padrão

Preferir
return `${group.config.script}${"00".repeat(SIGNATURE_BYTES * group.config.threshold)}`;

Tirado do commit, encurtado.

Um teste mudou no mesmo commit

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

Conceitos
Witnesses and signatures, Transaction building and fees
Evidência
De uma correção: de um projeto, verificada contra o commit
Vista pela primeira vez
2026-11-08
Última mudança
2026-11-08
Última verificação
2026-11-19
Verificação contra o commit
certa: a lição sai do commit e continua a valer no código de hoje

Fontes (2)

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, "Multisig sighash placeholder lock: script plus M zeroed signatures", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/multisig-sighash-placeholder-lock-script-plus-m-zeroed-signa, CC BY 4.0, last changed 2026-11-08.

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.