Todas as lições · CKB node, RPC and indexer · Começa aqui · Glossário
Check original tx unknown and input live on independent nodes before same input cancellationPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 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.
Porque importa: 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.
Padrão
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');Tirado do commit, encurtado.
- Conceitos
- Network and RPC reliability, Transaction building and fees
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-09
- Última mudança
- 2026-11-09
- Última verificação
- 2026-11-19
- Verificação contra o commit
- certa: a lição sai do commit e continua a valer no código de hoje
Fontes (1)
- 2026-11-09 · Ticoworld/QuotaCell · mais deste projeto
Mais sobre CKB node, RPC and indexer
- send_transaction error -1111 (PoolRejectedRBF) is a conflict, not "already in pool"
- A rejected or unknown get_transaction status does not make a signed transaction dead
- Check indexer lag with get_indexer_tip before signing
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
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.