#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

#4 in #spend

Download history 117/week @ 2023-12-17 128/week @ 2023-12-24 53/week @ 2023-12-31 75/week @ 2024-01-07 108/week @ 2024-01-14 65/week @ 2024-01-21 36/week @ 2024-01-28 62/week @ 2024-02-04 76/week @ 2024-02-11 106/week @ 2024-02-18 102/week @ 2024-02-25 90/week @ 2024-03-03 119/week @ 2024-03-10 112/week @ 2024-03-17 158/week @ 2024-03-24 188/week @ 2024-03-31

580 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

~98MB
~829K SLoC