Giter VIP home page Giter VIP logo

bitcoin-tutorials's People

Contributors

candlehater avatar commanderpoe avatar cryptomulde avatar derrickr avatar emzy avatar frennkie avatar jnsats avatar kccheung avatar keblek avatar nyxnor avatar openoms avatar requestprivacy avatar romanz avatar theotherside avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitcoin-tutorials's Issues

Is yield generator running? Can't detach from tmux

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 :)

Security issues

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.

electrs on RaspiBlitz - running on the RaspberryPi 3

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


  • does the script need additional "ufw allow" commands?
  • is it really optimized for the RaspiBlitz (just wondering because of the "--cookie=raspibolt:.." statement above
    Thanks for your help!

Wallet creation failing using JoininBox

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?

For Electrum Server in Rust (electrs) setup

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

Joinmarket does not connect to bitcoind on Raspiblitz

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?

Can't connect Blitz to Zap or Zeus via QR.

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?

bonus.SSL_for_RTL.sh made nginx fail to run

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?

LND Connect Error while make install ( Makefile:4: recipe for target 'dep' failed)

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?

Knipsel Bitcoin Node Onion

Electrs - Error: An unknown argument '--jsonrpc-import' was specified.

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.

Error installing electrs: failed to run custom build command for `librocksdb-sys v6.1.2`

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

Problems starting Nginx

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.

had trouble with raspiblitz setup for electrs

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

JoinMarket - Upgrading

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?

Tor ports:50001(tcp), 50002(ssl) If you would like to support this public Electrum server, please click 'Help > Donate to Server' in your Electrum Client. Thank you! The server code is free software; you may download it and operate your own node. See https://github.com/spesmilo/electrumx/blob/master/docs/HOWTO.rst and https://electrum.org/#community Always use the latest version of Electrum at https://electrum.org/#download See https://git.io/vynnp for more help with stuck transactions. >>> You are connected to an ElectrumX 1.16.0 server.

Ciould someone please point me in right direction

Slight suggestions

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.

Electrs Tor Port 50001 vs 50002

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.