-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add the ability to query for the transaction that spends a specified transparent outpoint. #498
Comments
@idky137 let's coordinate on this |
Instead of The indexer should be considered to provide all the functionality that might be desired of it in a trusted context - i.e. it should provide all the functionality that could be desired of it if the end user of a wallet is also running their own indexer, such as is the case for an exchange wallet. Then, subsets of that functionality may remain unused or disabled (or only accessible via TOR/Nym?) if it's running in an untrusted context such as as lightwalletd server. |
I don't quite understand the benefit of this proposed gRPC method over calling |
@Oscar-Pepper You're misunderstanding it then. The When we discover a transaction where one of its outputs belongs to us, we then want to also find out if that output is already spent, and if so, where. This requires a separate index that is constructed by inspecting each transaction, and recording a mapping between each |
What is your feature request?
Add a GRPC method:
where
GetSpendingTx
returns the transaction that spends the provided output, orNotFound
if the outpoint is not recognized or the outpoint is unspent.How would this feature help you?
In restoring transparent history, it is possible to traverse the transaction graph from spending tx to source of funds using available methods of the GRPC interface, but there is no direct way to find the transaction that spends a given output. As a consequence, it's currently necessary to use the
GetTaddressTxids
method to attempt to find spends related to a given outpoint, but this is highly imprecise - it will return all of the transactions that involve that address, and queries to this method must specify a block range to query. In highly active wallets, this could result in numerous calls that each return hundreds or thousands of results, rather than just the one result that is wanted.Adding this RPC method will make it possible to fully restore a wallet's transparent transaction graph in an efficient manner.
The text was updated successfully, but these errors were encountered: