Todas as lições · Wallets and signing · Começa aqui · Glossário
Keep at least 61 CKB in the change cell when sending from a secp256k1 walletBásicoDe uma correção
De uma correção · Verificação: em parte certa · Verificada em 2026-11-19
A plain secp256k1_blake160 cell occupies 61 CKB, so when a wallet sends X it must keep at least 61 CKB (the occupied capacity of its own lock) in the change cell, plus the fee, and refuse the send otherwise. The recipient output must also be at least the occupied capacity of the recipient's lock, never less than 61 CKB for a plain address. Enforce the change floor in the transaction builder, and use extra headroom (this runner uses threshold >= amount + 100) for automatic sweeps so fee and change always fit.
Porque importa: A transaction whose change or recipient output holds less than its occupied capacity (61 CKB for a plain secp256k1 cell) is rejected by the node, so the send fails.
Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- ckb-service-runner/ckb-service-runner:
acceptance/a8/p2.test.mjs,acceptance/a8/p3.test.mjs,acceptance/a8/p4.test.mjs
- Conceitos
- Capacity and cell size, Transaction building and fees
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-10-21
- Última mudança
- 2026-10-21
- Ú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-21 · ckb-service-runner/ckb-service-runner · mais deste projeto
Mais sobre Wallets and signing
- Placeholder JoyID lock args are 22 bytes when quoting capacity
- Count only empty, typeless lock cells as spendable balance
- DAO compensation must use the deposit cell's occupied capacity (102 CKB), not 61
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Keep at least 61 CKB in the change cell when sending from a secp256k1 wallet", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/keep-at-least-61-ckb-in-the-change-cell-when-sending-from-a, CC BY 4.0, last changed 2026-10-21.