-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Remove lookup-tx-by-utxo functionality #8170
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
What is the migration path for users that were using this to query the utxo set? |
Yes, use UTXO query functions to query the UTXO set. |
This definitely needs mention in the release notes. |
|
concept ACK |
I agree that it's so incomprehensible (and not desirable) in its behavior that it's unlikely anyone was using it (or at least, using it and not silently getting screwed over by it). I do wish any of these queries that only worked with txindex had a non-txindex mechanism that took a location parameter (e.g. block height.) |
I don't think we need to deprecate this behind a command line flag. (Keep in mind that there still would be no way for us to find out how many would toggle the flag) Considering that this is not really a functionality someone can rely on and it appears unlikely someone (other than our test framework) relies on it, it is probably safe to just remove it. |
That's true, but it would give people the opportunity to complain about it, while not having to forego the upgrade. I don't feel strongly about it though, if you guys believe that this is a change that can be made without warning in advance I'm fine with that. Depends on how urgent this change is as well.
One radical idea would be to expose CDiskTxPos fields on the interface here and there, and add a REST/RPC call to get a transaction from such a (blockfile_id,offset) tuple. I wonder if that would make some things easier/possible, such as external indices without having to store the block chain twice, but with fast access. Probably these 'pointers' should be obfuscated somehow to discourage direct access to the block files from outside bitcoind. |
The changes here are not urgent. If we choose to not adopt them quickly, I think at least the updated error message in |
One of my clients has something that was using this FWIW, so I'd target actual removal for v0.14 |
That's interesting. I somehow expected that, if some functionality is available for so long, some people will come to rely on it. |
@laanwj Basically their wallet code happens to depend on it; with a fair amount of new code they could work around the problem (remember that simply saving the txs when created isn't enough due to malleability). I don't think that's a show-stopper, but we should give users some kind of warning period. Perhaps we could make v0.13.0 appear to not have this support by default, but then re-enable it with a command line flag, that's marked as "will be removed in v0.14.0"? |
+1. That's exactly what I suggested too:
|
@laanwj Cool, sounds like we're in agreement. :) |
Ok I'll reword this to just be the extra RPC help/error, and a message that
it is deprecated?
|
@sipa Sounds good to me, thanks! |
Looks like this causes a few RPC tests to fail:
|
utACK c3af143, but needs the command line option (or maybe just a short-term compile flag?) |
Still failing travis. |
@sipa Needs rebase. |
I'm ever so slightly against this change. I find it's routinely useful for me when I'm trying to debug behavior on a random node. |
@morcos Perhaps that's a good reason to introduce a |
Agree with @morcos that the way toward fixing this could also be make the API clearer instead of removing functionality (that is apparently used by some people sometimes, even if only by developers for troubleshooting). +1 for splitting up |
There are 3 ways through which main.cpp (and by extension, the
getrawtransaction
and REST tx lookup) find transactions:This third option is confusing because the conditions under which it works are complicated, and can make it seem like it always works even without -txindex. Remove it. If you need to call
getrawtransaction
for confirmed transactions, you almost certainly need -txindex.This only impacts the
getrawtransaction
and REST tx calls, so document those.