-
Notifications
You must be signed in to change notification settings - Fork 38.8k
RPC: Indicate which transactions are signaling opt-in RBF #7222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Concept ACK
I think at least
Yes. This would be useful IMO.
I don't see a use-case for getting the RBF signal for confirmed transactions (maybe for potential reorgs risk calculations?). But I agree, without |
I don't see any use case for exposing this information. |
|
NACK Very high risk of naive users attempting to use this to do risk mitigation and accepting zeroconf txs in cases where they're risking losses; if you care about whether a tx can be replaced you're in a position where you should be using specialist services. Note how easy it is to send replacable in practice txs by just having an ancestor tx have a low fee. |
|
@petertodd: for wallet users ( |
|
True, but for those users knowing if a tx is RBF is already trivial - just check nSequence. Equally, we haven't even merged my obvious set RBF flag option, so what's the usecase? On 17 December 2015 00:44:28 GMT-08:00, Jonas Schnelli [email protected] wrote:
|
Right. This (an option to set the RBF flag when creating a wtx) would be required first. Either your overall-setting PR (#7132) or the one that supports rawtx (#7159). GUI option might follow soon.
IMO this is basically what this PR does. |
|
No, this pull-req checks ancestors too, a critical difference thats applicable to "risk-scoring" BS but has little applicibility to your own transactions. |
|
@petertodd I don't agree, but I can understand your concern about offering a feature that could mislead users. So rather than change existing RPC calls as I initially proposed, what about just adding two new RPC calls, one that would return the txid's of unconfirmed parents of a transaction and one that would return txid's of in-mempool descendants? That seems to me to be more broadly useful and basically addresses my underlying concern, that users who want to do calculations relating to whether a transaction might be replaced would have to reinvent the wheel to efficiently trace mempool chains. |
|
I should add -- I think exposing mempool ancestors/descendants is also useful for code that would seek to use RBF efficiently (I'm not sure how else you'd figure out what fee to use, or whether you'll get rejected because you're replacing too many transactions, etc). |
|
Is efficiency in that case actually a concern? I'd rather see that version proposed in conjunction with code that actually needs it, and benchmarks showing how badly it's needed. |
|
How would an application even calculate what fee to use to rbf two transactions down to one? The only thing I can think of would be to call getrawmempool and recursively search for transactions which depend on the given transactions. Dumping a 300mb mempool over rpc sounds like a losing proposition to begin with, never mind reimplementing the logic bitcoind already has for iterating. Is there a simpler approach I'm missing? |
|
Concept ACK. The arguments against making this (or any basic tx attribute information) available to a user who is explicitly looking for it are beyond unconvincing. As users, we want to see what we just did. And we want to see details about the tx that just arrived that pays us. RPC's to return ancestors and descendants would be extremely useful too. Re: throwing a runtime error in |
|
needs rebase. |
|
Closing in favor of #7292. |
|
Pardon my tardy response. With due respect to the prior arguments, they're more strongly an argument against showing unconfirmed transactions at all by default. Not against this. An indicator for BIP125 (in particular, in listtransactions) would be both labor saving for users, and also make it more likely that parties looking at it get it right (and, for example, don't consider confirmed transactions to be BIP125 mempool replaceable). Moreover, it was always my expectation that it would work this way-- and this small affordance is an aspect of how I explained BIP125 to others without getting any protest so I expect many also expected this. Importantly, while many people do objectively confused things with unconfirmed transactions, the elegance of BIP125 was that it avoided the difficult task of educating people which so far many have failed with; by providing something that allowed their activities to continue without conflict. But it doesn't do so if getting access to the information is too burdensome. Because of this I consider this a release blocker. I was concerned that the patch for this would be complex, but it turns out to be quite clean... which I think makes this a no-brainer. |
|
Needs rebase |
29bcd74 to
fc26fce
Compare
|
Rebased and updated to extend this information to This appears to merge cleanly into 0.12 as well. |
fc26fce to
7f607ff
Compare
|
On further thought I've removed the opt-in RBF signaling information in I had an issue with the build not working after pulling the code out of @cfields Thanks for looking at this; let me know if you figure out a better way to make everything work. |
|
Sorry for the churn -- changed the name of the field in the RPC output to be "bip125-replaceable", and fixed the handling of confirmed transactions. |
|
Needs rebase |
Add "bip125-replaceable" output field to listtransactions and gettransaction which indicates if an unconfirmed transaction, or any unconfirmed parent, is signaling opt-in RBF according to BIP 125.
67ffc03 to
eaa8d27
Compare
|
Rebased (trivial conflict with #7164 in |
|
utACK eaa8d27 |
eaa8d27 RPC: indicate which transactions are replaceable (Suhas Daftuar)
I'm not sure how users of bitcoind are expected to figure out which transactions could be replaced via opt-in RBF, so I took a first stab at exposing that via RPC. I've started by adding it to
getrawmempoolwhen called with the verbose=true argument. I've also exercised that code with some small modifications to thereplace-by-fee.pyrpc test.I'd appreciate some specific feedback on the following:
nSequence < 0xfffffffeon one of its inputs), versus inheriting the signal from some unconfirmed parent?