-
Notifications
You must be signed in to change notification settings - Fork 137
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
Store payment outputs in wallet database #9
Conversation
Technically it looks good, but a few points/concerns
But that aside, this is a significant feature that we haven't really discussed, so I'd like to have a wider discussion on the implications of allowing this behaviour by default. Also, since it's part of the backend trait it's encouraging wallet developers using our libs to include this functionality, so it would likely become a common feature in future wallets. Obviously this info is available to all parties in a transaction (concerns about amounts aside,) but actively storing it by default may have some privacy concerns. It would also be good to have an idea of why you think this is necessary, and what use cases this addresses. Perhaps we can get a few more people in on the review? |
Thanks for the review 😄
I can't see a practical use case for one recipient creating multiple outputs, since that will greatly increase the tx fee but paid by sender. So, IMO, we should strictly limit one recipient only have one output.
fully agree :-) but with another PR.
👍 I will add the corresponding unit tests for those new functions.
It normally makes sense for sender keeping a record for what he/she paid. Since anyway this info is there already, I don't think storing it into database increase more privacy concerns.
Not limited in this use case, but I saw an exchange (iirc, bittrex) use their received output as the unique id for a transaction, I want to address this output after I send to this exchange but I found we didn't store this :-) and then I thought it's a good requirement to use output as the unique ID instead of the wallet UUID (which is definitely not a real unique id, since anyone can reuse a UUID easily). Anyway, the more sense is that I paid I recorded, a simple requirement. |
I completely agree with this sentiment. Any sufficiently sophisticated user will be maintaining their transaction slate archive which gives access to the same information. This feature just "democratizes" it in some sense. |
There's no way to enforce this at the protocol level and wallets can do as they choose, the case definitely needs to be handled. |
In case indeed And we strictly limit one recipient only have one output in this official wallet software. can give another dedicated PR to this limitation. |
Here's an example. I have 1 x UTXO of 5,000 grins. I would like to split this into 10 x UTXOs of 500 grins each so that I can send multiple transactions in parallel to other users without having all my funds locked. I don't see why we would want to limit a recipient to only be allowed to receive a transaction as one single UTXO. |
I might be missing something here, but what does this help with? And can the data be tampered with? |
Look like you're mixing the
^^^ please look above discussions:-) |
It might not be the same wallet that's to have the split outputs. Example, I have a cold storage wallet that I wish to withdraw 5,000 grins from into 10 x 500 grin outputs in a hot wallet. Could I do that using the change outputs? Look I'm fully aware that I'm talking of quite advanced use cases here, it's just that... Handling a lot of transactions in parallel in Grin is very complicated for businesses, and I wouldn't want to make it more complicated. I am not sure how it makes sense to impose limits on basic protocol functionality in order for more data to be displayed in a data log of transactions.
Yes, I looked above at the discussions, I couldn't understand what problem this was addressing, so I thought I should ask instead in the hopes that someone could explain it to me. :)
This is the problem this solves for, so that the user can keep track of what outputs they sent funds to? How does that help the user? Can they prove they sent funds there? Can the data be tampered with? How would they use this information exactly? |
…iver, normally it's not the case of this wallet implementation
Regarding the Regarding the use case of this PR: store payment output when paid, let's listen more voice from the users :-) |
This feature will be extremely useful to us! Thanks for the good work @garyyu |
I support this feature, it will make diagnosing disagreements between participants easier to solve. |
It would help my understanding if there could be a concrete example of a disagreement and how this feature would solve it. Let's say for example:
...What happens next? |
Just to update with current thoughts, I'm still not convinced this functionality is worth the extra complexity and long-term maintenance, so it would be good to have some proper use cases spelled out. Also, how many users would use this? Sent transactions are stored at the moment, so if it's only a small minority of people who think they need this they could easily extract outputs from there. |
Close obsoleted |
Currently we only store self owned outputs in wallet database, i.e. our
change
output/s or received output.The
payment
output (i.e. the one we send to others) is not stored on local wallet database.But in some use cases, we need query the output which we sent.
So, in this PR, we add the following command:
txs -i n
will show the payment output also. for example: