CKB Pulse
Lessons

What CKB learned

Start here · Glossary · Test yourself · Feed

ckb-devrel/offckb

Lessons from ckb-devrel/offckb

github.com/ckb-devrel/offckb

Do you maintain this project? Confirm its lessons in one issue

3 lessons found. All lessons

CKB log subscription notifications may carry params.result as a JSON stringWorkingFrom one fix

When subscribing to the CKB node's "log" topic over the TCP subscription RPC, the notification's params.result can be a JSON-encoded string of the log entry (message, level, target, date) rather than an object. Parse it with JSON.parse when it is a string, and skip malformed payloads instead of stopping the stream; otherwise script debug output (target ckb_script::verify) is silently dropped.

#Network and RPC reliability #Testing and devnet · Sources (1) · 2026-11-09

CKB node script debug logs may use ckb_script::verify target, not only ckb-scriptWorkingFrom one fix

When filtering a CKB node's run.log or log subscription for contract debug output (ckb_debug / debug! syscalls), records can come with target `ckb_script` or a `ckb_script::` submodule such as `ckb_script::verify` rather than the legacy `ckb-script` target. For those targets, match only messages containing `DEBUG OUTPUT:`, because the same target also emits ordinary verification lines.

#Testing and devnet · Sources (1) · 2026-10-08

Full-balance UDT burn is valid for SUDT and plain xUDTWorkingFrom one fix

Burning a UDT's entire balance is accepted by SUDT and xUDT without extensions, because those scripts allow output amount to be less than or equal to input amount. offckb removed a guard that rejected destroyAmount === totalBalance and now still emits a zero-balance type cell (16-byte zero amount), which is valid. Extension-enabled xUDT was not covered by this change.

#Transaction building and fees #Capacity and cell size · Sources (1) · 2026-10-08

Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. JSON · Want a lesson changed or removed? Open an issue.