-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wallet: bdk-beta.6 migration #330
base: macros/wallet-bdk
Are you sure you want to change the base?
wallet: bdk-beta.6 migration #330
Conversation
bdk_chain = { version = "0.17" } | ||
bdk_esplora = { version = "0.16", features = ["blocking"] } | ||
bdk_file_store = { version = "0.14" } | ||
bdk_wallet = { version = "1.0.0-beta.6", features = ["keys-bip39"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you choose this version? and not working with the alpha.11?
looks like that this version https://github.com/bitcoindevkit/bdk/blob/v1.0.0-beta.6/crates/bitcoind_rpc/Cargo.toml#L19 is not compatible with lampo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my first attempt to go with alpha.11
failed, due to cargo update
error
$ cargo update
error: no matching package named `bdk_persist` found
location searched: registry `crates-io`
required by package `bdk v1.0.0-alpha.11`
... which satisfies dependency `bdk = "^1.0.0-alpha.11"` of package `lampo-core-wallet v0.1.0 (/home/mialso/projects/clones/lampo.rs/lampo-core-wallet)`
... which satisfies path dependency `lampo-core-wallet` of package `lampod-cli v0.1.0 (/home/mialso/projects/clones/lampo.rs/lampod-cli)`
thus I decided to go with latest beta.6
) | ||
.network(network) | ||
// .create_wallet(&mut db)?; | ||
.create_wallet_no_persist()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you removing the persistence of the wallet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a simplification step, to pass compiler and move forward (I put persistence is a TODO)
since bdk_wallet has PersistedWallet
special type opposed to just Wallet
, need to reflect those typings and do proper sync implementation
@@ -177,11 +199,11 @@ impl WalletManager for BDKWalletManager { | |||
let txs = wallet | |||
.list_unspent() | |||
.map(|tx| Utxo { | |||
txid: tx.outpoint.txid.to_hex(), | |||
txid: format!("{:x}", tx.outpoint.txid), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
txid: format!("{:x}", tx.outpoint.txid), | |
txid: format!("{:x}", tx.outpoint.txid), |
You are returning a debug string here, and it is wrong because the txid is used by others to lookup the transaction status, but in this way you are breaking every user
graph: update_graph, | ||
chain: Some(chain_update), | ||
}; | ||
let client = bdk_esplora::esplora_client::Builder::new(esplora_url).build_blocking(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point of using bdk alpha and beta was to use the bitcoin core backend
In the issue #317 there is the following assertion
Keep in mind that Lampo currently uses Bitcoin Core (or similar tools) to fetch information from the network.
As discussed in person, I think this PR is blocked by the I will try to work and finish the 292 this week! |
Description:
bdk
, recentbeta.6
versionbdk_wallet
TODO: