CKB Pulse
Lessons

What CKB learned

Start here · Glossary · Test yourself · Feed

toastmanAu/ckb-crypto-agile-account-reference-v0.1

Lessons from toastmanAu/ckb-crypto-agile-account-reference-v0.1

github.com/toastmanAu/ckb-crypto-agile-account-reference-v0.1

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

1 lessons found. All lessons

Passing a pipe to a spawned child script via a zero-terminated inherited_fds listAdvancedFrom one fix

When a lock spawns a verifier script from a cell dep with ckb-std 1.1.0 syscalls::spawn, it creates a pipe and passes the read fd in SpawnArgs.inherited_fds as an array ending in 0. After writing the full request, the parent closes write_fd so the child's read returns 0 or OtherEndClosed (end of input), then uses syscalls::wait(pid) == 0 as the verification result.

#Cell deps and script lookup #Other · Sources (1) · 2026-10-22

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.