All lessons · CKB node, RPC and indexer · Start here · Glossary
Wait for tx_pool_info tip to match chain tip before submitting on devnetWorkingFrom one fix
From one fix · Check: right · Checked 2026-11-19
After generate_block, CKB's tx pool updates its snapshot asynchronously, so a transaction spending just-committed outputs can be rejected (e.g. "Resolve failed Unknown") even though get_live_cell sees them. Before send_transaction or send_test_transaction, poll tx_pool_info until its tip_hash and tip_number equal get_tip_header's hash and number.
Why it matters: Without the wait, a transaction that spends outputs from a block just mined can be rejected by the pool because the pool still resolves inputs against the older snapshot, and a rejected tx should not simply be resubmitted.
Pattern
if actual_hash == expected_hash && actual_number == expected_number { return Ok(()); }Taken from the commit, shortened.
- Concepts
- Testing and devnet, Network and RPC reliability
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-10-08
- Last changed
- 2026-10-08
- 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)
- 2026-10-08 · CellScript-Labs/CellScript · more from this project
More about CKB node, RPC and indexer
- get_transaction returns an object with a null transaction for rejected and unknown txs
- CKB log subscription notifications may carry params.result as a JSON string
- Simulating a real CKB reorg with two devnet nodes over P2P
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Wait for tx_pool_info tip to match chain tip before submitting on devnet", CKB lessons, https://pulse.lusocryptolabs.com/learned/node/wait-for-tx-pool-info-tip-to-match-chain-tip-before-submitti, CC BY 4.0, last changed 2026-10-08.