Skip to content

Asset tx with spent inputs stuck in mempool, blocks CreateNewBlock indefinitely #1282

@shrikus

Description

@shrikus

Ravencoin Core /Ravencoin:4.3.2.1/ (4030201), mainnet, height 4349038, fully synced.

A high-fee asset-transfer tx sits in mempool with inputs already spent in the active chain. The node doesn't evict it; CreateNewBlock keeps picking it for every template (because of the 0.14 RVN fee), every template fails TestBlockValidity, no blocks get produced. Multiple pools hit this simultaneously on 2026-05-02.

Stuck tx: a71951fae419103d59d6cbc12975820040a12412ead931512baa46e30a6b19a0
6758 bytes, 31 inputs, 31 outputs, fee 0.14318 RVN. Outputs are a mix of root assets, ownership tokens (!), sub-assets (PARENT/CHILD), and unique sub-assets with serial qualifiers (PARENT/CHILD#SN0001..#SN0011) in one tx. getmempoolentry returns it, depends: [].

debug.log loop (every ~5s):

2026-05-02 13:54:58 ERROR: ConnectBlock: Consensus::CheckTxInputs: a71951fae419103d59d6cbc12975820040a12412ead931512baa46e30a6b19a0, bad-txns-inputs-missingorspent, CheckTxInputs: inputs missing/spent (code 16)
2026-05-02 13:54:58 ERROR: TestBlockValidity: Consensus::ConnectBlock: bad-txns-inputs-missingorspent, CheckTxInputs: inputs missing/spent (code 16)
2026-05-02 13:55:03 CreateNewBlock(): block weight: 28004 txs: 1 fees: 14318000 sigops 524
2026-05-02 13:55:03 ERROR: ConnectBlock: Consensus::CheckTxInputs: a71951fae419103d59d6cbc12975820040a12412ead931512baa46e30a6b19a0, bad-txns-inputs-missingorspent, CheckTxInputs: inputs missing/spent (code 16)
2026-05-02 13:55:03 ERROR: TestBlockValidity: Consensus::ConnectBlock: bad-txns-inputs-missingorspent, CheckTxInputs: inputs missing/spent (code 16)
2026-05-02 13:55:05 PrioritiseTransaction: a71951fae419103d59d6cbc12975820040a12412ead931512baa46e30a6b19a0 feerate += -1000.00

Workaround: prioritisetransaction <txid> 0 -100000000000CreateNewBlock stops picking it, mining resumes. In-memory only. Clearing mempool.dat works too but peers re-relay it.

Expected: a tx whose inputs are spent per the node's UTXO set should be evicted from mempool, or at minimum skipped after the first failed TestBlockValidity in a template cycle.

Questions:

  • Why doesn't the asset-transfer path re-check / evict on input-spent-elsewhere?
  • Should CreateNewBlock skip txs that just failed TestBlockValidity in the same build cycle?
  • Interaction with unique sub-asset (#SN) transfers in large multi-output txs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions