Skip to content
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

WIP: Demo relative lock time module #455

Closed

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Aug 16, 2022

Not a merge candidate. This PR demos (last patch only) the use of the new relative::LockTime module.

Depend on possible code in the upcoming bitcoin 0.29.0 release.

"possible" because the current "dev-branch" of bitcoin that is used
contains two PRs that have not yet merged.
@tcharding tcharding force-pushed the demo-relative-lock-time-module branch from f8aa659 to a491468 Compare August 25, 2022 04:43
Implement `check_older` using the new `relative::LockTime` API.

This code seems upside down, I'm not sure I have the naming correct,
i.e., I don't know which (`self` or arg) is doing the satisfying and
which is satisfied?

I believe the `<=` are going the correct direction, its the naming and
which sequence value to call the 'lock' that I'm struggling with.
@tcharding tcharding force-pushed the demo-relative-lock-time-module branch from a491468 to a332ad9 Compare August 26, 2022 00:52
apoelstra added a commit to rust-bitcoin/rust-bitcoin that referenced this pull request Sep 1, 2022
da95c3a Add newtype `relative::LockTime` (Tobin C. Harding)
cbfa8cf Improve lock time docs (Tobin C. Harding)
9f7d934 Move the locktime module to absolute (Tobin C. Harding)

Pull request description:

  Patches 1 and 2 are preparation. Patch 3 adds a new `relative::LockTime` type.

  Please see rust-bitcoin/rust-miniscript#455 for demo of use of the new API in miniscript.

  ### Some links to help during review
  - https://medium.com/summa-technology/bitcoins-time-locks-27e0c362d7a1
  - https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki
  - https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki

ACKs for top commit:
  apoelstra:
    ACK da95c3a
  sanket1729:
    ACK da95c3a. Left a minor nit

Tree-SHA512: 00137161eee354faa803f74dd33dbaaf58ced58cf54d334200be28e10281bb98cb72dff38b3205d1741b8d42100c3b8229e4cfa2155e46bb74b418b612c12dec
@tcharding
Copy link
Member Author

Relative lock time merged into rust-bitcoin already.

@tcharding tcharding closed this Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant