RPC calls ignore locktime transactions #370

Open
opened 2020-02-24 21:38:34 +01:00 by BrannonKing · 1 comment
BrannonKing commented 2020-02-24 21:38:34 +01:00 (Migrated from github.com)

Enable address decode and "is mine" for transactions containing the OP_CHECKLOCKTIMEVERIFY and OP_CHECKSEQUENCEVERIFY prefixes.

I'm not sure if should report something as spendable when the timelock has not yet elapsed, but we should afterward. Right now the "watch only" flag is required to see these.

Enable address decode and "is mine" for transactions containing the OP_CHECKLOCKTIMEVERIFY and OP_CHECKSEQUENCEVERIFY prefixes. I'm not sure if should report something as spendable when the timelock has not yet elapsed, but we should afterward. Right now the "watch only" flag is required to see these.
BrannonKing commented 2020-02-26 21:48:19 +01:00 (Migrated from github.com)

listreceivedbyaddress shows them if you run importaddress on the redeemscript.

In reviewing the code again, multisig addresses are not considered non-standard. They are first-class citizens. Therefore the "is mine" code correctly handles them. The timelock stuff, on the other hand, falls down the "nonstandard transaction" path. Therefore, it is only monitored if it is explicitly marked as "watch only".

So that leaves three options:

  1. Make the timelock scripts first-class citizens.
  2. Automatically add them as "watch only" scripts in addtimelockedaddress.
  3. Rely on somebody who cares to call importaddress on the redeemscript.
    Option 1 is more involved. Option 3 requires no work. Option 2 and 3 rely on the "watch only" stuff.
listreceivedbyaddress shows them if you run importaddress on the redeemscript. In reviewing the code again, multisig addresses are not considered non-standard. They are first-class citizens. Therefore the "is mine" code correctly handles them. The timelock stuff, on the other hand, falls down the "nonstandard transaction" path. Therefore, it is only monitored if it is explicitly marked as "watch only". So that leaves three options: 1. Make the timelock scripts first-class citizens. 2. Automatically add them as "watch only" scripts in addtimelockedaddress. 3. Rely on somebody who cares to call importaddress on the redeemscript. Option 1 is more involved. Option 3 requires no work. Option 2 and 3 rely on the "watch only" stuff.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbrycrd#370
No description provided.