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. |
||
---|---|---|
.. | ||
contrib | ||
src | ||
CHANGELOG.md | ||
Cargo.toml | ||
README.md |
README.md
Rust Bitcoin - primitive types.
This crate provides primitive data types that are used throughout the
rust-bitcoin
ecosystem.
Semver compliance
Functions marked as unstable (e.g. foo__unstable
) are not guaranteed to uphold semver compliance.
They are primarily provided to support rust-bitcoin
.
Minimum Supported Rust Version (MSRV)
This library should always compile with any combination of features on Rust 1.63.0.
Licensing
The code in this project is licensed under the Creative Commons CC0 1.0 Universal license. We use the SPDX license list and SPDX IDs.