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

Can't release old claim

Open kimihiro64 opened this issue 9 years ago • 11 comments

Awhile back, I had an overturned claim with a substantial amount of LBC in it, but because of a bug at the time, I was unable to release that particular claim. And now I've forgotten how to look up and release that claim to see if it's been fixed. Pointers on listing and releasing existing claims with daemon commands? Reporting as an issue in case it's still bugged.

About Your copy of LBRY is up to date.

daemon (lbrynet) 0.11.0 wallet (lbryum) 2.7.25 interface 0.12.0 Platform Linux (Linux-4.4.0-75-generic-x86_64-with-Ubuntu-16.04-xenial) Installation ID 3n1vtReZyaeUpTweiXPuVF7ncX1HVAKj3mJp9Lhpns71kbh6c9yv8yDzHenokJWRfc

kimihiro64 avatar Jun 18 '17 04:06 kimihiro64

Please join us on slack to ask questions like these instead of opening issues. Here is a YouTube tutorial on how to abandon. The commands are in the api guide too. We will be making this possible with the GUI in the future.

https://youtu.be/l1eqoE9xNsg

tzarebczan avatar Jun 18 '17 04:06 tzarebczan

satan@satan-Aspire-V5-591G:~/Downloads/LBRY Daemon$ ./lbrynet-cli claim_list_mine WARNING:lbrynet.conf:Ignoring invalid conf file setting: wallet_type WARNING:lbrynet.conf:Ignoring invalid conf file setting: requested_first_run_credits WARNING:lbrynet.conf:Ignoring invalid conf file setting: start_lbrycrdd []

Now I can't even get the claim id >.>

kimihiro64 avatar Jun 18 '17 04:06 kimihiro64

Are you running the daemon? Are you on the old wallet type, i.e wallet.dat as opposed to default_wallet? When is your orignal install from? Might need help from @jack here, but give him some time as it's the weekend.

tzarebczan avatar Jun 18 '17 04:06 tzarebczan

Original install was one of the first alpha clients. But the claim issue must've happened somewhere around 0.6 or 0.5, I /think/ the transaction happened on the newer lbryum wallet.

kimihiro64 avatar Jun 18 '17 04:06 kimihiro64

Address that holds the claim: https://explorer.lbry.io/#!/address/bPLRZUG7Kodc4aqeAkcF2gJL1WGDFRepKj

Transaction ID: https://explorer.lbry.io/#!/transaction/5ecc82698582e10e2f0f6346c5aabafe26d24d5aebd529daf31e13256355b2a1

Claim ID: c0de6d96466986e5a1b6d3c1c52c6712d1f12049

But when I try to abandon, says claim not found. Likewise claim_list_mine returns empty. That address is in my wallet though. Issue is likely somewhere in here:

https://github.com/lbryio/lbryum/blob/ce78bbec809f9fe866c2eae3d3d024ae75e22d2d/lib/wallet.py#L1000

Possibly https://github.com/lbryio/lbryum/blob/ce78bbec809f9fe866c2eae3d3d024ae75e22d2d/lib/wallet.py#L1018

kimihiro64 avatar Jun 18 '17 07:06 kimihiro64

It looks like the bug is caused by the fact that the claim was stored incorrectly. When I filter get_name_claims to only look for address bPLRZUG7Kodc4aqeAkcF2gJL1WGDFRepKj, it has no txos or txis returned from self.get_addr_io(addr).

kimihiro64 avatar Jun 18 '17 18:06 kimihiro64

self.txo.get(tx_hash, {}) for tx_hash 5ecc82698582e10e2f0f6346c5aabafe26d24d5aebd529daf31e13256355b2a1 returns only {u'bTxsfS8mucMEGmZVHcequTp861XnaEbtit': [[0, 947200, False]]}. In other words, the actual address with the claim amount bPLRZUG7Kodc4aqeAkcF2gJL1WGDFRepKj was not listed as an output, even though its own history is tied to that tx_hash. It would seem my 1510 literally fell off the block chain.

kimihiro64 avatar Jun 18 '17 19:06 kimihiro64

Did @wallermadev help you out? Can we close this?

tzarebczan avatar Jun 19 '17 12:06 tzarebczan

No, not fully resolved. I'm not really sure how to solve this honestly. I can try and fake the output to get it to try and recognize it was my claim, but not sure if the rest of the clients will accept that as a valid transaction.

kimihiro64 avatar Jun 20 '17 00:06 kimihiro64

I hacked the code many, many times to force it to submit the abandon claim with (I hope) valid attributes, but it came back with this:

{ "reason": "error: The transaction was rejected by network rules.(16: bad-txns-in-belowout)\n[0100000001a1b2556325131ef3da29d5eb5a4dd226febaaac546630f2f0ee182856982cc5e000000006b483045022100d73b35164e507077f9fe73c6825ab4055408f8e8c299e26362908efa028d5be402202df93d853ef0a6e0d74678b33ce71a980c813866df2e0f95fa7aa55029e2b25f012102eb62aa43876729c4562a52b216898ab8b830c76c225f6472e1d88acdc64afa3cffffffff0100264d28230000001976a914b209da1919749a8710025311acea9b7cec12ba0b88ac00000000]", "success": false }

kimihiro64 avatar Jun 20 '17 02:06 kimihiro64

Was able to successfully abandon the transaction. Part of the bug was that the output address did not get stored in the 'txo' section of the wallet (I fixed this manually). The other part was that the nOut for this claim is 1, when lbry assumes nOut of 0 for claims. In this case nOut = 0 was the transaction fee, so I had to allow it in the code to use 0 in order to pass the sanity checks, and then change it back to 1 when signing the transaction so it would use the right input. The bad-txns-in-belowout error from network was because the transaction fee address nOut = 0 obviously didn't have enough to cover the abandon.

kimihiro64 avatar Jun 25 '17 00:06 kimihiro64