You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We may want to be able to iterate fast on bdk_chain without breaking Wallet. This means Wallet may be of an older version of bdk_chain. Therefore, Wallet (currently) will have to use older versions of chain sources (since our chain sources depend on bdk_chain).
It will be a nice property if projects that use BDK can stay put on a specific bdk_chain version, but still use the latest chain-source crate version.
Additional context
Why would we need to break bdk_chain?
There are a couple a breaking changes that we simply do not have enough time to include in the v1.0-beta release.
Chain sources will only depend on bdk_core. Note that we need to introduce tx_graph::Update though.
Potential downsides
bdk_core will still need to depend on bitcoin. Any major version updates to bitcoin will be a breaking change and we will need to introduce a new major version for bdk_core. To make these suggested changes useful, we need to lock down on specific major releases of bitcoin.
Describe the problem
We may want to be able to iterate fast on
bdk_chainwithout breakingWallet. This meansWalletmay be of an older version ofbdk_chain. Therefore,Wallet(currently) will have to use older versions of chain sources (since our chain sources depend onbdk_chain).It will be a nice property if projects that use BDK can stay put on a specific
bdk_chainversion, but still use the latest chain-source crate version.Additional context
Why would we need to break
bdk_chain?There are a couple a breaking changes that we simply do not have enough time to include in the
v1.0-betarelease.Get rid of
IndexedTxGraphand just put theIndexerinTxGraph. This removes a bunch of overhead and is in general much cleaner.Anchortrait and make anchors unique to (Txid, BlockId) #1515Removing the anchor trait, and representing the
Anchoras a concrete type is much cleaner and a less error-prone API.Both of these changes will break
ChangeSet.Proposed solution
Introduce
bdk_corecrate that moves structures and types frombdk_chainthat will mostly stay constant.BlockId,ConfirmationBlockTime.CheckPoint, introducetx_graph::Update(instead of usingTxGraphto updateTxGraph).FullScanRequest,FullScanResult,SyncRequest,SyncResult.Chain sources will only depend on
bdk_core. Note that we need to introducetx_graph::Updatethough.Potential downsides
bdk_corewill still need to depend onbitcoin. Any major version updates tobitcoinwill be a breaking change and we will need to introduce a new major version forbdk_core. To make these suggested changes useful, we need to lock down on specific major releases ofbitcoin.Acknowledgement
Thank you to @LLFourn for bringing up this idea.