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
timestamp timelocks are not satisfied #642
Comments
Maybe I could work on this. |
Sure. To do this strictly correctly you need to know the "median time past": https://github.com/bitcoin/bitcoin/blob/a4e066af8573dcefb11dff120e1c09e8cf7f40c2/src/chain.h#L290-L302 I think an implementation on latest block timestamp would be better than nothing though? |
Maybe relevant: rust-bitcoin/rust-miniscript#408 |
I have reached a small hiccup. I was going to get blocktimes (for median time past) from the |
I think just use the last sync height rather than the median time past thingo. Should give pretty good approximation and very rarely make something valid when it is not (and it would not be invalid for long). (this implies we need to store the time as well as height in DB) |
Wait, I'm a bit lost on this: the PR says that this is actually not a problem because miniscript correctly checks for the timestamps as well, so I guess we could close this issue, right? Or did anybody ever encounter some actual issue trying to finalize a tx with timestamps? |
Added to alpha release, need to confirm miniscript correctly checks for the timestamps and if so close. Otherwise need to see if/how to fix. |
Need a check to see if it remains in alpha @notmandatory |
@ValuedMammal per your note in discord. I found a "threshold" test that includes timelocks in the |
It looks like the logic of
finalize_psbt
only checks if height based timelocks are satisfied:In addition, we should check satisfaction of timestamp based timelocks. I will fix this in
bdk_core
but I thought this was worth noting and fixing ahead of then.The text was updated successfully, but these errors were encountered: