All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
- Bump
bincodeto2.0.1(#356) @lklimek
- Use feature for console UI (#158) @QuantumExplorer
- Code analysis documentation (#159) @QuantumExplorer
- InstantLock BLS signature verification and peer reputation (#163) @PastaPastaPasta
- Buffered stateful framing for TCP connections (#167) @PastaPastaPasta
- Enhanced storage clear and balance display (#174) @PastaPastaPasta
- Comprehensive wallet FFI transaction builder (#175) @PastaPastaPasta
- DashPay support (#177) @QuantumExplorer
- Async check transaction (#178) @QuantumExplorer
- Broadcast transaction support (#180) @pauldelucia
- Update FFI headers (#183) @xdustinface
- Flush header index on shutdown and after header sync (#197) @pauldelucia
- Add
pre-commitinfrastructure (#201) @xdustinface - Introduce
DashSpvClientInterface(#214) @xdustinface - DIP-17 Platform Payment account support in key-wallet (#229) @pauldelucia
- Add data directory lockfile protection (#241) @xdustinface
- Validate headers during sync (#242) @xdustinface
- Parallelize header validation with
rayon(#243) @xdustinface - Add
atomic_writefor atomic file writing (#245) @xdustinface - Add logging module with file rotation support (#252) @xdustinface
- Add workflow to label PRs with merge conflicts (#265) @xdustinface
- Filter storage using segmentscache (#267) @ZocoLini
- Height based storage (#272) @ZocoLini
- Add benchmarks with criterion (#277) @ZocoLini
- Add
--mnemonic-fileCLI argument (#285) @xdustinface - Add
networktoFFIWalletManagerstruct (#325) @xdustinface
- Split big files in dash-spv (#160) @QuantumExplorer
- Update GitHub Actions to use ubuntu-22.04-arm (#169) @PastaPastaPasta
- Drop unused code in
dash-spv::network(#179) @xdustinface - Rename
MultiPeerNetworkManagertoPeerNetworkManager(#184) @xdustinface - Improve SPV shutdown handling with
CancellationToken(#187) @xdustinface - Rename
TcpConnectiontoPeerandConnectionPooltoPeerPool(#190) @xdustinface - Drop unused code in
dash-spv::network(#192) @xdustinface - Clippy auto fixes (#198) @pauldelucia
- Make flow control syncing default (#211) @xdustinface
- Rename
HeaderSyncManagerWithReorgtoHeaderSyncManager(#221) @xdustinface - Don't add a dummy in
mark_filter_received(#222) @xdustinface - Cleanup and simplify
MemoryStorageManager(#224) @xdustinface - Make
synced_from_checkpointbased onsync_base_height(#226) @xdustinface - More address matching in typo checker (#230) @xdustinface
- Use
genesis_blockfor all nets ininitialize_genesis_block(#231) @xdustinface - Rename
SequentialSyncManagertoSyncManager(#235) @xdustinface - Some restructuring in
dash-spv::sync(#236) @xdustinface - Cleanup SPV validation (#237) @xdustinface
- Move header validation into
sync::headers::validation(#238) @xdustinface - Replace SyncPhase matches wildcard usage with exhaustive match (#239) @ZocoLini
- Storage segments cleanup (#244) @ZocoLini
- Pin rust version in
rust-toolchain.toml(#266) @xdustinface - Less cloning in SPV message handling (#268) @xdustinface
- Make filter loading range based (#269) @xdustinface
- Single network
WalletandManagedWalletInfo(#271) @xdustinface - Remove all use of
dyn(#274) @ZocoLini - Some
ChainStatecleanups (#289) @ZocoLini - Drop
FFINetworksand useFFINetworkonly (#294) @xdustinface - Single network
WalletManager(#299) @xdustinface - Make wallet birth height non-optional (#300) @xdustinface
- Drop unused sync code (#208) @xdustinface
- Drop
ChainHashand related tests fromdash(#228) @xdustinface - Drop unused code in
dash-spv::sync(#232) @xdustinface - Drop unused code in
dash-spv::checkpoint(#233) @xdustinface - Remove unused struct
StorageConfig(#273) @ZocoLini - Remove
MemoryStorageManager(#275) @ZocoLini - Drop persistent sync state (#279) @ZocoLini
- Remove unused
ChainLockStats(#281) @ZocoLini - Remove unused orphan pool module (#282) @ZocoLini
- Remove
StorageStats(#283) @ZocoLini - Remove duplicate quorum validation logic (#284) @ZocoLini
- Drop unused
lookahead(#288) @xdustinface - Remove unused filters field from
ChainState(#293) @xdustinface - Move logo and protx test data files to contrib (#295) @xdustinface
- Remove unused
swift-dash-core-sdk(#301) @xdustinface
- CFHeaders overlap verification and underflow prevention (#163) @PastaPastaPasta
- FFI event flooding and memory leak in progress callbacks (#173) @PastaPastaPasta
PeerNetworkManagercast inbroadcast_transaction(#185) @xdustinface- Use non-blocking
TcpStreamin TCP connection (#188) @xdustinface - Locking issue after #190 (#191) @xdustinface
- Follow-up fixes to #190 (#193) @xdustinface
- Let the examples start the network monitoring (#194) @xdustinface
- Wait for MnListDiff responses before transitioning to next phase (#199) @pauldelucia
- SPV Regtest/Devnet support (#227) @xdustinface
- Drop duplicated received filter update (#248) @xdustinface
- Compressed headers protocol compatibility with Dash Core (#256) @PastaPastaPasta
- Stop loading headers twice into
ChainState::headers(#258) @xdustinface - FILTER_REQUEST_BATCH_SIZE should be 1000, not 100 (#260) @PastaPastaPasta
- Return the correct block hash in
prepare_sync(#262) @xdustinface - FFI CLI percentage display (#263) @ZocoLini
maintain_gap_limittarget calculation off by one (#286) @xdustinface- Docs build issues (#297) @xdustinface
At nearly nine months, this is our longest release cycle ever, and thanks to a huge increase in the number of active contributors this year and last, it is also by far our largest release ever, at 148 PRs merged from 23 different contributors. Our primary goal in this release was to introduce support for Taproot and its associated data structures: addresses, taptrees, sighashes, PSBT fields, and more. As it turned out, these changes required (or at least, incentivized) changing a lot of our APIs, causing a significant increase in scope.
We have more big changes coming down the pike. 2022 is going to be a big
year for rust-bitcoin, which we know is exciting for us but disruptive to
downstream users who ultimately want the library to just work. Our hope is
that by 2023 we will have eliminated large amounts of technical debt,
modernized our APIs to meet current Rust conventions, and clarified the scope
of the individual crates in this ecosystem while still providing the essential
functionality needed by our downstream users, especially wallet projects.
We will also develop a plan to make our releases more predictable and manageable, likely by having scheduled releases with limited scope. We would like to reach a point where we no longer have frequent breaking releases, but right now we are nowhere close.
Upcoming changes will include
- A quick new release which updates our MRSV from 1.29 to 1.41 and does little else
- Updating our codebase to take advantage of the new MSRV, especially regarding nostd and wasm support
- A comprehensive rethinking and flattening of our public-facing APIs
- Richer support for PSBT, Script, and BIP-0340/Schnorr signatures
With so many changes since 0.27, we cannot list every PR. Here are the highlights:
- Remove dangerous
fuzztargetcargo feature #634 - Improve serde serialization for
Script#596 - Documentation improvements #623 #633 #663 #689 #704 #744 #852 #869 #865 #864 #858 #806 #877 #912 #923
- Introduce
WitnessVersiontype #617 - Improve error types and API #625
- Implement
Block.get_strippedsize()andTransaction.get_vsize()#626 - Add Bloom filter network messages #580
- Taproot: add signature hash support #628 #702 #722 #835 #903 #796
- Taproot: add new Script opcodes #644 #721 #868 #920
- Taproot: add bech32m support, addresses and new key types #563 #691 #697 #728 #696 #757
- Taproot: add taptree data structures #677 #703 #701 #718 #845 #901 #910 #909 #914
- no-std improvements #637
- PSBT improvements, including Taproot #654 #681 #669 #774 #779 #752 #776 #790 #836 #847 #842
- serde improvements #672
- Update rust-secp256k1 dependency #694 #755 #875
- Change BIP32 to use rust-secp256k1 keys rather than rust-bitcoin ones (no compressedness flag) #590 #591
- Rename inner key field in
PrivateKeyandPublicKey#762 - Address and denomination related changes #768 #784
- Don't allow hybrid EC keys #829
- Change erroneous behavior for
SIGHASH_SINGLEbug #860 #897 - Delete the deprecated
contracthashmodule #871; this functionality will migrate to ElementsProject/rust-elements - Remove compilation-breaking feature-gating of enum variants" #881
Additionally we made several minor API changes (renaming methods, etc.) to improve compliance with modern Rust conventions. Where possible we left the existing methods in place, marked as deprecated.
- Bigendian fixes and CI test
- no_std support, keeping MSRV
- Bech32m adoption
- Use Amount type for dust value calculation
- Errors enum improvements
- std -> core
The previous release changed the behavior of Display for ChildNumber, assuming that any correct usage would not be
affected. Issue 608 goes into the details of why this isn't
the case and how we broke both rust-miniscript and BDK.
- Change Amount Debug impl to BTC with 8 decimals
- Make uint types (un)serializable
- Add more derives for key::Error
- Fix optional amount serialization
- Add PSBT base64 (de)serialization with Display & FromStr
- Add non-API breaking derives for error & transaction types
- Fix error derives
- Add function to check RBF-ness of transactions
- Add Script:dust_value() to get minimum output value for a spk
- Improving bip32 ChildNumber display implementation
- Make Script::fmt_asm a static method and add Script::str_asm
- Return BlockHash from BlockHeader::validate_pow
- Add a method to error on non-standard hashtypes
- Include proprietary key in deserialized PSBT
- Fix Script::dust_value()'s calculation for non-P2*PKH script_pubkeys
- Add Address to optimized QR string conversion
- Correct Transaction struct encode_signing_data_to doc comment
- Fixing CI if base image's apt db is outdated
- Introduce some policy constants from Bitcoin Core
- Fix warnings for sighashtype
- Introduction of Schnorr keys
- Adding constructors for compressed and uncompressed ECDSA keys
- Count bytes read in encoding
- Add verify_with_flags to Script and Transaction
- Fixes documentation intra-links and enforce it
- Fixing hashes core dependency and fuzz feature
- Add signet support
- Add wtxidrelay message and
WTxinv type for BIP 339 - Add addrv2 support
- Distinguish
FilterHeaderandFilterHash - Add hash preimage fields to PSBT
- Detect write errors for
PublicKey::write_into - impl
OrdandPartialOrdforInventory - Add binary encoding for BIP32 xkeys
- Add Taproot Tagged Hashes
- Add
message::MAX_INV_SIZEconstant - impl
ToSocketAddrsfor network addresses - Add new global fields to PSBT
- Serde serialization of PSBT data
- Make
InventoryandNetworkMessageenums exhaustive - Add PSBT proprietary keys
- Add
PublicKey::read_frommethod symmetric withwrite_to - Bump rust-secp to 0.20, turn off
recoveryfeature by default - Change return value of
consensus_encodetoio::Error
- Remove an incorrect
debug_assertthat can cause a panic when running using the dev profile.
- Expose methods on
Scriptto generate various scriptpubkeys - Expose all cargo features of secp256k1
- Allow directly creating various hash newtypes
- Add methods to
Blockto get the coinbase tx and BIP34 height commitment - Add
extendmethod to bip32::DerivationPath - Alias
(Fingerprint, DerivationPath)asKeySource - Add serde implementation for PSBT data structs
- Add FromStr/Display implementation for SigHashType
- Expose the raw sighash message from sighash computations
- Add support for signmessage/verifymessage style message signatures
- Bump MSRV to 1.29.0
- Remove the
BitcoinHashtrait - Introduce
SigHashCachestructure to replaceSighashComponentsand support all sighash modes - Add
Transaction::get_sizemethod - Export
amount::Denomination - Add
Block::get_sizeandBlock::get_weightmethods - Add
MerkleBlock::from_header_txids - Add
BlockHeader::u256_from_compact_target - Add
feefilternetwork message - Cleanup/replace
Script::Instructionsiterator API - Disallow uncompressed pubkeys in witness address generation
- Deprecate
contracthashmodule - Add modulo division operation for
Uint128andUint256 - Add
slice_to_u64_beendian conversion method
- Update
secp256k1dependency to0.17.1. - Update
bitcoinconsensusdependency to0.19.0-1. - Update
bech32dependency to0.7.2.
- Add
ServiceFlagstype. - Add
NetworkMessage::command. - Add
key::Error. - Add newtypes for specific hashes:
TxidWtxidBlockHashSigHashPubkeyHashScriptHashWPubkeyHashWScriptHashTxMerkleNodeWitnessMerkleNodeWitnessCommitmentXpubIdentifierFilterHash
- Refactor
CommandString. - Refactor
Rejectmessage. - Rename
RejectReasonenum variants. - Refactor
encode::Error. - Implement
DefaultforTxIn. - Implement
std::hash::HashforInventory. - Implement
CopyforInvTypeenum. - Use
psbt::ErrorinPartiallySignedTransaction::from_unsigned_tx. - Drop message decode max length to 4_000_000.
- Drop
hexandbyteorderdependencies.
- Add serde to
BlockHeaderandBlock - Clean up
StreamReaderAPI (breaking change) - Add reject message to p2p messages
- Update
secp256k10.15 andbitcoinconsensus0.17
- Add
AmountandSignedAmounttypes. - Add BIP-158 support with
BlockFilterand related types. - Add
misc::signed_msg_hash()for signing messages. - Add
MerkleBlockandPartialMerkleTreetypes. - bip32: Support serde serializaton for types and add some utility methods:
ChildNumber::incrementDerivationPath::children_fromDerivationPath::normal_childrenDerivationPath::hardened_children
- Add
blockdata::script::Builder::push_verifyto verify-ify an opcode. - Add
sendheadersnetwork message. - Add
OutPoint::new()method and JSON-serialize as<txid>:<vout>. - Refactor
Addresstype:- Now supports segwit addresses with version >0.
- Add
Address::from_scriptconstructor. - Add
Address::address_typeinspector. - Parsing now returns an
address::Errorinstead ofencode::Error. - Removed
bitcoin_bech32dependency for bech32 payloads.
- bip143: Rename
witness_scripttoscript_code - Rename
BlockHeader::spv_validatetovalidate_pow - Rename
OP_NOP2andOP_NOP3toOP_CLTVandOP_CSV - psbt: Use
BTreeMapinstead ofHashMapto ensure serialization roundtrips. - Drop
Decimaltype. - Drop
LoneHeaderstype. - Replace
strasondependency with (optional)serde_json. - Export the
dashcore_hashesandsecp256k1dependent crates. - Updated
dashcore_hashesdependency to v0.7. - Removed
randandserde_testdependencies. - Internal improvements to consensus encoding logic.
- Update
bitcoin-bech32version to 0.9 - add
to_bytesmethod forkeytypes - add serde impls for
keytypes - contracthash: minor cleanups, use
keytypes instead ofsecp256k1types
- Add some trait impls to
PublicKeyfor miniscript interoperability
- Update minimum rustc version to 1.22.
- Replace
rust-cryptowithdashcore_hashes; refactor hash types - Remove
Address::p2pk - Remove misleading blanket
MerkleRootimplementation; it is now only defined forBlock - Add BIP157 (client-side block filtering messages)
- Allow network messages to be deserialized even across multiple packets
- Replace all key types to better match abstractions needed for PSBT
- Clean up BIP32 in preparation for PSBT; use new native key types rather than
secp256k1ones - Remove apparently-used
Optionserialization code - Finally merge PSBT after nearly nine months
- Reorganize opcode types to eliminate unsafe code
- Un-expose some macros that were unintentionally exported
- Update rust-secp256k1 dependency to 0.12
- Remove
iter::Pairtype which does not belong in this library - Minor bugfixes and optimizations
- Significant API overhaul:
- Remove
nu_selectmacro and low-level networking support - Move
network::consensus_paramstoconsensus::params - Move many other things into
consensus::params - Move
BitcoinHashfromnetwork::serializetohash; remove impl forVec<u8> - Rename/restructure error types
- Rename
Consensus{De,En}codertoconsensus::{De,En}coder - Replace
Raw{De,En}coderwith blanket impls ofconsensus::{De,En}coderonio::Readandio::Write - make
serializeandserialize_hexinfallible
- Remove
- Make 0-input transaction de/serialization always use segwit
- Implement
FromStrandDisplayfor many more types
- Add serde support for
Address
- Reject non-compact
VarInts on various types - Expose many types at the top level of the crate
- Add
Ord,PartialOrdimpls forScript
- Add regtest network to
Networkenum - Add
Script::is_op_return()which is more specific thanScript::is_provably_unspendable() - Update to bech32 0.8.0; add Regtest bech32 address support
- Replace rustc-serialize dependency with hex as a stopgap toward eliminating any extra dependencies for this; clean up the many independent hex encoders and decoders throughout the codebase.
- Add conversions between
ChildNumberandu32; make representation non-public; fix documentation - Add several derivation convenience to
bip32extended keys - Make
deserialize::deserialize()enforce no trailing bytes - Replace
TxOutRefwithOutPoint; use it inTxInstruct. - Use modern
as_to_into_conventions for array-wrapping types; implDisplayrather thanToStringfor most types - Change
script::Instructionsiterator to allow rejecting non-minimal pushes; fix bug where errors would iterate forever. - Overhaul
Error; introduceserialize::Errorand use it forSimpleDecoderandSimpleDecoderrather than parameterizing these over their error type. - Overhaul
UDecimalandDecimalserialization and parsing and fix many lingering parsing bugs - Update to serde 1.0 and strason 0.4
- Update to secp256k1 0.11.0
- Many, many documentation and test improvements.
- Add
Displaytrait to uints,FromStrtrait toNetworkenum - Add witness inv types to inv enum, constants for Bitcoin regtest network,
is_coin_baseaccessor for tx inputs - Expose
merkleroot(Vec<Sha256dHash>)
- Move witnesses inside the
TxInstructure - Add
Transaction::get_weight() - Update bip143
sighash_allAPI to be more ergonomic
- The in-memory blockchain was moved into a dedicated project rust-bitcoin-chain.
- Removed old script interpreter
- A new optional feature "bitcoinconsensus" lets this library use Bitcoin Core's native
script verifier, wrappend into Rust by the rust-bitcoinconsenus project.
See
Transaction::verifyandScript::verifymethods. - Replaced Base58 traits with
encode_slice,check_encode_slice, from andfrom_checkfunctions in the base58 module. - Un-reversed the Debug output for Sha256dHash
- Add bech32 support
- Support segwit address types
- Remove
numdependency at Matt's request; agree this is obnoxious to require all downstream users to also have anumdependency just so they can useUint256::from_u64.
- bump bitcoin crate version to 0.28.0
- add
get_block_stats - add
add_node - add
remove_node - add
onetry_node - add
disconnect_node - add
disconnect_node_by_id - add
get_added_node_info - add
get_node_addresses - add
list_banned - add
clear_banned - add
add_ban - add
remove_ban - make
Auth::get_user_passpublic - add
ScriptPubkeyType::witness_v1_taproot
- add
wallet_conflictsfield inWalletTxInfo - add
get_chain_tips - add
get_block_template - implement
From<u64>andFrom<Option<u64>>forImportMultiRescanSince - bump rust-bitcoin dependency to 0.27
- bump json-rpc dependency to 0.12.0
- remove dependency on
hex
- add
wallet_process_psbt - add
unlock_unspent_all - compatibility with Bitcoin Core v0.21
- bump rust-bitcoin dependency to 0.26
- implement Deserialize for ImportMultiRescanSince
- some fixes for some negative confirmation values
- bump
bitcoindependency to version0.25, increasing our MSRV to1.29.0 - test against
bitcoind0.20.0and0.20.1 - add
get_balances - add
get_mempool_entry - add
list_since_block - add
get_mempool_entry - add
list_since_block - add
uptime - add
get_network_hash_ps - add
get_tx_out_set_info - add
get_net_totals - partially implement
scantxoutset - extend
create_walletand related APIs - extend
GetWalletInfoResult - extend
WalletTxInfo - extend testsuite
- fix
GetPeerInfoResult - fix
GetNetworkInfoResult - fix
GetTransactionResultDetailCategory - fix
GetMempoolEntryResultfor bitcoind prior to0.19.0 - fix
GetBlockResultandGetBlockHeaderResult
- fix
minimum_sum_amountfield name inListUnspentQueryOptions - add missing "orphan" variant for
GetTransactionResultDetailCategory - add
ImportMultiRescanSinceto support "now" forimportmulti'stimestampparameter - rename logging target to
bitcoincore_rpcinstead ofbitcoincore_rpc::client - other logging improvements
- rename
dump_priv_key->dump_private_key+ change return type - rename
get_block_header_xxxmethods to conform withget_block_xxxmethods - rename
get_raw_transaction_xxxmethods to conform withget_block_xxxmethods - rename
GetBlockHeaderResultfields - rename
GetMiningInfoResultfields - represent difficulty values as
f64instead ofBigUint - fix
get_peer_info - fix
get_transaction - fix
get_balance - fix
get_blockchain_infoand make compatible with both 0.18 and 0.19 - fix
get_address_info - fix
send_to_address - fix
estimate_smart_fee - fix
import_private_key - fix
list_received_by_address - fix
import_address - fix
finalize_psbt - fix
fund_raw_transaction - fix
test_mempool_accept - fix
stop - fix
rescan_blockchain - add
import_address_script - add
get_network_info - add
version - add
Error::UnexpectedStructure - add
GetTransactionResultDetailCategory::Immature - make
list_unspentmore ergonomic - made all exported enum types implement
Copy - export
jsonrpcdependency. - remove
num_bigintdependency
- Add
wallet_create_funded_psbt - Add
get_descriptor_info - Add
combine_psbt - Add
derive_addresses - Add
finalize_psbt - Add
rescan_blockchain
- use
bitcoin::PublicKeyinstead ofsecp256k1::PublicKey - fix get_mining_info result issue
- fix test_mempool_accept issue
- fix get_transaction result issues
- fix bug in fund_raw_transaction
- add list_transactions
- add get_raw_mempool
- add reconsider_block
- add import_multi
- add import_public_key
- add set_label
- add lock_unspent
- add unlock_unspent
- add create_wallet
- add load_wallet
- add unload_wallet
- increased log level for requests to debug
- polish Auth to use owned Strings
- fix using Amount type and Address types where needed
- use references of sha256d::Hashes instead of owned/copied
- add get_tx_out_proof
- add import_address
- add list_received_by_address
- add support for cookie authentication
- add fund_raw_transaction command
- deprecate sign_raw_transaction
- use PrivateKey type for calls instead of string
- fix for sign_raw_transaction
- use 32-bit integers for confirmations, signed when needed
- add RawTx trait for commands that take raw transactions
- update jsonrpc dependency to v0.11.0
- fix for create_raw_transaction
- fix for send_to_address
- fix for get_new_address
- fix for get_tx_out
- fix for get_raw_transaction_verbose
- use
secp256k1::SecretKeytype in API
- removed the GetTransaction and GetScript traits (those methods are now directly implemented on types)
- introduce RpcApi trait
- use bitcoin_hashes library
- add signrawtransactionwithkey command
- add testmempoolaccept command
- add generate command
- improve hexadecimal byte value representation
- bugfix getrawtransaction (support coinbase txs)
- update rust-bitcoin dependency v0.16.0 -> v0.18.0
- add RetryClient example
- add send_to_address command
- add create_raw_transaction command
- Client methods take self without mut