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

Need electrum_tls set to False #161

Open
jblachly opened this issue Apr 16, 2022 · 4 comments
Open

Need electrum_tls set to False #161

jblachly opened this issue Apr 16, 2022 · 4 comments

Comments

@jblachly
Copy link

I am posting here as issue seems to affect all platforms tested (iOS; Mac OS), and configuration option causing problem on all platforms AFAICT is in this repository at:

{ "electrum_tls", true },

Description of Problem

I can't connect to a personal electrum server, which causes all sorts of unexpected failure behaviours across all platforms when creating or restoring wallets

Cause of problem

I believe this is because Green/GDK always forces Electrum TLS to be true, and I am running non-TLS only on port 50001.

Logs

GDK

Note electrum_url is electrs.local:50001, and electrum_tls is Bool(true).

[2022-04-16 13:07:46.813813] [gdk:debug] 46.813 INFO - create_session Object({"address_explorer_url": String("https://blockstream.info/address/"), "bech32_prefix": String("bc"), "bip21_prefix": String("bitcoin"), "cert_expiry_threshold": Number(1), "csv_buckets": Array([]), "development": Bool(false), "electrum_onion_url": String("omitted.onion:110"), "electrum_tls": Bool(true), "electrum_url": String("electrs.local:50001"), "liquid": Bool(false), "mainnet": Bool(true), "max_reorg_blocks": Number(144), "name": String("Bitcoin (Electrum)"), "network": String("electrum-mainnet"), "p2pkh_version": Number(0), "p2sh_version": Number(5), "pin_server_onion_url": ...

Electrs

[2022-04-16T17:17:08.200Z WARN  electrs::server] InvalidData on first line may indicate client attempted to connect using SSL when server expects unencrypted communication.
[2022-04-16T17:17:08.200Z WARN  electrs::thread] recv_loop thread failed: 0: recv failed
[2022-04-16T17:17:08.200Z WARN  electrs::thread] because: stream did not contain valid UTF-8

Setup details

Green Wallet, latest version from official channels on iOS and Mac OS

Electrs, git commit 1b4cc1ec0fd51caeea92da9d959a00805a4810a4 (latest)

Green and Electrs running on private network, not publicly exposed (hence no TLS)

Bitcoin mainnet

@jgriffiths
Copy link
Contributor

Hi @jblachly ,

This looks like a wallet issue rather than gdk. You can override electrum_tls along with electrum_url in the network parameters, but for green-android, in crypto/src/main/java/com/blockstream/gdk/GreenWallet.kt:registerCustomNetwork() only electrum_url is being passed in.

cc @domegabri

@jgriffiths
Copy link
Contributor

Confirming Qt and iOS are also affected.

@jblachly
Copy link
Author

Hi @jblachly ,

This looks like a wallet issue rather than gdk. You can override electrum_tls along with electrum_url in the network parameters, but for green-android, in crypto/src/main/java/com/blockstream/gdk/GreenWallet.kt:registerCustomNetwork() only electrum_url is being passed in.

cc @domegabri

It is ultimately a wallet issue, but I thought beginning in GDK (where the parameter lies) would be the most reasonable way to open discussion with the development team, rather than creating separate identical issues for each of the wallet platforms.

@jgriffiths
Copy link
Contributor

@jblachly Yes thanks for reporting here, @domegabri will coordinate with the wallet devs to get each updated. Thanks!

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

2 participants