#package #transaction #input #bitcoin #validation #conflict #spend

bitcoin-packages

a package is an ordered list of transactions. The transactions cannot conflict with (spend the same inputs as) one another

2 releases

0.1.16-alpha.0 Apr 1, 2023
0.1.12-alpha.0 Jan 19, 2023

#6 in #spend

Download history 85/week @ 2024-07-27 111/week @ 2024-08-03 68/week @ 2024-08-10 77/week @ 2024-08-17 73/week @ 2024-08-24 105/week @ 2024-08-31 76/week @ 2024-09-07 56/week @ 2024-09-14 96/week @ 2024-09-21 84/week @ 2024-09-28 56/week @ 2024-10-12 49/week @ 2024-10-19 64/week @ 2024-10-26 63/week @ 2024-11-02 19/week @ 2024-11-09

196 downloads per month
Used in 44 crates (2 directly)

MIT license

795KB
1.5K SLoC

bitcoin-packages

The bitcoin-packages crate is a Rust implementation of the Bitcoin package system, which provides a mechanism for bundling and validating groups of transactions together into a single package. This crate is a direct translation of the Bitcoin codebase from C++ to Rust, and is still in the process of being fully translated.

The Package struct represents a Bitcoin package, which contains a set of transactions and other information necessary for validation. The check_package function takes a Package as input and performs various validation checks to ensure that the package is valid and can be added to the blockchain. The result of the validation is returned as a PackageValidationResult, which includes information such as whether the package is valid, any errors encountered during validation, and the state of the package after validation.

There are various mathematical concepts and algorithms involved in the validation of Bitcoin packages, such as the verification of digital signatures and the calculation of transaction fees. These are not specific to this crate, but are fundamental to the Bitcoin protocol as a whole.

Overall, the bitcoin-packages crate provides an essential component of the Bitcoin system, allowing for the efficient and secure bundling and validation of transactions.

Dependencies

~99MB
~885K SLoC