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
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.
- ILE-Labs/ckb-msig:
test/ckb/addresses.test.ts,test/ckb/deployments.test.ts,test/ckb/embedded-check.test.ts,test/ckb/input-resolver.test.ts,test/ckb/lock-classifier.test.ts
- 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)
- 2026-11-08 · ILE-Labs/ckb-msig · mais deste projeto
- 2026-11-08 · ILE-Labs/ckb-msig · mais deste projeto
Mais sobre Wallets and signing
- JoyID lock witness outputType may carry a subkey proof, so type script data must move elsewhere
- JoyID signer prices fees with a 1,000 byte signature placeholder
- One placeholder witness per input when all inputs share one lock
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.