question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't claim Channel Surfing reward

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
lyoshenkacommented, 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 (d77fc883d1272b3f0cf8f0578c74e6fc752f9535), 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",
}
0reactions
tzarebczancommented, Oct 31, 2017

Verified fix on a user’s PC

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Ways to Fix the Claiming Bonus Error on Twitch [Channel ...
First, make sure you're logged in to the correct account. Then, check to see if the bonus is still available. If it is,...
Read more >
Channel Points FAQ - Twitch Help
No, you will only get points when watching from the channel page at twitch.tv or in app. Why can't I claim a reward?...
Read more >
HOW TO JOIN SURF POWDER PROMO | SPIN & WIN
SURF SPINPAALALA: This channel doesn't promotes any illegal content, ... HOW TO JOIN SURF POWDER PROMO | HOW TO SPIN & CLAIM THE...
Read more >
Earn $10 Amazon Gift Cards With the Surf Browser ... - YouTube
Here's a list of most of the rewards you can redeem for: - Amazon - eBay ... links that let you help support...
Read more >
YouTube Creator Awards - Google Support
To be eligible for a Creator Award, creators need to meet the eligibility criteria and must follow our policies. Find out if your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found