-
Notifications
You must be signed in to change notification settings - Fork 178
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
Claim abandon fails - 64: non-mandatory-script-verify-flag (Data push larger than necessary) #242
Comments
@tzarebczan on frequency of this: It's hard to tell, but I ran into on spee.ch and another user did also a few weeks ago. |
The transaction with the claim that the above transaction posted by tom is abandoning
|
I have a wallet file with the claim that has this issue if anyone needs it (sent to @kaykurokawa already) |
The error code that is being flagged here is: SCRIPT_ERR_MINIMALDATA , and it is checked here The problem originates from the claim that is being abandoned that I posted above, txid: "36fd14100c158cff42d1866121d5e1d16c4760a27dfc68ed5ecac9ab31dbbfa7" If you check the value component of the name claim on vout:0, you can check it is exactly 255 bytes long. This means that it should use OP_PUSHDATA1 (0x4c) to push the data on to the stack, however OP_PUSHDATA2 (0x4d) is used, and this will trigger the CheckMinimalPush() to return false. It looks like the current version of Torba handles this properly as seen here: https://github.com/lbryio/torba/blob/master/torba/client/basescript.py#L54 . The above transaction is from June 9th 2018, so I think it was created using the now deprecated lbryum code base. There is some additional tricky things here as well related to how lbrycrd pareses valid claim transactions. https://github.com/lbryio/lbrycrd/blob/master/src/nameclaim.cpp#L59 . You will notice that claim names and values of size 1 character cannot be pushed onto the stack using, OP_1NEGATE, OP_1, OP_2, ... OP_16 , since these op codes are > OP_PUSHDATA4 . Doing so results in the claim being invalid. It looks like both lbrycrd ( https://github.com/lbryio/lbrycrd/blob/master/src/script/script.h#L438 ) and torba never uses OP_1NEGATE... OP_16 to push claim names and values on to the stack so it should not create invalid claims. However, these kinds of pushes will also get caught by CheckMinimalPush() and will get rejected by network policy. As for the simple solution, I believe it would be fairly safe to disable this network policy implemented by CheckMinimalPush(), it was originally implemented here A bit more involved solution would just be to disable CheckMinimalPush() for claim transactions so people can abandon their claims created in lbryum and avoid potential issues with the OP_1NEGATE.. I think this method could also be fine and maybe more preferable. |
I put @kaykurokawa 's suggested fix into master. It now disables the minimal push validation on claims. |
When abandoning certain claims, they are rejected by the mempool. Not sure if this is related to the dust issue we saw in the past (#186) as the value here is higher.
decoded tx:
The text was updated successfully, but these errors were encountered: