wallet: decodepsbt & decoderawtransaction should show RBF status #17262

issue Sjors opened this issue on October 26, 2019
  1. Sjors commented at 9:22 AM on October 26, 2019: member

    The decodepsbt and decoderawtransaction RPC calls return the sequence for each input, but I'd rather not have to manually determine if that implies RBF.

    I mainly care about this for mempool transactions.

    cc @instagibbs @achow101

  2. Sjors added the label Feature on Oct 26, 2019
  3. Sjors renamed this:
    wallet: decodepsbt should show RBF status
    wallet: decodepsbt & decoderawtransaction should show RBF status
    on Oct 26, 2019
  4. instagibbs commented at 1:12 PM on October 28, 2019: member

    concept ACK

  5. theStack commented at 8:06 AM on October 29, 2019: member

    With "implying RBF" I guess you mean based solely on the inputs of the transaction itself? If none of its sequence numbers signaling RBF, it could still be due to its ancestors (src/policy/rbf.cpp:IsRBFOptIn()): https://github.com/bitcoin/bitcoin/blob/4c1090c882ea15ba4d10a2f7f320f3c0eb490ebd/src/policy/rbf.cpp#L25-L26

  6. Sjors commented at 9:04 AM on October 29, 2019: member

    Good point. We have RBFTransactionState::UNKNOWN for that, but for these RPC calls I would prefer to check ancestors (if we don't already).

  7. theStack commented at 9:39 AM on October 29, 2019: member

    From what I can see currently the decoderawtransaction and decodepsbt RPCs merely decode the raw data and are "standalone", i.e. without any inspection of block or mempool data (similar to the bitcoin-tx tool which provide pure functions without requiring to communicate with the daemon). Checking for ancestors would break that, though I don't know if it's a strict requirement to keep it that way.

  8. MarcoFalke commented at 12:57 PM on October 29, 2019: member

    @Sjors You can call getmempoolentry to get the rbf status

  9. MarcoFalke removed the label Feature on Oct 29, 2019
  10. MarcoFalke added the label Questions and Help on Oct 29, 2019
  11. MarcoFalke added the label RPC/REST/ZMQ on Oct 29, 2019
  12. promag commented at 11:57 AM on November 2, 2019: member

    Concept NACK, this is already possible even if it implies a second call - isn't the goal to avoid RPC on steroids?

  13. Sjors commented at 5:04 PM on November 2, 2019: member

    decodepsbt works on unsigned transactions that are probably not in the mempool

  14. MarcoFalke commented at 8:27 PM on November 2, 2019: member

    In that case you couldn't check ancestors, so can't determine the bip125-rbf status. Only whether the tx itself signals for rbf

  15. Sjors commented at 8:36 PM on November 2, 2019: member

    decodepsbt could check the mempool for ancestors referred to in the PSBT. The result would be RBFTransactionState::UNKNOWN if one of the inputs is not in the mempool (nor in a block).

  16. MarcoFalke commented at 9:06 PM on November 2, 2019: member

    Not sure if it is a good idea to mix static return values (merely a decoding of the tx) with dynamic return values. This makes it harder to offer all the decode* RPCs as a standalone library or tool.

  17. MarcoFalke commented at 11:36 PM on May 8, 2020: member

    The feature request didn't seem to attract much attention in the past. Also, the issue seems not important enough right now to keep it sitting around idle in the list of open issues.

    Closing due to lack of interest. Pull requests with improvements are always welcome.

  18. MarcoFalke closed this on May 8, 2020

  19. DrahtBot 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:14 UTC

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