Todas as lições · Wallets and signing · Começa aqui · Glossário
Secp256k1 sighash lock groups cover non contiguous later group witnessesPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
With the bundled secp256k1 blake160 sighash lock, all inputs sharing the same lock form one group even when another owner's inputs sit between them. The signature goes in the witness at the group's first input index, and changing a later group witness (which leaves the tx hash unchanged) still fails verification at Inputs[first].Lock. So composed multi owner transactions must place one signature placeholder per lock group at its first input and finalize every group witness before signing.
Porque importa: A composer that signs only a contiguous slice of witnesses, or edits a later group witness after signing, produces a signature that fails at Inputs[first].Lock even though the tx hash is unchanged.
Padrão
witnesses[first] = WitnessArgs::new_builder().lock(Some(Bytes::from(vec![0; 65])).pack())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-10-09
- Última mudança
- 2026-10-09
- Ú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)
- 2026-10-09 · toastmanAu/openswap · 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
- Multisig sighash placeholder lock: script plus M zeroed signatures
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Secp256k1 sighash lock groups cover non contiguous later group witnesses", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/secp256k1-sighash-lock-groups-cover-non-contiguous-later-gro, CC BY 4.0, last changed 2026-10-09.