Skip to content
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

Can't claim Channel Surfing reward #290

Closed
zestyr opened this Issue Jun 26, 2017 · 13 comments

Comments

Projects
None yet
6 participants
@zestyr
Copy link
Contributor

zestyr commented Jun 26, 2017

I've been able to claim all rewards, except the "Channel Surfing" reward. I created an identity yesterday and published a video under it: lbry://@CboyardeeArchive/aphidamp
When I try to claim the reward, it says "Please create a channel identity first."
Using the network view I can see it makes two requests. "unused_wallet_address", and "claim_list_mine".

{"jsonrpc":"2.0","method":"wallet_unused_address","params":{},"id":1294}
{"jsonrpc":"2.0","method":"claim_list_mine","params":{},"id":1295}

The response for the first request is just a wallet address, and the second is this.

daemon (lbrynet) 0.13.1-14-gebec2fe
wallet (lbryum) 2.8.4
interface 0.12.2rc2
Platform Linux (Linux-4.9.30-rt20-1-rt-x86_64-with-glibc2.2.5)
@tzarebczan

This comment has been minimized.

Copy link
Member

tzarebczan commented Jun 27, 2017

My Brother in law has a similar issue on his machine. He was on RC2 when he made a publish. We then updated to RC7 and he received the attached error.

I was not able to grab the Json requests for the user_email api -trying to reproduce.

@kauffj

This comment has been minimized.

Copy link
Member

kauffj commented Jun 28, 2017

There's a race condition / timing issue here it's not efficient to fix until the pending publishing refactor @6ea86b96 is working on is finished. I suspect that reloading or restarting the app will allow this reward to be claimed in the interim.

@tzarebczan

This comment has been minimized.

Copy link
Member

tzarebczan commented Jun 29, 2017

I'll try it again on the PC which has the issue, but previously we tried restarting multiple times to no avail. It simply does not kick off the json request for the reward call. I can try publishing something again, and see if that does anything too.

@tzarebczan

This comment has been minimized.

Copy link
Member

tzarebczan commented Jun 29, 2017

I was able to claim the reward after creating a new identity and publishing something under that identity. Before that, I tried another claim without an identity and it didn't work. The reward api was kicked off twice, I'll send you the data files in Slack @lyoshenka

@zestyr can you try on your end? Do you have an existing identity? If so, try publishing under that one first. If that doesn't work, try creating a new identity and publish again.

@lyoshenka lyoshenka added this to the July 7 milestone Jul 3, 2017

@lyoshenka lyoshenka assigned 6ea86b96 and unassigned lyoshenka Jul 3, 2017

@lyoshenka lyoshenka removed this from the July 7 milestone Jul 3, 2017

@6ea86b96

This comment has been minimized.

Copy link
Contributor

6ea86b96 commented Jul 21, 2017

Not sure how to replicate this one. Is anyone still having this problem? I'd like to know what the response from claim_list_mine is.

Claiming the reward should fetch those claims, find that there is a channel claim and use that to claim the reward. Looking at the code it appears that in this case it's not finding a channel claim even though one has been created.

@kauffj

This comment has been minimized.

Copy link
Member

kauffj commented Jul 21, 2017

I'm going to close this. Re-open if it is in app 0.14 or later (coming out soon).

@kauffj kauffj closed this Jul 21, 2017

@buddyleex

This comment has been minimized.

Copy link

buddyleex commented Aug 2, 2017

Still occuring in 0.14.2

@tzarebczan

This comment has been minimized.

Copy link
Member

tzarebczan commented Aug 2, 2017

@buddyleex - the work around is to create a dummy channel and publish, both for a low 0.0001 LBC amount. This is because the rewards system is unaware of channels or claims created before getting access to rewards.

If this is on a new install, let me know and I'll try to reproduce it but I was recently able to claim all the rewards.

@buddyleex

This comment has been minimized.

Copy link

buddyleex commented Aug 2, 2017

@tzarebczan yeah I'm still having issue. Can't revoke claims either.

C:\Program Files (x86)\LBRY\resources\app\dist>lbrynet-cli.exe claim_abandon cla
im_id=a3bbe4168c2ab698442e9111f3bfbc121ea91078
null

C:\Program Files (x86)\LBRY\resources\app\dist>lbrynet-cli.exe claim_abandon cla
im_id=f68c46b24654f4739104704ccd1bd25d5bfc0cc3
null

@tzarebczan

This comment has been minimized.

Copy link
Member

tzarebczan commented Aug 2, 2017

Don't use the claim_id, just the claim# itself right after the claim_abandon

Come over to our slack channel and I can try to help out more. Slack.lbry.io and dm jiggytom

@lyoshenka

This comment has been minimized.

Copy link
Member

lyoshenka commented Oct 30, 2017

@tzarebczan and I have figured it out. The issues is that the following function in reward.js is wrong:

function isInitialClaim(claim) {
  const reversed = reverseString(fromHex(claim.txid));
  const concat = reversed.concat(pack(claim.nout));
  const sha256 = new hashes.SHA256({ utf8: false }).raw(concat);
  const ripemd160 = new hashes.RMD160({ utf8: false }).raw(sha256);
  const hash = toHex(reverseString(ripemd160));
  return hash == claim.claim_id;
}

The solution is to either fix it, or use another method of determining whether a claim is an update, or to just drop this check.

The function is called on reward.js line 152, and was put there for a reason (d77fc88), but it may no longer be necessary.

Here's a sample claim, for testing. isInitialClaim() should return true for this, but it returns false.

{
  "address": "bTe9jQQnmFEqmPKZnoMgmUqU3JxWDEeCTG",
  "amount": 1.0,
  "category": "claim",
  "claim_id": "3c0c4987f349b882f49eeddbe3ed4f6630abb244",
  "name": "@kcseb",
  "nout": 1,
  "txid": "d54908242fd50627cd8a39b1a6858f7295d5c9e0771d185437ed2d254738fa58",
}

@lyoshenka lyoshenka reopened this Oct 30, 2017

@tzarebczan

This comment has been minimized.

Copy link
Member

tzarebczan commented Oct 30, 2017

I don't see why we would need the check for Rewards purposes - whether it was a claim update or not, if the user is eligible to earn the reward, they should be able to.

@lyoshenka lyoshenka closed this in 47208b7 Oct 30, 2017

lyoshenka added a commit that referenced this issue Oct 30, 2017

Merge pull request #706 from lbryio/fix-channel-surfing-reward
simplify check for initial claim. fix #290
@tzarebczan

This comment has been minimized.

Copy link
Member

tzarebczan commented Oct 31, 2017

Verified fix on a user's PC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.