CKB Pulse

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

One placeholder witness per input when all inputs share one lockPráticoDe uma correção

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

In this deploy builder, several funding inputs all share the owner's lock. The signing witness (WitnessArgs) goes at index 0, and every other input gets an empty "0x" witness, so the witnesses list stays as long as the inputs list. That matches the secp256k1 sighash script group layout, where the first witness of the group carries the signature and covers the rest.

Porque importa: Without one witness slot per input, a multi-input transaction under one secp256k1 lock has no agreed place for the single group signature, so signing tools and the lock script's witness hashing see a layout that does not match the inputs.

Padrão

Preferir
tx["witnesses"] = [c.witness()] + ["0x"] * (len(points) - 1)

Tirado do commit, encurtado.

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-05
Última mudança
2026-11-05
Ú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 (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, "One placeholder witness per input when all inputs share one lock", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/one-placeholder-witness-per-input-when-all-inputs-share-one, CC BY 4.0, last changed 2026-11-05.

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.