CKB Pulse

All lessons · Rust scripts and ckb-std · Start here · Glossary

Minimum capacity of a cell depends on its lock args lengthWorkingChecked by the owner

Checked by the owner · Check: right · Checked 2026-11-19

A cell with no type and no data needs at least 8 (capacity) + 32 (code hash) + 1 (hash type) + args length in CKB: 61 CKB for a secp256k1_blake160 lock (20-byte args), 63 CKB for a JoyID lock with 22-byte args. A contract that knows a recipient lock only by hash cannot measure it, so a hardcoded floor for the fee output must be at least the largest lock it may face on each network, and a test should measure the real lock against it. Otherwise the fee output cannot be built.

Why it matters: If a contract hardcodes a capacity floor below what the recipient lock actually occupies, it demands an output too small for consensus to accept, so the fee output cannot be built and the operation that requires it (here registration) can never succeed.

Concepts
Capacity and cell size
Evidence
Checked by the owner: checked by the owner of the project it came from, who is also the publisher of these lessons
First seen
2026-10-30
Last changed
2026-10-30
Last checked
2026-11-19
Check against the commit
right: the lesson follows from its commit and still holds in the code today

Sources (2)

More about Rust scripts and ckb-std

All 35 in this topic

Checked by @LusoCryptoLabs (owner of the project), 2026-11-19.

Do you maintain a project this lesson came from? Confirm or correct it

Cite this lesson
LusoCryptoLabs, "Minimum capacity of a cell depends on its lock args length", CKB lessons, https://pulse.lusocryptolabs.com/learned/scripts/minimum-capacity-of-a-cell-depends-on-its-lock-args-length, CC BY 4.0, last changed 2026-10-30.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.