Closed nourou4them closed 2 years ago
You need a C compiler installed because bdk uses the secp256k1 cryptographic library, which is written in C. On Ubuntu you can probably install just gcc
using apt, or even better you can install build-essentials
which contains a few packages useful for building C code. See: https://linuxhint.com/install-build-essential-ubuntu/
For the missing feature issue you should keep in mind that fulcrum (like electrumx and electrs) implements the electrum protocol. So bdk only has one feature called "electrum" which can be used with all these different server implementations.
I'm also moving this issue to the bdk-cli
repo since it's related to installing that tool, not just the main rust library.
Thank you.
Installing gcc
made it work.
Now I am stuck at the sync
step.
I have followed this 4 videos series and replicated all the steps, on testnet, even receiving and sending a transaction.
Now, I wanted to add my flucrum server by launching this command :
bdk-cli wallet --descriptor "wpkh(descriptor_numbers)" --server ssl://domain_name:50002 sync
I can see that it tried to connect to the server but there is then the following error messages:
Fulcrum side
Jun 20 18:12:22 node-1 Fulcrum[78486]: [2022-06-20 18:12:22.452] <SslSrv 0.0.0.0:50002> remote_machine_ip_address:port SSL handshake timed out after 10.0 secs, deleting socket
bdk-cli side
ERROR bdk_cli] Electrum(AllAttemptsErrored([IOError(Custom { kind: InvalidData, error: WebPKIError(CAUsedAsEndEntity) }), IOError(Custom { kind: InvalidData, error: WebPKIError(CAUsedAsEndEntity) }), IOError(Custom { kind: InvalidData, error: WebPKIError(CAUsedAsEndEntity) }), IOError(Custom { kind: InvalidData, error: WebPKIError(CAUsedAsEndEntity) }), IOError(Custom { kind: InvalidData, error: WebPKIError(CAUsedAsEndEntity) })]))
Notice that the domain has a valid certificate and I didn't add the derivation path, otherwise, I would have this error : bdk_cli] Descriptor(Miniscript(Unexpected("Error while parsing simple public key")))
Thanks for your help.
Notice that the domain has a valid certificate
It's a self signed certificate though, right? Those are a bit harder to get working, I would suggest you start by just using a plain tcp connection and then move to ssl once you are more familiar with it.
I would have this error : bdk_cli] Descriptor(Miniscript(Unexpected("Error while parsing simple public key")))
This is a completely unrelated error but it's hard to debug without seeing the full descriptor. I'm guessing maybe you tried adding a derivation path to a raw public key, which doesn't make sense. Derivation paths are applied to extended keys to derive raw single keys, if you already have a raw key (starts with 02
, 03
or 04
in hex) then you don't need a path at all
It's a self signed certificate though, right? Those are a bit harder to get working, I would suggest you start by just using a plain tcp connection and then move to ssl once you are more familiar with it.
Ok I will try that.
This is a completely unrelated error but it's hard to debug without seeing the full descriptor. I'm guessing maybe you tried adding a derivation path to a raw public key, which doesn't make sense. Derivation paths are applied to extended keys to derive raw single keys, if you already have a raw key (starts with 02, 03 or 04 in hex) then you don't need a path at all
Yes you are right. I made the mistake of using the pub key derivation path found on an address.
Your explanation led me to remove the derivation path and I just parsed the xpub like "wpkh(xpub)"
.
And it works this time, using just a main()
function inside a new cargo projetct.
It seems like the bdk-cli only use the testnet for now while I needed the mainnet.
Thanks a lot.
So, I tried using the plain tcp connection to sync with the server but I have an error. Just created issue #639 on the bdk repo.
Update: Using the bdk, I managed to sync by accessing to my server via a tcp connection, like you advised. Thanks. I am closing this issue.
Describe the bug
I tried to install the binaries on my machine by running the following command:
Then, I encountered the following error message:
To Reproduce
or
Expected behavior
I expected a clean installation and compiling, and then being able to run bdk-cli.
Build environment
Additional context
I tried first to run this installation command, with Fulcrum as a feature an then received an error message:
After some researchs, I have found that fulcrum was not part of the features: