CKB Pulse
经验

CKB 学到了什么

从这里开始 · 术语表 · 自测 · 订阅

经验用英文撰写,请用英文搜索。

LusoCryptoLabs/ckb-script-pitfalls

来自 LusoCryptoLabs/ckb-script-pitfalls 的经验

github.com/LusoCryptoLabs/ckb-script-pitfalls

你维护这个项目吗? 在一个 issue 中确认它的经验

找到 1 条经验。 全部经验

Use raw_data(), not as_slice(), when parsing a packed::Bytes witness实践由所有者核对

A transaction witness in ckb_types is a molecule packed::Bytes, so as_slice() returns the 4 byte length header followed by the content, while raw_data() returns only the content (here a serialized WitnessArgs). A check that compares a witness to the secp256k1 sighash placeholder WitnessArgs (lock of 65 zero bytes) must use witness.raw_data() (or unpack()), otherwise it is silently never true. Fiber's funding witness merge never recognized placeholders until it switched to raw_data(), so a peer's placeholder could be kept in place of a real signature.

#Data encoding (molecule, hex, bigints) #Witnesses and signatures · 来源(2) · 2026-10-29

文本采用 CC BY 4.0:请署名 LusoCryptoLabs, CKB lessons,并附上经验的链接。 JSON · 想修改或撤下某条经验?请提交 issue。