Can't send orphan transactions with rpc #10562

issue RHavar opened this issue on June 9, 2017
  1. RHavar commented at 12:07 AM on June 9, 2017: contributor

    I'm trying to push this transaction:

    bitcoin-cli sendrawtransaction 0100000001bf9d8ca2bd060340c320c82432c57d53239d3e8d64c97dd302bb77b6b1ea779e010000006a4730440220628092918b8860dd21e2c89e082a096c38a723ae257f8ed011963121f54ff4e6022065480f3f9c265a3984e02e899d6c4494bf6de971032e196eeedd594593455ce5012102962425f1a1e9d8e372a85215bacfce533c6178bfd8e6c8dc7dcb79042daf2b99ffffffff02d9cd0300000000001976a914000f8b63ccf18b719537b5d5e10062f61239fd1288acb9e41100000000001976a914266bf5dc7d008ca5e1cb650b233e33a85143bb7c88ac00000000
    

    Which returns

    error code: -25
    error message:
    Missing inputs
    

    But I also can't send the missing input it complains about:

    bitcoin-cli sendrawtransaction 010000000119cf20c58a66a05020cc0eae50283cc3c2240c236dca8628f08d0bd9122fbc3f010000006b483045022100df4237d0a7bdbe5a08d708d735c70f4e9944c30ee343878dc29b96b32203ee4c0220462ef4837c38c8b49fa3b4bc827b3d7ea4c277f2089a6f68ff126b97af8d54f20121034f51458629ade2f2291fb38c7f06958ae313a1a43755c80a24513b1c9ab34015ffffffff02e3450a00000000001976a914a18adb0d09a1e46f174b421c6b9aa2496f7aa40688ac6abb1600000000001976a914c5ea832db560cef4b400356527b483609e9b1e4e88ac00000000
    

    which returns

    error code: -26
    error message:
    66: insufficient priority
    

    So it's a bit of a catch-22. I would expect the first one to work (it pays a lot of fees), and add the transaction to the orphan transactions or something. Also the error message format is a bit inconsistent.

    (and if anyone is feeling kind, propagating those transactions would be appreciated)

  2. RHavar renamed this:
    Can't sending orphan transactions with rpc
    Can't send orphan transactions with rpc
    on Jun 9, 2017
  3. fanquake added the label RPC/REST/ZMQ on Jun 9, 2017
  4. MarcoFalke commented at 7:45 PM on June 19, 2017: member

    Just some notes:

    • The concept that transaction pay with solely their coin age (aka. priority) will be removed in 0.15.0
    • Even though the documentation for prioritisetransaction implies it is only meant for miners, you can use it to force your tx into the mempool.
    • Alternatively, (on 0.15.0 and later) you could restart the node with -minrelaytxfee=0 and then get that transaction into your mempool.

    Though, none of those guarantee that your tx will be accepted by other nodes or miners.

  5. RHavar commented at 8:03 PM on June 19, 2017: contributor

    It's been a while since I've looked at the code, so I might be off the mark: but I believe when the client receives a transaction with unknown parents it's put into an "orphan pool", and it can later move into the mempool when the unknown parents are seen.

    So I think the same behavior should happen with sendrawtransaction, that the transaction gets added to your orphan pool and sent out to your peers. Then you can add the other transaction, and push it out to your peers too.

  6. MarcoFalke added the label Mempool on Jun 19, 2017
  7. TheBlueMatt commented at 10:33 PM on June 21, 2017: member

    Sending peers transactions which do not have sufficient fee to not be size-limited out of the mempool does not put those transactions in the orphan map and, thus, in order to properly relay transactions which are CPFP'd you need to broadcast them in reverse-dependency order (and hope your peer's orphan map is sufficiently large). Indeed, having a similar concept for sendrawtransaction (or, really, the ability to send multiple transactions with one call) would be nice, but we probably need to fix the relay behavior (both from-sendrawtransaction and from-peers) to support it as well to make sure we dont accept transactions and then not succeed in relaying them anywhere.

  8. MarcoFalke closed this on Apr 27, 2020

  9. MarcoFalke locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me