Todas as lições · Wallets and signing · Começa aqui · Glossário
JoyID signer prices fees with a 1,000 byte signature placeholderPráticoDe uma correção
De uma correção · Verificação: em parte certa · Verificada em 2026-11-19
With CCC and @ckb-ccc/joy-id, prepareTransaction fills the JoyID witness lock with a 1,000 byte placeholder before the fee is computed as ceil((serialized size + 4) x rate / 1000). The real signature is usually shorter (347 bytes in one testnet order), so the committed transaction is smaller and its measured rate is higher than the rate it was built at (7,278 against 5,000 shannons/KB). To recover the build rate, clone the transaction, set the JoyID witness lock back to 1,000 zero bytes, and compute the rate on that size, confirming with tx.estimateFee(rate) equal to the paid fee.
Porque importa: Measuring the fee rate on the signed transaction overstates the rate it was built at, so a fee policy check on a JoyID transaction would wrongly judge it as outside its rate range.
Padrão
witness.lock=ccc.hexFrom('00'.repeat(JOYID_PLACEHOLDER));priced.setWitnessArgs(at,witness);Tirado do commit, encurtado.
- Conceitos
- Transaction building and fees, Witnesses and signatures
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-10-30
- Última mudança
- 2026-10-30
- Última verificação
- 2026-11-19
- Verificação contra o commit
- em parte certa: um núcleo verdadeiro, com uma parte solta ou demasiado larga
Fontes (1)
- 2026-10-30 · 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
- Multisig sighash placeholder lock: script plus M zeroed signatures
- 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, "JoyID signer prices fees with a 1,000 byte signature placeholder", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/joyid-signer-prices-fees-with-a-1-000-byte-signature-placeho, CC BY 4.0, last changed 2026-10-30.