Skip to content
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

App does not accept Bitcoin-Core connection #737

Closed
SebiCreator opened this issue Nov 5, 2022 · 10 comments
Closed

App does not accept Bitcoin-Core connection #737

SebiCreator opened this issue Nov 5, 2022 · 10 comments

Comments

@SebiCreator
Copy link

In my settings i configured the Server as a bitcoin-core server on a remote machine. If i test the connection in settings it all works as it should.
Bildschirm­foto 2022-11-05 um 17 47 24

But outside of the settings the app always shows "Connection failed: Server Error (Check if Bitcoin Core is running and the authentication details are correct".
Bildschirm­foto 2022-11-05 um 17 47 47

The logging from Bitcoin-Core shows the following
2022-11-05T16:50:50Z [sparrow] External scriptPubKey Manager for output type 0 does not exist
2022-11-05T16:50:50Z [sparrow] External scriptPubKey Manager for output type 1 does not exist
2022-11-05T16:50:50Z [sparrow] External scriptPubKey Manager for output type 2 does not exist
2022-11-05T16:50:50Z [sparrow] Internal scriptPubKey Manager for output type 0 does not exist
2022-11-05T16:50:50Z [sparrow] Internal scriptPubKey Manager for output type 1 does not exist
2022-11-05T16:50:50Z [sparrow] Internal scriptPubKey Manager for output type 2 does not exist
...
Bildschirm­foto 2022-11-05 um 17 51 01

I dont know how to interpret this information.
To me it looks like a bug?

Does somebody know what's the problem and how to solve it?

@gStart9
Copy link

gStart9 commented Nov 5, 2022

sparrow-electrs-on_bitcoind_rpc-why
I am experiencing this too. Here, I put in my .onion of my bitcoin RPC, and yet it (suppsedly) connects to an electrs somewhere -- but where? I'm not running electrs!

@craigraw
Copy link
Collaborator

craigraw commented Nov 6, 2022

@SebiCreator this appears to be an issue related to Bitcoin Core, not Sparrow. Do you have any unusual configuration of Bitcoin Core? See this link too: https://bitcoin.stackexchange.com/questions/96415/wallet-files-are-empty

@gStart9 You are not starting Electrs. Sparrow contains a library called BWT which creates an Electrum server backed by a Bitcoin Core wallet. Sparrow then communicates with the network via that Electrum server. Electrs is another implementation of an Electrum server. Note that communicating with Bitcoin Core using BWT over Tor is not recommended with Tor being as slow as it is currently - the architecture does not lend itself to this, and there are privacy issues besides (anyone with your onion address can see your balance and control your node).

@SebiCreator
Copy link
Author

@craigraw thanks for your answer.
This is my bitcoin.conf file.
Bildschirm­foto 2022-11-06 um 08 56 47

I start the daemon with sudo bitcoind -conf=/mnt/ssd/mainnet/bitcoin.conf

Any problems with this?

@craigraw
Copy link
Collaborator

craigraw commented Nov 6, 2022

It looks ok to me. Try shutting down Bitcoin Core and Sparrow, and deleting the 'sparrow' wallet in the Bitcoin Core wallets folder. Sparrow will recreate it. It may also help to upgrade Bitcoin Core, but that's less likely. If you do, upgrade Sparrow first if you haven't already.

@gStart9
Copy link

gStart9 commented Nov 6, 2022

@gStart9 You are not starting Electrs. Sparrow contains a library called BWT which creates an Electrum server backed by a Bitcoin Core wallet. Sparrow then communicates with the network via that Electrum server. Electrs is another implementation of an Electrum server. Note that communicating with Bitcoin Core using BWT over Tor is not recommended with Tor being as slow as it is currently - the architecture does not lend itself to this, and there are privacy issues besides (anyone with your onion address can see your balance and control your node).

So these Electrum Server ready things are coming from the bwt library running within Sparrow? How can I tell if I'm getting through to the .onion bitcoin rpc? The test never seems to fully indicate.

So in other words, it sounds like sparrow doesn't speak to the bitcoin rpc directly, but speaks electrum server protocol to bwt which translates the calls to the bitcoin rpc? Understood about tor sucking right now, but in theory, .onion can work, correct?

@craigraw
Copy link
Collaborator

craigraw commented Nov 7, 2022

So in other words, it sounds like sparrow doesn't speak to the bitcoin rpc directly, but speaks electrum server protocol to bwt which translates the calls to the bitcoin rpc? Understood about tor sucking right now, but in theory, .onion can work, correct?

Correct - I suspect some of the required calls are not completing over Tor. Unfortunately with the current Tor issues this approach is going to be a poor user experience. Connecting to an Electrum server over Tor requires far fewer calls and is still a reasonable approach, even with the current DDos attack.

@turkycat
Copy link

turkycat commented Nov 7, 2022

+1 this issue while trying to set up Sparrow for the first time today. I'm having the exact same experience as OP, but I'm not using TOR. I'm also not running Electrs. I'm on the latest release of Sparrow with Bitcoin Core v22.0.0

@SebiCreator
Copy link
Author

SebiCreator commented Nov 7, 2022

It looks ok to me. Try shutting down Bitcoin Core and Sparrow, and deleting the 'sparrow' wallet in the Bitcoin Core wallets folder. Sparrow will recreate it. It may also help to upgrade Bitcoin Core, but that's less likely. If you do, upgrade Sparrow first if you haven't already.

Ok i removed my wallets in sparrow and noticed that if i dont have an Taproot Wallet i can connect to my bitcoin-core server

@craigraw
Copy link
Collaborator

craigraw commented Nov 8, 2022

Yes, Taproot wallets are not supported when connecting to Bitcoin Core. See bwt-dev/bwt#91 to view the upstream issue on this. It's frustrating that some projects become blocking dependencies on certain functionality, but that's unfortunately the case here.

I was hoping this problem could be resolved more quickly, but since it doesn't look like rust-bitcoincore-rpc is getting any regular updates, I've added an error message to warn of the incompatibility in a25b53b (and a comment on the relevant issue!)

Closing this off as I believe the original issue has been identified.

@craigraw craigraw closed this as completed Nov 8, 2022
@turkycat
Copy link

turkycat commented Nov 8, 2022

I can confirm the root cause. I was also trying to import a taproot wallet using an xpub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants