Todas as lições · Apps and UI · Começa aqui · Glossário
Pre-sign checkers must mirror every on-chain comparisonPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
A pre-sign checker that reuses the builder's assumptions will miss the builder's bugs, so make it compare every field the script compares, outputs_data included. When you add data to an output, count those bytes in its occupied capacity (8 + data + lock + type). Replay refused transactions in ckb-debugger against the deployed binaries to confirm the fix.
Porque importa: The builder wrote an empty receipt cell that the contract refused with -28 SHARD_ERROR_DATA on testnet after signing, because the checker shared the builder's belief and never compared outputs_data; the cell's capacity was also short by the 73 data bytes it needed.
Padrão
outputsData: [..., "0x", ...] for a cell whose type script checks its data; capacity computed with 0 data bytesUm teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- toastmanAu/daowow:
apps/web/test/aggregate-tx.test.js,apps/web/test/lifecycle-rules.test.js
- Conceitos
- Capacity and cell size, Transaction building and fees, Testing and devnet
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-11
- Última mudança
- 2026-11-11
- Ú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-11-11 · toastmanAu/daowow · mais deste projeto
Mais sobre Apps and UI
- Pinning JS codecs and derivations to Rust test vectors
- Witness data in input_type and folding sub-minimum change
- Exact CKB-to-shannon conversion with BigInt
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Pre-sign checkers must mirror every on-chain comparison", CKB lessons, https://pulse.lusocryptolabs.com/learned/apps/pre-sign-checkers-must-mirror-every-on-chain-comparison, CC BY 4.0, last changed 2026-11-11.