CKB Pulse

All lessons · Developer tooling · Start here · Glossary

ckb-cli deploy gen-txs does not check the block size limitWorkingFrom one fix

From one fix · Check: right · Checked 2026-11-19

`ckb-cli deploy gen-txs` checks capacity and reports success even when the deployment transaction exceeds the 597,000 byte block size limit; the node only rejects it at broadcast with ExceededMaximumBlockBytes. When deploying several large contract binaries, sum their sizes before signing and split them across separate deployment configs (sending each transaction only after the previous one confirms) if they approach the limit.

Why it matters: The deployer signs a transaction that gen-txs reported as successful, and only learns at broadcast that the node refuses it with ExceededMaximumBlockBytes because the combined binaries push it past the 597,000 byte block size limit.

Pattern

Prefer
const BLOCK_SIZE_LIMIT = 597000; const estimate = total + OVERHEAD_BASE + OVERHEAD_PER_CELL * files.length;

Taken from the commit, shortened.

Concepts
Transaction building and fees, Capacity and cell size
Evidence
From one fix: from one project, checked against its commit
First seen
2026-09-18
Last changed
2026-09-18
Last checked
2026-11-19
Check against the commit
right: the lesson follows from its commit and still holds in the code today

Sources (1)

More about Developer tooling

All 35 in this topic

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

Cite this lesson
LusoCryptoLabs, "ckb-cli deploy gen-txs does not check the block size limit", CKB lessons, https://pulse.lusocryptolabs.com/learned/tooling/ckb-cli-deploy-gen-txs-does-not-check-the-block-size-limit, CC BY 4.0, last changed 2026-09-18.

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.