CKB Pulse
Lessons

What CKB learned

Start here · Glossary · Test yourself · Feed

ickb/contracts

Lessons from ickb/contracts

github.com/ickb/contracts

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

1 lessons found. All lessons

ckb-testtool runs scripts only, so node transaction verifiers must be added in testsWorkingFrom one fix

ckb-testtool's Context::verify_tx runs scripts only, so a test can pass with a transaction the node rejects. Build a Consensus from the bundled mainnet chain spec and run ckb-verification's NonContextualTransactionVerifier, CapacityVerifier and DaoScriptSizeVerifier, plus DaoCalculator::transaction_fee for DAO withdraw balance, and add your own checks for inputs below occupied capacity, a cell spent twice and a malformed since (time-dependent maturity can be skipped). Run these on rejected transactions too, so a rejection test fails only for the script rule it targets, or explicitly names the node rule it overlaps.

#Testing and devnet #Capacity and cell size · Sources (1) · 2026-11-02

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.