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

Content shown as free at overtaken claim, users charged for downloads #797

Closed
tzarebczan opened this Issue Nov 29, 2017 · 2 comments

Comments

Projects
None yet
5 participants
@tzarebczan
Member

tzarebczan commented Nov 29, 2017

@liamcardenas commented on Mon Nov 13 2017

@tzarebczan commented on Thu Nov 09 2017

The Issue

When content is overtaken at a vanity URL that was previously cached, the new claim information is shown but the content price is not updated. There's a possibility that the content price is now 10 LBC but the app will still show 0. When the content is streamed or downloaded, the user is charged 10LBC unknowingly.

The original issue was first reported in #511 and then was supposed to be fixed in #511 but still continues to occur. Recently we had a user charged 130LBC for lbry://nine because there was a takeover that didn't show the correct price.

This is most likely related to a more complex "when to refresh cached data" discussed here #451 (comment) but I think something needs to be done in the interim to prevent the scenario where users are charged for seemingly free content.

Steps to reproduce

  1. Access claim X (free) on PC1
  2. on PC2, takeover claim X and set a content price
  3. Wait for takeover and re-access the claim on PC1
  4. Notice claim information is updated but the price shows free

Claim data:

  "lbrytestpublish1234": {
    "claim": {
      "address": "bVFPc4Yna5N91QeNFxRq6Afa5JFGxthkho",
      "amount": 1.0,
      "claim_id": "beba2f02344e7ec83268d34d8adb4f5f14028778",
      "claim_sequence": 2,
      "decoded_claim": true,
      "depth": 85,
      "effective_amount": 1.0,
      "has_signature": false,
      "height": 269920,
      "hex": "080110011ab1010801126a080410011a2c7465737420636f6e74656e7420746f206f76657274616b65206c627279746573747075626c6973683132333422002a0032044e6f6e6538004224080110011a1955b6e9b27a4c8ec4046047e212d74ff0b6ebad6f60ccd96b7d25000000404a0052005a001a41080110011a304685f12d6940be42ba656a4cc01fe58fc3d58b16be14777a7cf9116fd2c7892bac886733ce5e8170b84413139aeb514e2209696d6167652f706e67",
      "name": "lbrytestpublish1234",
      "nout": 0,
      "supports": [],
      "txid": "cee78347b9ebf84652bfa6062e5e574aeab7688dcddc277267a7598294842675",
      "value": {
        "claimType": "streamType",
        "stream": {
          "metadata": {
            "author": "",
            "description": "",
            "fee": {
              "address": "bVQRdi3iKgaaWj2L5SjF1CeZd9kWmZmevg",
              "amount": 2.0,
              "currency": "LBC",
              "version": "_0_0_1"
            },
            "language": "en",
            "license": "None",
            "licenseUrl": "",
            "nsfw": false,
            "preview": "",
            "thumbnail": "",
            "title": "test content to overtake lbrytestpublish1234",
            "version": "_0_1_0"
          },
          "source": {
            "contentType": "image/png",
            "source": "4685f12d6940be42ba656a4cc01fe58fc3d58b16be14777a7cf9116fd2c7892bac886733ce5e8170b84413139aeb514e",
            "sourceType": "lbry_sd_hash",
            "version": "_0_0_1"
          },
          "version": "_0_0_1"
        },
        "version": "_0_0_1"
      }
    }
  }
}

Claim being shown as free upon re-entering it:

claim showing free

Charged for content upon downloading:

2017-11-09 17:24:25,270 INFO     lbrynet.core.Wallet:823: Resolving lbry://lbrytestpublish1234
2017-11-09 17:24:41,537 INFO     lbrynet.daemon.Downloader:95: Download lbry://lbrytestpublish1234 status changed to initializing
2017-11-09 17:24:41,539 INFO     lbrynet.daemon.ExchangeRateManager:221: Converting 50.000000 USD to LBC, rates: [Currency pair:('USD', 'BTC'), spot:0.000140216096561, ts:1510266241, Currency pair:('BTC', 'LBC'), spot:41110.5353081, ts:1510266241, Currency pair:('BTC', 'LBC'), spot:41745.5336614, ts:1510266241, Currency pair:('USD', 'BTC'), spot:0.00014031, ts:1510266242, Currency pair:('BTC', 'LBC'), spot:41788.5499373, ts:1510266242]
2017-11-09 17:24:41,560 INFO     lbrynet.daemon.ExchangeRateManager:221: Converting 0.007011 BTC to LBC, rates: [Currency pair:('USD', 'BTC'), spot:0.000140216096561, ts:1510266241, Currency pair:('BTC', 'LBC'), spot:41110.5353081, ts:1510266241, Currency pair:('BTC', 'LBC'), spot:41745.5336614, ts:1510266241, Currency pair:('USD', 'BTC'), spot:0.00014031, ts:1510266242, Currency pair:('BTC', 'LBC'), spot:41788.5499373, ts:1510266242]
2017-11-09 17:24:41,561 INFO     lbrynet.daemon.ExchangeRateManager:221: Converting 2.000000 LBC to LBC, rates: [Currency pair:('USD', 'BTC'), spot:0.000140216096561, ts:1510266241, Currency pair:('BTC', 'LBC'), spot:41110.5353081, ts:1510266241, Currency pair:('BTC', 'LBC'), spot:41745.5336614, ts:1510266241, Currency pair:('USD', 'BTC'), spot:0.00014031, ts:1510266242, Currency pair:('BTC', 'LBC'), spot:41788.5499373, ts:1510266242]
2017-11-09 17:24:41,562 INFO     lbrynet.daemon.Downloader:95: Download lbry://lbrytestpublish1234 status changed to downloading_metadata
2017-11-09 17:24:41,562 INFO     lbrynet.core.client.ConnectionManager:42: Connection Manager 4685f12d6940be42ba656a4cc01fe58fc3d58b16be14777a7cf9116fd2c7892bac886733ce5e8170b84413139aeb514e initialized
2017-11-09 17:24:41,761 INFO     lbrynet.core.client.BlobRequester:414: Offered rate 0.000000/mb accepted by 52.14.114.25
2017-11-09 17:24:41,791 INFO     lbrynet.core.client.BlobRequester:563: Blob 4685f12d6940be42 has been successfully downloaded from 52.14.114.25:3333
2017-11-09 17:24:42,571 INFO     lbrynet.lbry_file.EncryptedFileMetadataManager:246: Saved sd blob hash 4685f12d6940be42ba656a4cc01fe58fc3d58b16be14777a7cf9116fd2c7892bac886733ce5e8170b84413139aeb514e to stream hash da61e77ca9f916e516cbee9189883e2f753195185a7b8f7b1ba6370ae91d98bc94b46fa6e3356edc6e1310dd0fa86316
2017-11-09 17:24:42,573 INFO     lbrynet.daemon.Downloader:134: Pay key fee 2.000000 --> bVQRdi3iKgaaWj2L5SjF1CeZd9kWmZmevg

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

System Configuration

  • LBRY Daemon version: 0.18rc1
  • LBRY App version: 0.18.0
  • LBRY Installation ID:
  • Operating system: Windows

Anything Else

Screenshots


@lyoshenka commented on Tue Nov 21 2017

duplicate of #803


@tzarebczan commented on Tue Nov 21 2017

@lyoshenka I don't think it's a duplicate.. I was going to mention that on the call but didn't want to prolong the conversation anymore.

This issue is more of a pricing update problem... Someone can overtake a claim and set a high lbc price and the person going to that claim will see the old price (or free).

There's a bit of timing involved, but this has happened in the past and I'm able to reproduce it.

Maybe it has to do more with the general "when do we invalidate cache" issue, not sure. But I was hoping to have a more short term solution which would product users by refreshing the price before purchase or something.

Looks like it was moved to lbry from lbry-app, not sure where it belongs.


@lyoshenka commented on Tue Nov 21 2017

@tzarebczan can you reproduce this issue using only lbrynet? I suspect this is a lbry-app issue involving caching, but if you can reproduce it in lbrynet, then this is the appropriate repo.

If you can ever call resolve on a name and get it to show you the wrong price, then we'll need to fix it here. Otherwise the solution may be for the app to call resolve before any credits are spent, just to refresh the cached price. That said, it's always possible that in the time between calling resolve and get, a new block comes in and the content changes. If that's the only way to trigger this, then I'm much less concerned about it.


@tzarebczan commented on Wed Nov 29 2017

@lyoshenka - no, the resolve command shows the correct price, but the app does not. @liamcardenas originally moved it from app to the daemon - maybe they also misunderstood the issue.

It's happening to me right now on lbry://seven - someone put the price at 550 LBC but shows free in app.
price

I'll move this back to the app side.

@jsigwart

This comment has been minimized.

Show comment
Hide comment
@jsigwart

jsigwart Mar 14, 2018

Member

This happened to me with lbry://three today. File was listed as free, and it charged me 10 LBC. Did not download. Then the second time I clicked on the link, it changed to a different file, which also did not download. Showed log file to Tom and he confirmed. Here are screenshots:
screen shot 2018-03-14 at 1 56 07 pm
screen shot 2018-03-14 at 2 00 44 pm

Here is the transaction: https://explorer.lbry.io/tx/794a4f62c5ba7b5531283e6259564338d1f45bae587f0123ea911c99059420cd

Member

jsigwart commented Mar 14, 2018

This happened to me with lbry://three today. File was listed as free, and it charged me 10 LBC. Did not download. Then the second time I clicked on the link, it changed to a different file, which also did not download. Showed log file to Tom and he confirmed. Here are screenshots:
screen shot 2018-03-14 at 1 56 07 pm
screen shot 2018-03-14 at 2 00 44 pm

Here is the transaction: https://explorer.lbry.io/tx/794a4f62c5ba7b5531283e6259564338d1f45bae587f0123ea911c99059420cd

@tzarebczan

This comment has been minimized.

Show comment
Hide comment
@tzarebczan

tzarebczan Jun 19, 2018

Member

Fixed in #1563

Member

tzarebczan commented Jun 19, 2018

Fixed in #1563

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment