rust-bitcoin-unsafe-fast/bitcoin
Andrew Poelstra 4e3af5162f
units: add global `BlockMtp` type
For our relative locktime API, we are going to want to take differences
of arbitrary MTPs in order to check whether they meet some relative
timelock threshold.

However, the `locktime::absolute::Mtp` type can only represent MTPs that
exceed 500 million. In practice this is a non-issue; by consensus MTPs
must be monotonic and every real chain (even test chains) have initial
real MTPs well above 500 million, which as a UNIX timestamp corresponds
to November 5, 1985.

But in theory this is a big problem: if we were to treat relative MTPs
as "differences of absolute-timelock MTPs" then we will be unable to
construct relative timelocks on chains with weird timestamps (and on
legitimate chains, we'd have .unwrap()s everywhere that would be hard to
justify). But we need to treat them as a "difference of MTPs" in *some*
sense, because otherwise they'd be very hard to construct.
2025-05-06 15:19:35 +00:00
..
contrib Remove rust-ordered dependency 2025-02-18 13:36:07 +11:00
embedded chore: remove unused cortex-m dependency from embedded Cargo.toml files in bitcoin and hashes modules. 2025-04-05 18:25:41 +08:00
examples Merge rust-bitcoin/rust-bitcoin#4373: Add as_inner method to TweakedKeypair 2025-05-03 23:24:19 +00:00
src units: add global `BlockMtp` type 2025-05-06 15:19:35 +00:00
tests Merge rust-bitcoin/rust-bitcoin#4387: bip32: overhaul error types and add a "maximum depth exceeded" error 2025-04-30 13:12:01 +00:00
CHANGELOG.md Fix broken changelog links 2025-05-05 12:19:13 +03:00
Cargo.toml bitcoin: Add a script encoding example 2025-04-28 13:38:12 +10:00