lbry-sdk icon indicating copy to clipboard operation
lbry-sdk copied to clipboard

Purchase not deducted on locked wallets - but media allowed to be downloaded

Open ELM4Ever opened this issue 10 years ago • 8 comments

OS: Linux Ubuntu 16.04 LTS

If the wallet is encrypted and locked, provided a high enough balance in the wallet, requesting a media within LBRY will download its content, but the fees are not deducted. If LBRY is stopped after the download - there is no memory of the outstanding transaction(s). If the wallet is eventually unlocked (for mining, for example), again, the outstanding transaction is not processed.

ELM4Ever avatar Jul 05 '16 19:07 ELM4Ever

Any update? I see this a major impediment for the future media providers - free downloads...

ELM4Ever avatar Jul 10 '16 06:07 ELM4Ever

@ELM4Ever Forwarded to dev team, can also confirm this works

filipnyquist avatar Jul 10 '16 16:07 filipnyquist

Tracking this through the code, it looks like once the queued payments are removed to be sent over to rpc sendmany, we lose all record of the transaction. If any of the payments fail, like on RPC_WALLET_UNLOCK_NEEDED, we throw that error, but as I far as I can see, there's no way we handle a failed payment or retry. Is the solution to keep all queued payments stored on client after they've been sent, only removing after we get a successful response? And should we be holding up any downloading of the file until after we get the successful response, or are we assuming it's eventually going to succeed?

kimihiro64 avatar Jul 10 '16 18:07 kimihiro64

Does this only download the encrypted data, or does it also unlock the decryption key? If the latter, there's something wrong on the seller side, not just the client.

sonatagreen avatar Jul 10 '16 19:07 sonatagreen

@sonatagreen the decryption key is stored in the stream descriptor blob, which the host doesn't necessarily provide. So nothing is going wrong on the seller side.

This is a bug, in that the program shouldn't let you download something without paying. However, it will be a more complex solution down the road that gets this locked down to the point where editing some code (or stumbling on a bug like this) won't let you bypass payment.

jackrobison avatar Jul 10 '16 20:07 jackrobison

Is this still a bug?

hdost avatar Mar 29 '17 16:03 hdost

related to #719

lyoshenka avatar Jul 03 '17 14:07 lyoshenka

fixed

lyoshenka avatar Jan 09 '18 14:01 lyoshenka