This changelog is a rolling description of everything that will eventually end up in v1.0.
There are a bunch of changes in this stable release, of note script tagging and the consensus encoding re-write.
- Introduce script tagging #4907
- Introduce pull encoding and use it for blockhash computation #4912
- Implement
Encodablefor&Script<T>#4978
And also we did:
- Remove
hashesfrom the public API #4935 - Bump MSRV from 1.63.0 to 1.74.0 for all crates in the repo #4926
- Rename
units::parsetoparse_int#4886 - Introduce
Ntxid#4839 - Remove
serdeimpls from some primitive types #4806 - Pluralize transaction fields #4788
- Use
CompactSizeinstead ofVarInt#4790 - Do not derive
DefaultonCompactTarget#4561 - Deserialize witness from a list of hex strings #4366
- Implement
FromIteratorforWitness#4365 - Return
ControlBlockfromWitness::taproot_control_block#4281 - Witness api improvements and test cleanups #4279
- Implement
DisplayforHeader#4269 - Make
hexoptional #4262 - Clean up Witness API #4186
- Move
taprootback tobitcoincrate #4129 - Make
transaction::Versionfield private #4099 - Hide error internals #4091
- locktimes: Remove
PartialOrdandArbitraryOrd#4065 - Make
Debugrepresentation ofWitnessto be slice of hex-encoded bytes strings to improve readability #4061 - Implement
DefaultforScript#4043 - Store
transaction::Versionasu32instead ofi32#4040 - Delete
TxOut::NULL#3978 - Reduce alloc requirements #3711
- Remove
serdefrom amounts #3672 - Fix bug in witness stack getters #3601
- Re-design and move
Blocktoprimitives#3582 - Re-export
block::HeaderasBlockHeader#3562 - Favour
to_vecoverto_bytes#3544
Lock times got a bit of work. A big win was:
- Improve lock times - fix off-by-one bug #4468
There was a bit of churn so we are not listing all the PRs. Better just to take a look at the new and improved API.
If you persist locktimes using serde you may want to look at because
we changed the format:
- Modify locktime serde implementations #4511
- Add Arbitrary impl for BlockHash, TxMerkleNode, and Wtxid #4720
- Add Arbitrary impl for relative::LockTime #4689
The whole crate is mutation tested using cargo-mutants - BOOM!
This is the first "real" release of the primitives crate, as such it
includes a lot of work. Search GitHub with the following filter to see
all related PRs: is:pr label:C-primitives merged:<=2024-11-15
Move the following modules and types from rust-bitcoin to bitcoin-primitives:
block:Block,Header,Version,BlockHash,WitnessCommitment,Validation,Checked,Uncheckedlocktime:absolute::LockTime,relative::LockTimemerkle_tree:TxMerkleNode,WitnessMerkleNodeopcodes:Opcodepow:CompactTargetsequence:Sequencetaproot:TapBranchTag,TapLeafHash,TapLeafTag,TapNodeHash,TapTweakHash,TapTweakTagtransaction:Transaction,TxIn,TxOut,OutPoint,Txid,Wtxid,Versionwitness:Witness,Iter
And various error types. See re-exports at the crate root and also in rust-bitcoin at the crate
root and from the respective module.
We hope to very soon release primitives 1.0 - please raise any and all issues you come across no
matter how small so we can fix them for the stable release.
Enjoy!
- Initial release of the
github.com/rust-bitcoin/rust-bitcoin/primitivescrate asbitcoin-primitives. The name on crates.io was generously transferred to us.