Todas as lições · Wallets and signing · Começa aqui · Glossário
Omnilock owner signing needs an 85 byte zeroed witness lock placeholderPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
For an Omnilock cell spent in owner (secp256k1) mode, the WitnessArgs.lock is an 85 byte OmniLockWitnessLock (a 20 byte molecule header 0x5500000010000000550000005500000041000000 plus the 65 byte signature), so the sighash digest must be computed with an 85 byte zeroed placeholder (e.g. CCC prepareSighashAllWitness(lock, 85, client)). A digest taken over the usual 65 byte secp256k1 placeholder does not verify, which the test confirms against a real testnet spend.
Porque importa: A sighash digest computed over a 65 byte placeholder differs from the one Omnilock verifies against the 85 byte OmniLockWitnessLock, so the signature does not verify and the spend fails.
Padrão
const digest = await digestOf(onChain, lock, 85, client);Tirado do commit, encurtado.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- officialcmg/ckb-keyway:
tests/omnilock-recovery.test.ts - officialcmg/ckb-keyway:
tests/user-wallet.test.ts
- Conceitos
- Witnesses and signatures, Data encoding (molecule, hex, bigints)
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-10-23
- Última mudança
- 2026-10-23
- Ú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-10-23 · officialcmg/ckb-keyway · mais deste projeto
- 2026-10-23 · officialcmg/ckb-keyway · mais deste projeto
Mais sobre Wallets and signing
- Do not detect DER signatures by a leading 0x30 byte
- Verifying Neuron style signed messages against a secp256k1_blake160 lock
- JoyID sub key membership is checked through the CoTA aggregator
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Omnilock owner signing needs an 85 byte zeroed witness lock placeholder", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/omnilock-owner-signing-needs-an-85-byte-zeroed-witness-lock, CC BY 4.0, last changed 2026-10-23.