CKB Pulse

All lessons · CKB node, RPC and indexer · Start here · Glossary

Dry run a transaction with test_tx_pool_accept before send_transactionWorkingFrom one fix

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

The CKB node RPC test_tx_pool_accept takes the same params as send_transaction (the snake_case tx JSON without its hash, plus an outputs validator such as "passthrough"). It returns the cycles and fee the pool would accept without broadcasting, so a tool can check a pasted transaction before sending it for real.

Why it matters: Without a dry run, the only way to learn a pasted transaction's verification result, cycles and fee is to broadcast it for real, which cannot be undone once it is accepted.

Pattern

Prefer
rpc<{ cycles: string; fee: string }>(this.url, "test_tx_pool_accept", [body, "passthrough"])

Taken from the commit, shortened.

Concepts
Transaction building and fees, Network and RPC reliability
Evidence
From one fix: from one project, checked against its commit
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 (1)

More about CKB node, RPC and indexer

All 45 in this topic

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

Cite this lesson
LusoCryptoLabs, "Dry run a transaction with test_tx_pool_accept before send_transaction", CKB lessons, https://pulse.lusocryptolabs.com/learned/node/dry-run-a-transaction-with-test-tx-pool-accept-before-send-t, 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.