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.
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.
concept ACK
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
Good point. We have RBFTransactionState::UNKNOWN for that, but for these RPC calls I would prefer to check ancestors (if we don't already).
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.
@Sjors You can call getmempoolentry to get the rbf status
Concept NACK, this is already possible even if it implies a second call - isn't the goal to avoid RPC on steroids?
decodepsbt works on unsigned transactions that are probably not in the mempool
In that case you couldn't check ancestors, so can't determine the bip125-rbf status. Only whether the tx itself signals for rbf
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).
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.
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.