openoms / bitcoin-tutorials Goto Github PK
View Code? Open in Web Editor NEWDocumenting Bitcoin related setups using LND, JoinMarket, RaspiBlitz, Debian and Ubuntu
Home Page: https://openoms.github.io/bitcoin-tutorials
Documenting Bitcoin related setups using LND, JoinMarket, RaspiBlitz, Debian and Ubuntu
Home Page: https://openoms.github.io/bitcoin-tutorials
Pi is on and Synced. Haven't managed to get any wallet apps to reference it as far as I know aside from the Browser GUIs for RTL and Specter. Can't manage to get standalone Specter Desktop to connect, nor Electrum. Wasabi always says "Backend is Connected" regardless of what IP I add in the Config so I assume that is not looking at the Blitz either.
When I scan the "Android Zeus" or "Android Zap" QRs with respective wallets, nothing happens. Like there's no QR in front of the scanner. Managed to shrink QR on pc screen but still no response.
Trying it all again with TOR active now so I'll see if that helps anything.
Could it be that the Pi has ethernet cable but Windows PC is on network via wifi?
[GOM2 address]
0x9bf1ab8e8fa01fa72c8abc2b30746d4a0f4b0854
Trying to create a test wallet to experiemnt with joinmarket and when i create a wallet the following error comes up
Running the command:Running the command:
python wallet-tool.py history
User data location: /home/joinmarket/.joinmarket/
Traceback (most recent call last):
File "/home/joinmarket/joinmarket-clientserver/scripts/wallet-tool.py", line 6, in
jmprint(wallet_tool_main("wallets"), "success")
File "/home/joinmarket/joinmarket-clientserver/jmclient/jmclient/wallet_utils.py", line 1223, in wallet_tool_main
wallet_password_stdin=options.wallet_password_stdin, gap_limit=options.gaplimit)
File "/home/joinmarket/joinmarket-clientserver/jmclient/jmclient/wallet_utils.py", line 1114, in open_test_wallet_maybe
return open_wallet(path, mixdepth=max_mixdepth, **kwargs)
File "/home/joinmarket/joinmarket-clientserver/jmclient/jmclient/wallet_utils.py", line 1134, in open_wallet
raise Exception("Failed to open wallet at '{}': not a file".format(path))
Exception: Failed to open wallet at '/home/joinmarket/.joinmarket/wallets/': not a file
how to fix?
I used your script to enable SSL for RTL, but it made nginx fail to run.
admin@GRNQRTR:~ $ sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2019-11-01 12:50:58 GMT; 3min 10s ago
Docs: man:nginx(8)
Process: 16169 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Nov 01 12:50:58 GRNQRTR systemd[1]: Starting A high performance web server and a reverse proxy server...
Nov 01 12:50:58 GRNQRTR nginx[16169]: nginx: [emerg] the shared memory zone "SSL" is already declared for a different use in /etc/nginx/nginx.conf:111
Nov 01 12:50:58 GRNQRTR nginx[16169]: nginx: configuration file /etc/nginx/nginx.conf test failed
Nov 01 12:50:58 GRNQRTR systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Nov 01 12:50:58 GRNQRTR systemd[1]: nginx.service: Failed with result 'exit-code'.
Nov 01 12:50:58 GRNQRTR systemd[1]: Failed to start A high performance web server and a reverse proxy server.
I checked /etc/nginx/nginx.conf
but couldn't figure out what needed to be changed to get it working so I ended up commenting out the whole "SSL for RTL" section and now nginx is running fine. Here's my /etc/nginx/nginx.conf
:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
stream {
upstream electrs {
server 127.0.0.1:50001;
}
server {
listen 50002 ssl;
proxy_pass electrs;
ssl_certificate /etc/ssl/certs/localhost.crt;
ssl_certificate_key /etc/ssl/private/localhost.key;
ssl_session_cache shared:SSL-electrs:1m;
ssl_session_timeout 4h;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
}
upstream RTL {
server 127.0.0.1:3000;
}
# server {
# listen 3002 ssl;
# proxy_pass RTL;
# ssl_certificate /etc/letsencrypt/live/dynamicDNS.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/dynamicDNS.com/privkey.pem;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 4h;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ssl_prefer_server_ciphers on;
# }
}
BTW, I've used your other scripts to install BTCPay Server and Electrs. Is there conflict with that?
It would be useful to add instructions on copy / pasting the host / macaroon data via text to the Zap / Zeus tutorials with pictures.
The FOSS tool scrcpy might be useful for some people to copy / paste long strings of text to the phone for setup.
How would I go about upgrading JoinMarket to 0.6.1? I currently have JoinMarket 0.5.5 running on my RaspiBlitz. Is it safe to follow the 'Installation' instructions for performing an upgrade to JoinMarket?
I'm sorry if I'm not documenting/creating this issue correctly, but I was having trouble connecting to my Electrs server over Tor but was able to eventually figure out a solution and think there might be an error in the documentation.
It seems like your script sets up the Tor Hidden Service with port 50002:
# Hidden Service for Electrum Server
HiddenServiceDir /mnt/hdd/tor/electrs
HiddenServiceVersion 3
HiddenServicePort 50002 127.0.0.1:50002
But these directions (https://github.com/openoms/bitcoin-tutorials/tree/master/electrs) tell you to connect over 50001:
electrum --oneserver --server Tor_address.onion:50001:t --proxy socks5:127.0.0.1:9150
I ended up changing how the script setup the Tor Hidden Service from 50002 to 50001 and now things are working fine.
I was following @k3tan172 's tutorial for Joinmarket in relation to the Fastest way to coinjoin and he points to #24, where he details how to add the icon. The PR was merged but then undone by #26.
Trying to run:
/home/admin/electrs/target/release/electrs --index-batch-size=10 --jsonrpc-import --db-dir /mnt/hdd/electrs/db --electrum-rpc-addr="0.0.0.0:50001" --cookie="raspibolt:PASSWORD_B" -vvvv
and I'm receiving this error:
Error: An unknown argument '--jsonrpc-import' was specified.
Same issue with the --cookie
argument as well.
Hey, in README.md
https://joinmarket.me/ob/
is a dead link. You can replace it with https://nixbitcoin.org/obwatcher/
Hey guys,
I am trying to run electrs on my Raspiblitz.
The local setup is working fine, but when it comes to connecting via SSL it is making problems.
The script that is running into issues is the following: https://raw.githubusercontent.com/openoms/bitcoin-tutorials/master/electrs/3_Nginx_and_Certbot_for_SSL.sh
The Nginx does not start. Also when I try to start it manually it always fails one me.
The log of the script is uploaded here: https://pastebin.com/xCNNz9y8
If I can provide any additonal info please tell me what to do.
I think it has to do with the certificates for the DDNS not being created correctly.
Raspiblitz 1.3
JoinMarket 0.6.1
When I try to python wallet-tool.py generate
the second time (following your description) I get the following error message:
Traceback (most recent call last):
File "wallet-tool.py", line 10, in <module>
load_program_config()
File "/home/admin/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/jmclient/configure.py", line 478, in load_program_config
global_singleton.config)
File "/home/admin/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/jmclient/configure.py", line 532, in get_blockchain_interface_instance
bc_interface = BitcoinCoreInterface(rpc, network)
File "/home/admin/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/jmclient/blockchaininterface.py", line 166, in __init__
blockchainInfo = self.jsonRpc.call("getblockchaininfo", [])
File "/home/admin/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/jmclient/jsonrpc.py", line 148, in call
response = self.queryHTTP(request)
File "/home/admin/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/jmclient/jsonrpc.py", line 106, in queryHTTP
raise exc
File "/home/admin/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/jmclient/jsonrpc.py", line 94, in queryHTTP
"authentication for JSON-RPC failed")
jmclient.jsonrpc.JsonRpcConnectionError: authentication for JSON-RPC failed
I have set rpcuser = raspibolt
and the rpcpassword
in /home/admin/joinmarket-clientserver/scripts/joinmarket.cfg
.
Any ideas?
Hello @openoms, just tried to install electrs on my RaspiBlitz V1.1 using your "electrs_install_on_RaspiBlitz.sh" script but I get stuck due to Connection refused errors:
Running target/release/electrs -vvvv --index-batch-size=10 --jsonrpc-import --db-dir /mnt/hdd/electrs/db '--cookie=raspibolt: <myPsssowordhere>' '--electrum-rpc-addr=0.0.0.0:50001'
Config { log: StdErrLog { verbosity: Trace, quiet: false, timestamp: Off, modules: [], writer: "stderr", color_choice: Auto }, network_type: bitcoin, db_path: "/mnt/hdd/electrs/db/mainnet", daemon_dir: "/home/admin/.bitcoin", daemon_rpc_addr: V6([::1]:8332), cookie: Some("raspibolt:\u{1b}[C\u{1b}[C\u{1b}[C\u{1b}[D"), electrum_rpc_addr: V4(0.0.0.0:50001), monitoring_addr: V6([::1]:4224), jsonrpc_import: true, index_batch_size: 10, bulk_index_threads: 4, tx_cache_size: 10000, txid_limit: 100, server_banner: "Welcome to electrs (Electrum Rust Server)!" }
DEBUG - Server listening on [::1]:4224
DEBUG - Running accept thread
WARN - failed to connect daemon at [::1]:8332: Connection refused (os error 111)
WARN - failed to connect daemon at [::1]:8332: Connection refused (os error 111)
.... keeps printing the Connection refused messages
Got the following error running your electrs script.
Compiling librocksdb-sys v6.1.2
error: failed to run custom build command for librocksdb-sys v6.1.2
Caused by:
process didn't exit successfully: /home/admin/electrs/target/release/build/librocksdb-sys-35c657b2df015019/build-script-build
(exit code: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rerun-if-changed=rocksdb/
cargo:rerun-if-changed=snappy/
cargo:rerun-if-changed=lz4/
cargo:rerun-if-changed=zstd/
cargo:rerun-if-changed=zlib/
cargo:rerun-if-changed=bzip2/
cargo:warning=couldn't execute llvm-config --prefix
(error: No such file or directory (os error 2))
cargo:warning=set the LLVM_CONFIG_PATH environment variable to a valid llvm-config
executable
--- stderr
thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-.so', 'libclang.so.'], set the LIBCLANG_PATH
environment variable to a path where one of these files can be found (invalid: [])"', src/libcore/result.rs:999:5
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace.
Any ideas?
Thanks
Running JM on raspiblitz v1.5rc1
Created JM wallet and deposited 0.01 on mixdepth 0 address which has >5 confirmations
# To run a yield generator with tmux
$ tmux
# Output
bash: startup.sh: No such file or directory
$ python yg-privacyenhanced.py wallet.jmdat
# Output
File "/home/joinmarket/joinmarket-clientserver/jmclient/jmclient/yieldgenerator.py", line 29, in __init__
Maker.__init__(self, wallet_service)
File "/home/joinmarket/joinmarket-clientserver/jmclient/jmclient/maker.py", line 32, in __init__
self.sync_wait_loop.start(2.0)
File "/home/joinmarket/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/twisted/internet/task.py", line 194, in start
self()
File "/home/joinmarket/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/twisted/internet/task.py", line 239, in __call__
d = defer.maybeDeferred(self.f, *self.a, **self.kw)
--- <exception caught here> ---
File "/home/joinmarket/joinmarket-clientserver/jmvenv/lib/python3.7/site-packages/twisted/internet/defer.py", line 151, in maybeDeferred
result = f(*args, **kw)
File "/home/joinmarket/joinmarket-clientserver/jmclient/jmclient/maker.py", line 48, in try_to_create_my_orders
sys.exit(EXIT_FAILURE)
builtins.SystemExit: 1
2020-04-11 21:38:33,953 [INFO] starting yield generator
2020-04-11 21:38:34,146 [INFO] Listening on port 27183
2020-04-11 21:38:34,147 [INFO] Starting transaction monitor in walletservice
2020-04-11 21:38:40,150 [INFO] joined: #joinmarket-pit tor.darkscience.net
2020-04-11 21:38:40,152 [INFO] Could not connect to *ALL* servers yet, waiting up to 60 more seconds.
2020-04-11 21:38:40,607 [INFO] joined: #joinmarket-pit guybrush.hackint.org
2020-04-11 21:38:40,608 [INFO] All IRC servers connected, starting execution.
Is yield generator running?
Detaching from tmux with ctrl+b,d does not work for some reason.
Closing terminal and resuming session in new terminal works with
$ tmux a
After some time:
#output
2020-04-11 21:48:38,614 [INFO] Failed to start after 10 minutes, giving up.
2020-04-11 21:48:38,616 [INFO] Lost IRC connection to: guybrush.hackint.org . Should reconnect automatically soon.
2020-04-11 21:48:38,618 [INFO] Lost IRC connection to: tor.darkscience.net . Should reconnect automatically soon.
done
Checking addresses in wallet shows 0.01 hasn't moved, still sitting in mixdepth 0.
Any idea what I'm missing?
Edit: Not sure, if this is the right place to ask this. If it's not, a hint in the right direction is appreciated :)
I've commented some security issues I've found. I don't consider them very serious but better have them patched. I opened this issue to track it.
Ciould someone please point me in right direction
For Electrum wallet the server can be specified with “t” = tcp@50001 and “s” = tcp/tls@50002
t = unencrypted TCP port
Under further-help
test the connection through the unencrypted local TCP port:
"C:\Program Files (x86)\Electrum\electrum-3.3.8.exe" --oneserver --server 192.168.X.X:50002:s
needs to change to:
"C:\Program Files (x86)\Electrum\electrum-3.3.8.exe" --oneserver --server 192.168.X.X:50001:t
Following the tutorial to get Raspiblitz connected to ZeusLN i get the following error.
First there was no Go installed so i did that using:
https://gist.github.com/simoncos/49463a8b781d63b5fb8a3b666e566bb5
And now after the command: make install
i get the error:
/usr/local/go/src/runtime/internal/sys/arch_wasm.go:8:24: too many errors
Makefile:4: recipe for target 'dep' failed
make: *** [dep] Error 2
What could be the reason?
I followed all the steps and inside putty after I type qtgui
I get this:
xming is running in the background but the GUI window never comes up.
hey guys
i used your guide to try and setup electrs with my raspiblitz node.
i managed to run the 304 lines of script
and before i could run the install rust etc command my node has stopped connecting .
no peers, lightning wallet keeps asking for password over and over and electrum not running.
the raspiblitz screen says check sudo journalctl -u electrs
i kept getting bash command not found. i had to change the $ for sudo in the $ wget script and then it loaded the script but still no connection to peers or electrs
i got into the raspiblitz menu and loged into the lnd wallet through command prompt so i can see the raspiblitz screen.
if i got to electrs in the menu it says electrs not running and gives me some debug info. which im unsure hot to copy to show anyone! lol
can i undo everything i did and start again?
sounds like a shambles. but any help would be appreciated
cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.