Closed theborakompanioni closed 2 years ago
Okay.. I thought maybe the chain has not progressed enough.. but spending it in a "direct-send" worked just fine.. Sorry for these layman questions.. : /
Sorry for coming to this a bit late. Note the error in your log says Locktime requirement not satisfied
and then note this code:
So, this should mean that spending should work in a coinjoin, if you're using the p2wpkh type. Of course, it's also possible there's another bug happening. (As a side note: I think we can generous to ourselves and say 'it's not a bug otherwise' since ~ everyone is using p2wpkh now for coinjoins. But debatable, perhaps).
On the other hand, it could be something else. I'll try to do a sanity test now.
Sorry it seems I was being dumb, since your log clearly shows the tx having nLockTime of 280 and version of 2 (and native addresses as well!). So it's not that.
OK, so I need to dig a bit further: the report above has two parts:
the first is that it doesn't work with only an expired TL utxo, which ofc makes sense since you need a commitment which can't be sourced from that; so I guess we both agree that needs to be mentioned in the docs, but otherwise makes sense.
the second one, the main point at issue. utxo controlled by TL script. But TL expired:
I have reproduced your error, in both aspects: in coinjoin, the entire negotiation is correct but the final tx push fails with Locktime requirement not satisfied
, just like your case. Then repeating the same tx with -N0
(i.e. direct send), works. I notice: for the latter case, the locktime
field is actually 1640995201 (a timestamp), for the former it is 632, a block height. This is why it failed, it needs to be a timestamp. This seems to be an error with compute_tx_locktime
. I will check.
OK, figured it out I think: this code section is present for direct_send
but missing in coinjoin tx construction:
We will have to think about whether we should add this code to the coinjoin case (I think, not), or just update the docs.
Thank you for taking the time to verify. As you said, updating the docs as a first measure seems like a good idea. Whether you want to update/change any code as well is all up to you. Thank you :orange_heart:
Thank you for taking the time to verify. As you said, updating the docs as a first measure seems like a good idea. Whether you want to update/change any code as well is all up to you. Thank you orange_heart
Right, so I should explain further, just in case it isn't obvious to any reader:
Spending these utxos requires the nLockTime
field, which is a transaction wide value (i.e. it cannot be customized per input, as nSequence
can) to be of the 'timestamp' type, not the 'block height' type. See BIP65 for details.
It would be possible to add code to do this; makers are not verifying any particular choice by the taker, about these values; see the comment about makers here:
A reluctance to make this change, i.e. allowing the timestamp-type nLockType
is natural from the perspective:
nLockTime
).I'll just PR a doc change.
Thank you for the explanation - your reasoning makes perfect sense. Closing the issue as all questions are answered.
Trying to attempt a collaborative transaction by sweeping a mixdepth with only a single expired fidelity bond utxo.
When trying the same sweep with an additional (non-timelocked) utxo in the same mixdepth, it errors with
-26 non-mandatory-script-verify-flag (Locktime requirement not satisfied)
:The docs says:
Question: Is spending an expired fidelity bond possible as a taker or am I doing it wrong? As always, I am on
regtest
triggering all actions via API.