CKB Pulse

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

Check original tx unknown and input live on independent nodes before same input cancellationWorkingFrom one fix

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

Before signing a same-input cancellation for a deployment whose broadcast outcome is unknown, check on two separate RPC endpoints that get_transaction for the original hash returns status 'unknown' and that get_live_cell for the shared input returns 'live', and fail closed if either endpoint errors or times out. Repeat the check before sending. 'unknown' only means the nodes have not seen the tx yet, so the cancellation is a race: if the original is relayed and committed first, the cancellation fails.

Why it matters: Without the check you may sign and send a cancellation after the original deployment is already pending or committed, or trust one node's partial view, so the cancellation fails or you misjudge which transaction actually landed.

Pattern

Prefer
assert.equal((await rpc('get_transaction',[ORIGINAL]))?.tx_status?.status,'unknown','Original deployment is not unknown'); const live=await rpc('get_live_cell',[INPUT,true]); assert.equal(live.status,'live');

Taken from the commit, shortened.

Concepts
Network and RPC reliability, Transaction building and fees
Evidence
From one fix: from one project, checked against its commit
First seen
2026-11-09
Last changed
2026-11-09
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, "Check original tx unknown and input live on independent nodes before same input cancellation", CKB lessons, https://pulse.lusocryptolabs.com/learned/node/check-original-tx-unknown-and-input-live-on-independent-node, CC BY 4.0, last changed 2026-11-09.

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.