Bitcoin Core Size Of Database Cache | CryptoCoins Info Club

Mentor Monday, June 03, 2019: Ask all your bitcoin questions!

Ask (and answer!) away! Here are the general rules:
And don't forget to check out /BitcoinBeginners
You can sort by new to see the latest questions that may not be answered yet.
submitted by rBitcoinMod to Bitcoin [link] [comments]

Issues with bitcoin-qt

I know this is frequently posted, but I'm incensed at how absurdly slow reindexing becomes. There's got to be something wrong with the sync mechanism.
I was 100% synced a week ago on my MacBook Pro. Latest version of the client (v0.17.0.1). I rsync'd the whole bitcoin dir (blocks, chainstate, index, etc) to another disk, ran a node on another machine using that copy for a couple of hours, then I stopped the node and rsync'd back to the Mac.
Bitcoin-qt did not like the updated blockchain. The other machine didn't like its blockchain either. Oh well, I thought, maybe it didn't shutdown properly and borked the last block. I'll let it reindex, in a few minutes it'll be grand.
But no. Bitcoin-qt decided that it was time to start over from scratch, ignoring the flawless 99.999% of data on disk. Yay.
That was 10 days ago. At one point several days ago it was about 3 hours from finishing, with a progress of around 19% per hour. A day later progress was at 0.25%. This can't be right, I thought, maybe there's a bug, a memory leak or something. I'll shut it down and restart it. Of course it's going to restart from where it left, right? Right?
No. It started from 0% again.
Several days later, it's at 0.14% and predicting it'll finish sometime next week. CPU is 96% idle, RAM is at 25%, bandwidth is 120 Mb/s and the disk is used by bitcoin-qt and nothing else. It's the only thing running on this Mac and has been for the past two weeks. NOTHING is different between 19% and 0.14% in terms of bandwidth, CPU, RAM, or disk I/O. This very machine, under the exact same conditions, was able to process 19% of the blockchain in one hour.
In the meantime, I can't move my BTC because my wallet, which has all the blocks including the ones containing the transactions with my BTC in them, doesn't believe the blocks are there.
Bitcoin-qt is broken in more ways than one. First, something is causing this absurd variation in performance. Second, it's not saving state, which is particularly painful when it takes ages to get to the end to the blockchain. Is state only kept in RAM? I've seen other threads suggesting a change in the config (dbcache seems to be the main one), but I can't just change the setting without restarting, and restarting is not an option because I'll lose everything again.
Sorry, this is extremely frustrating. I'm thinking of extracting the private key and abandoning the idea of running my own wallet. It's unusable.
submitted by jungle to Bitcoin [link] [comments]

Lightning node on Windows - testing, get not connected

Ok after testing BTCPay, C-Lightning, LND on Ubuntu I said ok let's try also the Windows implementation, is just few clicks and done (as it is promoted).
So I followed this github guide that actually send you to this one.
OK, started Bitcoin-core client on Windows 7 x64, with an already synced data folder. Empty bitcoin.conf (none of guides says how to configure the conf file). Wait until the client is full synced. And then launched the windows-node-launcher (from a subfolder inside Bitcoin folder). All good, started slowly and a small popup appeared in systray saying Bitcoin node is syncing. Reviewed the config of Bitcoin and LND through that little app in systray and saw that bitcoin.conf was already filled with some settings. Didn't change anything. After 1 day (with the bitcoin blockchain already synced), the systray popup still says that is syncing and have a red dot. In the tutorial says that we have to leave it to sync until is blue and then green.
I said, ok maybe it has more things to do. So I open that LND Output link, to see what is going on... And I see that LND is not well. Says: 2019-04-06 21:11:29.772 [INF] LTND: Version: 0.6.0-beta commit=v0.6-beta-rc3, build=production, logging=default 2019-04-06 21:11:29.772 [INF] LTND: Active chain: Bitcoin (network=mainnet) 2019-04-06 21:11:29.774 [INF] CHDB: Checking for schema update: latest_version=8, db_version=8 2019-04-06 21:11:29.808 [INF] RPCS: password RPC server listening on 127.0.0.1:10009 2019-04-06 21:11:29.808 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080 2019-04-06 21:11:29.808 [INF] LTND: Waiting for wallet encryption password. Use lncli create to create a wallet, lncli unlock to unlock an existing wallet, or lncli changepassword to change the password of an existing wallet and unlock it. 2019-04-06 21:11:32.673 [INF] LNWL: Opened wallet 2019-04-06 21:11:33.183 [INF] LTND: Primary chain is set to: bitcoin unable to create chain control: unable to connect to bitcoind: unable to subscribe for zmq block events: dial tcp 127.0.0.1:18502: connectex: No connection could be made because the target machine actively refused it. 2019-04-06 21:11:36.087 [INF] LTND: Shutdown complete unable to connect to bitcoind: unable to subscribe for zmq block events: dial tcp 127.0.0.1:18502: connectex: No connection could be made because the target machine actively refused it. 2019-04-06 21:11:39.229 [INF] LTND: Version: 0.6.0-beta commit=v0.6-beta-rc3, build=production, logging=default
Now the bitcoin.conf have this: printtoconsole=1 rpcallowip=::/0 whitelist=0.0.0.0/0 datadir=C:\Users\Admin\AppData\Roaming\Bitcoin prune=0 txindex=1 server=1 disablewallet=0 timeout=6000 rpcuser=user rpcpassword=defaultxzxxxxx zmqpubrawblock=tcp://127.0.0.1:18502 zmqpubrawtx=tcp://127.0.0.1:18503 dbcache=2408
And LND.conf have this: (#) Auto-Generated Configuration File (#) Node Launcher version 6.0.2 debuglevel=info restlisten=127.0.0.1:8080 rpclisten=127.0.0.1:10009 tlsextraip=127.0.0.1 listen=127.0.0.1:9735 alias=aliasme color=#00aa7f bitcoin.active=1 bitcoin.node=bitcoind bitcoind.rpchost=127.0.0.1:8332 bitcoind.rpcuser=user bitcoind.rpcpass=defaultxxxxx bitcoind.zmqpubrawblock=tcp://127.0.0.1:18502 bitcoind.zmqpubrawtx=tcp://127.0.0.1:18503
So what is going on here? I will have to wait indefinitely? Somebody can give some help or explanation? Is this LND node working on Windows Server 2008 or 2012?
submitted by Mr--Robot to Bitcoin [link] [comments]

Soo after almost 3 months of setting up I have my own LN full node running on RP3

Soo after almost 3 months of setting up I have my own LN full node running on RP3
I have been eager to try LN mainnet since the very beginning of it. I've found out about lnd, eclair, zap and other wallets but every scenario I tried to use it failed because of critical issues:
  • eclair does not really constitute a wallet, it's more like a credit card - you can send money but not receive it
  • lnd is okay, but requires a server and tons of resources for maintaining a full node, can't be used securely, efficiently and mobily at the same time
  • zap offers some cloud wallet (in testnet!) by default, this is a serious misunderstanding of my cryptoanarchy needs
  • web wallets - ah, forget it
So I've decided to use my Raspberry Pi with a very old laptop HDD attached (200GB so the pruning function has to be used) to create a backend wallet service and zap desktop (temporarily!) as my frontend control panel.
https://preview.redd.it/0vcq147887q11.png?width=1024&format=png&auto=webp&s=7bb6eccdd4110a857e5af0400acc2d7e1ee7ee85
Setting up Pi is easy, lots of tutorials over the internet, not gonna discuss it here. Then I had to obtain bitcoind (current rel: bitcoin-0.17.0-arm-linux-gnueabihf.tar.gz) and lnd (lnd-linux-armv7-v0.5-beta.tar.gz), create a bitcoin technical user, deploy the tools, configure and install new systemd services and go through the configs. This is a tricky part, so let's share:
# Generated by https://jlopp.github.io/bitcoin-core-config-generato # This config should be placed in following path: # ~/.bitcoin/bitcoin.conf # [core] # Set database cache size in megabytes; machines sync faster with a larger cache. Recommend setting as high as possible based upon machine's available RAM. dbcache=100 # Keep at most  unconnectable transactions in memory. maxorphantx=10 # Keep the transaction memory pool below  megabytes. maxmempool=50 # Reduce storage requirements by only storing most recent N MiB of block. This mode is incompatible with -txindex and -rescan. WARNING: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, greater than 550 = automatically prune blocks to stay under target size in MiB). prune=153600 # [network] # Maintain at most N connections to peers. maxconnections=40 # Use UPnP to map the listening port. upnp=1 # Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit. maxuploadtarget=5000 # [debug] # Log IP Addresses in debug output. logips=1 # [rpc] # Accept public REST requests. rest=1 # [wallet] # Do not load the wallet and disable wallet RPC calls. disablewallet=1 # [zeromq] # Enable publishing of raw block hex to 
. zmqpubrawblock=tcp://127.0.0.1:28332 # Enable publishing of raw transaction hex to
. zmqpubrawtx=tcp://127.0.0.1:28333 # [rpc] # Accept command line and JSON-RPC commands. server=1 # Username and hashed password for JSON-RPC connections. The field comes in the format: :$. RPC clients connect using rpcuser=/rpcpassword= arguments. You can generate this value with the ./share/rpcauth/rpcauth.py script in the Bitcoin Core repository. This option can be specified multiple times. rpcauth=xxx:yyy$zzz
Whooaa, this online config generator is really helpful, but I still had to manually correct a few things. The last line is obviously generated by rpcauth.py, I disabled the wallet functionality as lnd is going to take care of my funds. ZMQ is not available to the network so only my LND can use it, RPC usage I still have to think through a little, in general I would like to have my own block explorer some day but also be safe from any hacking attempts (thus I would need at least 2 RPC ports/user accounts - one for lnd, one for block explorer frontend). No ports open on firewall at this time, only UPnP is active and gently opens 8333 for block/tx transfers.
Now, synchronizing the blockchain took me time from mid-July to early September... The hard drive is really slow, also my external HDD drive has some trouble with its A/C adapter so Pi was getting undervoltage alerts all the time. Luckily, it is just downclocking when it happens and slowly but steadily synchronized the whole history. After all, I'm not paying even $5 monthly for a VPS, it is by design the cheapest hardware I could use to set up my LN wallet.
When bitcoind was ready (I've heard some stories about btcd but I don't trust this software yet, sorry), it's time to configure lnd.conf:
[Application Options] debuglevel=trace rpclisten=0.0.0.0:10009 externalip=X.X.X.X:9735 listen=0.0.0.0:9735 alias=X color=#XXXXXX [Bitcoin] bitcoin.active=1 bitcoin.mainnet=1 bitcoin.node=bitcoind [Bitcoind] bitcoind.rpchost=127.0.0.1 bitcoind.rpcuser=X bitcoind.rpcpass=X bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333 
Here I've had to XXX a little more fields, as not only the bitcoind RPC credentials are stored here, but also my node's public information (it should be illegal to run nodes without specifically selected color and alias!). It is public (and I had to open port 9735 on my firewall), but not necessarily connected to my reddit account for most of the adversaries, so let's keep it this way. In fact, I also see a security vulnerability here: my whole node's stability depends on the IP being static. I could swap it for a .tk domain but who can tell if the bad guys won't actively fight DNS system in order to prevent global economic revolution? As such, I would rather see node identification in LN based on a public key only with possible *hints* of last-known-ip-address but the whole discovery should be performed by the nodes themself in a p2p manner, obviously preventing malicious actors from poisoning the network in some way. For now, I consider the IP stability a weak link and will probably have to pay extra Bitcoin TX fees when something happens to it (not much of a cost luckily!).

https://preview.redd.it/hjd1nooo77q11.png?width=741&format=png&auto=webp&s=14214fc36e3edf139faade930f4069fc31a3e883
Okay then, lnd is up and running, had to create a wallet and give it a night for getting up to speed. I don't know really what took it so long, I'm not using Windows nor 'localhost' in the config so the issues like #1027 are not the case. But there are others like #1545 still open so I'm not going to ponder much on this. I haven't really got any idea how to automatically unlock the wallet after Pi restart (could happen any time!), especially since I only tried to unlock it locally with lncli (why would I enter the password anywhere outside that host?), but let's say that my wallet will only be as stable as my cheap hardware. That's okay for the beta phase.
Finally, zap-desktop required me to copy tls.cert and admin.macaroon files to my desktop. If my understanding of macaroon (it's like an authentication cookie, that can later be revoked) is correct then it's not an issue, however it would be nice to have a "$50 daily limit" macaroon file in the future too, just to avoid any big issues when my client machine gets stolen. Thanks to this, I can ignore the silly cloud-based modes and have fully-secure environment of my home network being the only link from me to my money.
https://preview.redd.it/11bw3dgw47q11.png?width=836&format=png&auto=webp&s=b7fa7c88d14f22441cbbfc0db036cddfd7ea8424
Aaand there it is. The IP took some time to advertise, I use 1ml.com to see if my node is there. The zap interface (ZapDesktop-linux-amd64-v0.2.2-beta.deb) lacks lots of useful information so I keep learning lncli syntax to get more data about my new peers or the routes offered. The transactions indeed run fast and are ridiculously cheap. I would really love to run Eclair with the same settings but it doesn't seem to support custom lnd (why?). In fact, since all I need is really a lncli wrapper, maybe it will be easy to write my own (seen some web gui which weighs 700MB after downloading all dependencies with npm - SICK!). Zap for iOS alpha test registration is DOWN so I couldn't try it (and I'm not sure if it allows custom lnd selection), Zap for Android doesn't even exist yet... I made a few demo transactions and now I will explore all those fancy t-shirt stores as long as the prices are still in "early investor" mode - I remember times when one could get 0.001 BTC from a faucet...
https://preview.redd.it/42sdyoce57q11.png?width=836&format=png&auto=webp&s=7ec8917eaf8f3329d51ce3e30e455254027de0ee
If you find any of the facts presented by me false, I am happy to find out more in the discussion. However what I did I did mostly for fun, without paying much attention to the source code, documentation and endless issue lists on github. By no means I claim this tutorial will work for you but I do think I shared the key points and effort estimations to help others decide if they want a full-node LN client too. I'm also interested in some ideas on what to do with it next (rather unlikely that I will share my lnd admin.macaroon with anyone!) especially if it gives me free money. For example, I can open 1000 channels and start earning money from fees, although I no longer have more Bitcoins than the LN capacity yields... I will probably keep updating the software on my Pi until it leaves beta phases and only then will pour more money inside. I'm also keen on improving the general security of my rig and those comments I will answer more seriously.
submitted by pabou to Bitcoin [link] [comments]

Bitcoin Core 0.11.2 taking DAYS to sync up

I've read that this new wallet is supposed to be able to sync from zero in less than a day by downloading just the headers for the blocks, but I'm going on day 3 and am still 14 weeks behind. It was 26 weeks behind 9 hours ago. Is there a way to speed this up?
submitted by Boozybrain to Bitcoin [link] [comments]

Run a 0.14 Full-Node on RaspberryPi3 Pruned(less than 16GB SD needed)

Hi!
Happy if this guide helps you.
Tip if you want: 19656Uwdwko5RjtnuwQENpjBwE3ChzD59v
UPDATE 04/06/17
Add 'uacomment=UASF-SegWit-BIP148' into your bitcoin.conf if you want to signal UASF.
UPDATE 03/13/17
ADDED a tl;dr; Version at the end of this Post.
UPDATE 03/12/17:
Just to test it - I reinstalled all on 8GB SD and it works as well. But maybe you should use at least 16GB for the beginning.
Using a 128GB card for the first version was a little bit stupid - so I reinstalled everything on a 8GB SD card. Including Linux and a pruned blockchain - and it works.
I used prune=550 and Jessie Lite (headless / command line) - without wallet and gui.
The SD is almost full, but it works so far
I also updated the whole manual a bit to make things more clear. Thank you for all your feedback!
Just started my Bitcoin Node today and wanted to share the way I did it with people who are interested in running their own full node. It took some time to write everything down - hopefully correct so far.
I am sure, many people around bitcoin are way more informed and educated as I am - I am the noob. So I wrote this manual to help users like me - noobs, to get started with a cheap, simple bitcoin node on raspberry pi.
Have fun!
I wanted to get my Raspberry Pi 3 working as a node to support the network. Actually the process of installing and running the node was more or less easy - but for Noobs (like I am) it might be a bit tricky to start the whole thing, because there are different ways.
Did you - like me - think you would need +120GB on the raspi, external USB HDD to be a full node? You won't!
If you have a Raspberry and you know what Bitcoin is, I guess, you are a little bit aware of linux, networks and of course bitcoin - so I won't go into detail too much.
This guide is just a little helper to get a full node running on your raspberry pi. Thanks to the help of the nice people in this sub and of course the documentation by the developers, I got it working - and of course also special thanks to raspnode.com - as I followed their tutorial to start - I went some other ways here and there - so please read carefully.
For the Part 2 I would suggest to have http://raspnode.com/diyBitcoin.html open and read through my manual.
I split the tutorial in 2 Parts - PART ONE is about installing the client on your PC and downloading the Blockchain.
PART TWO is about the setup of the raspberryPi and transferring the pruned blockchain to the pi and run it as a full node!
The first thing to be aware of is: You actually need to download the whole blockchain to get this working - if you already have your bitcoin client synced on the PC / MAC great you can reuse it!
Now you might think "but you said less than 16GB in the title!"
Yes, but the good thing is you won't need to download it on your Raspberry, neither you need to sync it completely on your raspberry which took ages (weeks!) before. When you finished this Guide, you will just have a max. 4GB Blockchain on your Raspberry Pi - but it still is a full node! The magic word is Pruning.
Maybe even a 8GB SD Card works just fine including Linux (jessie lite)!
So, if you already have a full node on your PC - Great you can almost skip PART ONE - BUT have at how to Prune in PART ONE if you don't know about it.
For PART TWO you'll need a Raspberry Pi 2 or 3 (I used 3) min. 8GB (works also) or better 16GB SD Card. (I used a 128GB for the first version of this manual - which is way too big)

PART ONE

This is the manual how to get started on you PC / MAC / Linux (I did it on Win7)
Go to: https://bitcoin.org/en/download and download the core Client for your Machine (I used win64).
Install it and configure it to save the Blockchaindata to the directory of your choice - so instead getting 120GB on your C drive, I would suggest to download it to another place like a USB drive.
You can set this up during the install. Standard folder for the blockchain folder is "%APPDATA%\Bitcoin" on Windows.
or you can do it after the install by creating a bitcoin.conf file inside your installation folder / or %APPDATA%\Bitcoin and add
datadir=l:\yourfolder
to the file. Line by line.
By the way here you could also just add dbcache - to use more memory to speed up the process a bit:
dbcache=4096
if you don't want to use the settings inside the program. (you can also set this inside the program under settings! If you have this inside the bitcoin.conf you will see the amount you set there from inside the program - it overrides the values)
You can check inside the windows client under settings, if you can see a manual dbcache is set by having a look at the left footer area. When your dbcache value shows up, everything is fine.
So the Blockchain download process will take time - maybe a few days! Depending on your machine, internet connection and HDD.
The Blockchain is huge as it contains every single transaction of the past until today. You won't need to keep your PC running all the time, you can turn it off and on and it will resync automatically when you start bitcoin-qt.exe!
Make sure to close the client always via "quit" - ctrl+q.
After you have your bitcoin core installed, the blockchain downloaded and synced - you are ready to PRUNE!
First - close the Client and let it close smoothly. After it is really closed you can follow these steps:
By pruning, your blockchain will dramatically shrink. From 120GB to just a few GB.
Be aware, that you will lose your Downloaded Blockchain as pruning will erase a big chunk of it! If you have enough space, you could of course keep the full blockchain saved somewhere on another HDD.
You can prune by editing your bitcoin.conf file by adding:
prune=550
I used prune=1024 - not sure where the differences are right now (min. prune=550). (for my 8GB version I used 550! I suggest to use this.)
Save the bitcoind.conf file and restart your windows client.
It will now clean up the Blockchain. So just the latest blocks are saved. The client should start without any problems. Maybe it takes some time to prune the blockchain data.
Check if everything works normally (the client opens as usual, you can see an empty wallet) than close the client.
Inside the Bitcoin Folder, you'll find two folders called:
blocks chainstate
those are the interesting folders containing the important data (now pruned) - and we will transfer those two to the raspberry later!
Now you are good to start the raspi transfer explained in the next part.

PART 2

Here is what I did:
1) I installed Raspian Pixel (https://www.raspberrypi.org/downloads/raspbian/) using a 128 GB SD - which is not needed because of "Pruning" - I think a 16GB card might work, too! (You can also install Raspian Jessie Lite - which saves you even more space, as it runs headless - only command line) (Updated: It is better to use Jessie Lite to save a lot of space - when you are fine with only command line)
2) I followed partly this tutorial to get everything running and setup:
http://raspnode.com/diyBitcoin.html
Please have a look at it - I have copied the Headlines in capitals to let you know what I did, and what I skipped.
On Tutorial Page: Start with RASPBIAN (OPTIONAL) CONFIG OPTIONS.
Set You RasPi up including "EDITING FILES" to save your Layout at the tutorial page and come back here.
I skipped the CONFIGURE USB AND SET AUTOMOUNT process, as we are going to use PRUNING to reduce the 120GB to a tiny filesize - so USB Devices are not needed here!
It was necessary to ENLARGE SWAP FILE to install bitcoin core - otherwise it didn't went through which ended in a frozen raspi.
So have a close look by following the raspnode tutorial at: ENLARGE SWAP FILE.
I have my raspi running via cable to router - but you can also WiFi setup everything described under NETWORKING ON THE RASPBERRY PI.
Now comes the interesting part: Follow the steps at DOWNLOADING BITCOIN CORE DEPENDENCIES - they work fine for 0.14.0 too. Git should be on Board already when you installed Pixel - otherwise you would need to install it.
sudo apt-get install git -y (only jessy lite)
I skipped the next command lines - as I don't use bitcoin-qt wallet. If you want to use it as wallet - do the step.
mkdir ~/bin cd ~bin
Now you are in the folder you want your bitcoin core data be downloaded to via git. I didn't Downloaded the Berkeley Database source code - so I also skipped the whole next command lines
[email protected]~/bin$ wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz [email protected]~/bin$ tar -xzvf db-4.8.30.NC.tar.gz [email protected]~/bin$ cd db-4.8.30.NC/build_unix/ [email protected]~/bin/db-4.8.30.NC/build_unix$ ../dist/configure --enable-cxx [email protected]~/bin/db-4.8.30.NC/build_unix$ make -j4
and went on with "INSTALLING BITCOIN"!
I followed the first part but instead downloading 0.13 I took of course the latest version:0.14
git clone -b 0.14 https://github.com/bitcoin/bitcoin.git cd bitcoin ./autogen.sh
this might take some time to start.
If you have trouble with hanging RESOLVING DELTAS - just restart the Raspberry Pi and remove the bitcoin folder inside /~bin using
rm -rf bitcoin
this command will delete the folder and you can reuse
git clone -b 0.14 https://github.com/bitcoin/bitcoin.git

For some reason RESOLVING DELTAS is a common problem with different downloads - so just retry it and at least after 3 times it should work!

as I didn't use the GUI/ Wallet, I ran
./configure --enable-upnp-default --disable-wallet
as I don't need the wallet functionality.
I didn't need to use "MAKE" which saves you maybe up to 2.5 hours.
instead you can just go ahead with:
sudo make install
(If I am wrong in doing so - please let me know)
The install takes some time - and just a heads up: when it gets stuck somewhere - just redo the installation process - it took three times to went through - stuck at some processing.
After the installation took place you can finally get your Raspberry Pi Node running in no time!
To test if the the installation went through - you can just start bitcoind using:
bitcoind &
than check if everything is working so far:
bitcoin-cli getinfo
after a few seconds you should see version: etc...
if not, something went wrong. Try to redo the steps in the raspnode tutorial.
(don't give up if it failed - retry! Ask your questions here)
IMPORTANT: you need to stop bitcoin on your raspberry now!
bitcoin-cli stop
If you don't need an external USB Drive - what I hope - as we are going to use pruning just go ahead and skip the USB part and create a file inside (or follow the raspnode tutorial on how to setup the USB drive):
cd .bitcoin
sudo nano bitcoin.conf
and enter the exact same pruning size you have used on your Desktop Machine to prune. I used 1024 but the minimum is 550. (used 550 for the 8GB SD card on PC and Raspberry)
prune=550
That's it for the raspi.
update: To signal UASF enter in a new line:
uacomment=UASF-SegWit-BIP148

TRANSFER

Now you have to transfer the two folders CHAINSTATE and BLOCKS from your PC bitcoind directory to your raspberry.
I am using a program called "WINSCP" - it is free and easy to use: https://winscp.net/eng/download.php
We need this to transfer the files to the Raspberry pi. Pretty sure you can also do it via SSH - but I am the noob. So let's keep it simple.
Open Winscp and put in the IP Address of your Raspberry Pi, User and Password (same as in SSH)
You should now see the directories on your Raspberry Pi. There is a folder called
.bitcoin
enter it and you will see the two folders
blocks & chainstate
you can delete them on the raspberry as they have some data from your previous test inside.
Make sure you can also see the bitcoin.conf file in that directory, which needs to contain the exact same prune line, like the one on your desktop machine. If not, make sure to edit it via SSH. The line "datadir=l:\yourfolder" is obviously not needed in the Raspberry bitcoin.conf file.
Now grab the two folders CHAINSTATE and BLOCKS from your PC and copy them to your .bitcoind folder.
I also copied banlist.dat, fee_estimation.dat, mempool.dat and peers.dat to the folder - not really knowing if needed! Not needed.
The whole copy process might take some minutes (against some weeks in the old way).
After copying is finished, you can now start bitcoind on the Raspberry.
bitcoind &
the & symbol let you still use the command line while the process is running btw.
The process - if succesfull - will take some time to finish.
bitcoin-cli getinfo
Will give you some informations what is going on right now. When you can see, that it is checking the blocks, this is good!
If you get an error - double check - if you have the correct prune size (same as on desktop machine) - in bitcoin.conf and that this file is inside .bitcoin on RaspberryPi. It took me some time, to find my mistakes.
Congrats! You are almost a part of the network!
To make your node now a fullnode, you will need to go to your router (often 192.168.1.1) and enable portforwarding for your raspberry pi - and open ports 8333 - that's it!
You can now go to: https://bitnodes.21.co/nodes/
scroll down to "JOIN THE NETWORK" and check check if your node IP is connected!
It will show up as soon as the blocks are checked and the raspi is running.
Well done!
Now you are running a full node, with a small Blockchain and got it working in Minutes, not weeks!
I really hope, my little tutorial worked for you and your are part of the Node network now.
If you have problems or I made a mistake in this helper tut, just let me know and I will try to make it better.
Have fun and NODL!
the noob
tl;dr; (if you are a real noob start with the non-tl;dr version!)
tl;dr; PART ONE
1) Download & install / setup bitcoincore @ https://bitcoin.org/de/download
2) change dbcache to something smaller than your memory and download the whole Blockchain (120GB).
3) create a file called bitcoin.conf put the line prune=550 (or higher) in to activate pruning on win inside %appData%/bitcoin
4) Open ports 8333 on your Router to make this a full node with a smaller Blockchain.
You are running a full node on your PC.
tl;dr; PART TWO
1) Install jessie lite and the needed dependencies on your SDCard - Raspberry
( >git clone -b 0.14 https://github.com/bitcoin/bitcoin.git )
  • see tutorial for more info.
2) create a file called bitcoin.conf inside .bitcoin and add the same prune=Number you had on your PC.
3) transfer the pruned folders BLOCKS and CHAINSTATE to the Raspberry Folder .bitcoin
4)Start "bitcoind &"
5) let everything sync
6) Make sure you have port 8333 opened on your router.
You are running a full node on your Raspberry with a super small Blockchain (I put all on a 8GB SDcard)
Tip if you want : 19656Uwdwko5RjtnuwQENpjBwE3ChzD59v
updated 03/12 - will update more, soon.
updated 03/12.2 - I updated the whole process a bit and also added some improvements.
updated 03/14/ Added a tl;dr version at the end.
submitted by I-am-the-noob to Bitcoin [link] [comments]

A Guide to Keeping Keys Offline Using Armory +rPi

Hi Redditors.
I am going to post in this thread my experiences in getting my Desktop (Debian) machine running Armory in watch-only mode, and coupling that with an offline Raspberry Pi (which holds my private keys) for signing the transactions previously made in watch-only mode.
I actually compiled Armory from source directly on my Pi. This guide is probably more for the bitcoin 'power user', as to run Armory online, and broadcast the signed transactions, you need to have a bitcoin full node running (bitcoind).
Basic requirements:
Aimed-for Setup:
I'll post the guide in digestible sections...

Section 1

I should begin by saying I installed source code from git, and got Armory to build the DB on my desktop initially, WITHOUT creating a wallet.. (This allowed me to debug what was going on a little!)
Go to Bitcoin.org, select Armory..
It leads to a Download from Git:
https://github.com/goatpig/BitcoinArmory/releases
Followed the procedure for Linux Debian verify code, compile, install, all straight-forward..
Began by running bitcoind, and telling Armory where to find it. This is the command I used, obviously it was all on one line and didn't include the arrows/explanations!:
python ArmoryQt.py \ --satoshi-datadir=/BlockChain/chain20180414/blocks \ # <-----(where my bitcoind blocks live) --datadir=/ArmoryDataDi \ # <-----(this is instead of ~/.armory) --dbdir=/ArmoryDataDidatabases # <-------(again, non std. place used for Armory's databases.. my choice.) 
So, on the Desktop, after the initial "build databases"
(NB the initial "Build Databases" took about 1.5h and my two CPUs were maxed the whole time, Temps up to 62C. Not ideal; Im not in a rush!)
I then wanted to import a watch-only wallet.
Before I did this, I took a full backup of the Armory data dir:
/ArmoryDataDi
(or ~/.armory in a default installation).
I'd hate to have to make Armory do another full sync with the bitcoind node!

Section 2

Next step: offline wallet (with Private Keys) is on a Raspberry Pi.
I downloaded the source and managed to compile it on the pi itself! :)
Though there were some gymnastics needed to setup the Pi.
My Pi is running Raspbian based on Wheezy.. quite old!
I did the following on the Pi:
apt-get update apt-get upgrade (<---took about an hour!) apt-get install autotools-dev apt-get install autoconf 
Then I followed the instructions exactly as I had done for my Debian Desktop machine, EXCEPT:
I had to increase the Pi's swap space. I upped it from 100Mb to 400Mb.
The compilation took 7 hours, and my poor SD card got a thrashing.
But after compilation, I put the Swap back to 100Mb and Armory runs ok with about 150Mb of memory (no swap needed).
Swap increase on the Pi:
use your favourite editor, and open the file /etc/dphys-swapfile
add/change the following line:
CONF_SWAPSIZE=400 
Then, REBOOT the Pi:
sudo shutdown -h -P now 
Once the compilation was done on the Pi, put the swap back, rebooted and created an Armory wallet.
I added manual entropy and upped the encryption 'time' from 250ms to 2500ms - since the Pi is slow, but I'll be happy to wait for more iterations in the Key Derivation Function.
Once the wallet was created, it obviously prompts you for backup.
I want to add a private key of my own (i.e. import), so don't do the backup until this is over.
I import my Private Key, and Armory checks that this corresponds to a Public Key, which I check is correct.
This is the point now where the Pi storage medium (e.g an SD card) has to be properly destroyed if you ever get rid of it.
I had thought that now would be a good time to decide if your new wallet will generate Segwit receiving addresses, and also addresses used to receive 'change' after a transaction..
But it seems Armory WON'T let you switch to P2SH-P2WPKH unless your Armory is connected to a node offering "WITNESS" service.
Obviously, my Pi is offline and will never connect to a node, so the following will not work on the Pi:
NB: I thought about setting this on the Debian "watch-only" wallet, but that would surely mean doom, as the Pi would not know about those addresses and backups might not keep them.. who knows...
So, end result:- no segwit for me just yet in my offline funds.

--If anyone can offer a solution to this, I'd be very grateful--

Section 3

Ok, now this is a good point to back up your wallet on the Pi. It has your imported keys. I choose a Digital Backup - and put it on a USB key, which will never touch the internet and will be stored off-site. I also chose to encrypt it, because I'm good with passwords..
NB: The Armory paper backup will NOT back up your imported private keys, so keep those somewhere if you're not sweeping them. It would be prudent to have an Armory paper backup anyway, but remember it will likely NOT help you with that imported key.
Now for the watch-only copy of the wallet. I want to get the "watch-only" version onto my Desktop Debian machine.
On the Pi, I created (exported to a USB key) a "watching-only" copy of my wallet.
I would use the RECOMMENDED approach, export the "Entire Wallet File".
As you will see below, I initially exported only the ROOT data, which will NOT capture the watching-only part of the Private Key I entered manually above (i.e. the public Key!).
Now, back on the Debian Desktop machine...
I stopped all my crontab jobs; just give Armory uninterrupted CPU/memory/disk...
I also stopped bitcoind and made a backup prior to any watch-only wallet being imported.
I already made a backup of Armory on my Desktop, before any wallet import.
(this was needed, as I made a mistake.. see below)
So on the Debian Desktop machine, I begin by firing up bitcoind.
my command for this is:
./bitcoind -daemon -datadir=/BlockChain/chain20180414 -dbcache=400 -maxmempool=400 

Section 4

I try running Armory like this:
(I'm actually starting Armory from a script - StartArm.sh)
Inside the script StartArm.sh, it has the line:
python ArmoryQt.py --ram-usage=4 --satoshi-datadir=/BlockChain/chain20180414/blocks --datadir=/ArmoryDataDi --dbdir=/ArmoryDataDidatabases 
I know from bitter experience that doing a scan over the blockchain for a new wallet takes a looong time and a lot of CPU, and I'd like it to play nicely; not gobble all the memory and swap and run my 2xCPUs both at 100% for four hours...
So... I aim to run with --ram-usage=X and --thread-count=X
(For me in the end, X=1 but I began with X=4)
I began with --ram-usage=4 (<--- = 4x128Mb)
The result is below...
TypeError: cannot concatenate 'str' and 'int' objects 
It didn't recognise the ram-usage and carried on, crippling my Debian desktop PC.
This is where it gets dangerous; Armory can gobble so much memory and CPU that the windowing environment can cease up, and it can take over 30 minutes just to exit nicely from bitcoind and ArmoryDB.
So, I ssh to the machine from another computer, and keep an eye on it with the command
"free -h" 
I'd also be able to do a "sudo reboot now" if needed from here.

Section 5

So, trying to get my --ram-usage command recognised, I tried this line (added quotes):
python ArmoryQt.py --ram-usage="4" --satoshi-datadir=/BlockChain/chain20180414/blocks --datadir=/ArmoryDataDi --dbdir=/ArmoryDataDidatabases 
But no, same error...
Loading Armory Engine: Armory Version: 0.96.4 Armory Build: None PyBtcWallet Version: 1.35 Detected Operating system: Linux OS Variant : ('debian', '9.4', '') User home-directory : /home/ Satoshi BTC directory : /BlockChain/chain20180414 Armory home dir : /ArmoryDataDi ArmoryDB directory : /ArmoryDataDidatabases Armory settings file : /ArmoryDataDiArmorySettings.txt Armory log file : /ArmoryDataDiarmorylog.txt Do wallet checking : True (ERROR) ArmoryUtils.py:3723 - Unsupported language specified. Defaulting to English (en) (ERROR) ArmoryQt.py:1833 - Failed to start Armory database: cannot concatenate 'str' and 'int' objects Traceback (most recent call last): File "ArmoryQt.py", line 1808, in startArmoryDBIfNecessary TheSDM.spawnDB(str(ARMORY_HOME_DIR), TheBDM.armoryDBDir) File "/BitcoinArmory/SDM.py", line 387, in spawnDB pargs.append('--ram-usage=' + ARMORY_RAM_USAGE) TypeError: cannot concatenate 'str' and 'int' objects 

Section 6

So, I edit the Armory python file SDM.py:
if ARMORY_RAM_USAGE != -1: pargs.append('--ram-usage=4') #COMMENTED THIS, SO I CAN HARDCODE =4 # ' + ARMORY_RAM_USAGE) 
Running it, I now have acknowledgement of the --ram-usage=4:
(WARNING) SDM.py:400 - Spawning DB with command: /BitcoinArmory/ArmoryDB --db-type="DB_FULL" --cookie --satoshi-datadir="/BlockChain/chain20180414/blocks" --datadir="/ArmoryDataDi" --dbdir="/ArmoryDataDidatabases" --ram-usage=4 
Also, even with ram-usage=4, it used too much memory, so I told it to quit.
It took over 30 minutes to stop semi-nicely. The last thing it reported was:
ERROR - 00:25:21: (StringSockets.cpp:351) FcgiSocket::writeAndRead FcgiError: unexpected fcgi header version 
But that didn't seem to matter or corrupt the Armory Database, so I think it's ok.
So, I get brave and change SDM.py as below, and I make sure my script has a command line for --ram-usage="ABCDE" and --thread-count="FGHIJ"; the logic being that these strings "ABCDE" will pass the IF criteria below, and my hardcoded values will be used...
if ARMORY_RAM_USAGE != -1: pargs.append('--ram-usage=1') #COMMENTED THIS, SO I CAN HARDCODE =1 # ' + ARMORY_RAM_USAGE) if ARMORY_THREAD_COUNT != -1 pargs.append('--thread-count=1') #COMMENTED THIS, SO I CAN HARDCODE =1 #' + ARMORY_THREAD_COUNT) 
So, as usual, I use my script and start this with: ./StartArm.sh
(which uses command line:)
python ArmoryQt.py --ram-usage="ABCDE" --thread-count="FGHIJ" --satoshi-datadir=/BlockChain/chain20180414/blocks --datadir=/ArmoryDataDi --dbdir=/ArmoryDataDidatabases 
(this forces it to use my hard-coded values in SDM.py...)
So, this is the command which it reports that it starts with:
(WARNING) SDM.py:400 - Spawning DB with command: /BitcoinArmory/ArmoryDB --db-type="DB_FULL" --cookie --satoshi-datadir="/BlockChain/chain20180414/blocks" --datadir="/ArmoryDataDi" --dbdir="/ArmoryDataDidatabases" --ram-usage=1 --thread-count=1 
Again, this is where it gets dangerous; Armory can gobble so much memory and CPU that the windowing environment can cease up. So I ssh to the machine and keep an eye on it with:
"free -h" 

Section 7

So, on the Debian Desktop PC, I inserted the USB stick with the watch-only wallet I exported from the Pi.
Start Armory...
Import "Entire Wallet File" watch-only copy.
Wait 4 hours..
YAY!!!
After running Armory for about 30m, the memory usage dropped by 400m... wierd...
It took ~2 hours to get 40% completion.
After 3.5 hours it's almost there...
The memory went up to about 1.7Gb in use and 900Mb of Swap, but the machine remained fairly responsive throughout, apart from a few (10?) periods at the start, where it appeared to freeze for 10-30s at a time.
(That's where my ssh session came in handy - I could check the machine was still ok with a "free -h" command)
Now, I can:
Create an unsigned transaction on my Desktop,
Save the tx to USB stick,
Move to the Pi,
Sign the tx,
Move back to the Desktop,
Broadcast the signed tx.

Section 8

My initial Mistake:
This caused me to have to roll-back my Armory database, using the backup. so you should try to avoid doing this..
On the Pi, I exported only the ROOT data, which will NOT capture the watching-only part of the Private Key
It is RECOMMENDED to use the Digital Export of Entire Wallet File from the Pi when making a watch-only copy. If you just export just the "ROOT data", not the "Entire Wallet File", you'll have problems if you used an imported Private Key in the offline wallet, like I did.
Using the ROOT data text import, after it finished... my balance was zero. So,. I tried a Help->Rescan Balance (Restart Armory, takes 1minute to get back up and running) No Luck. Still zero balance.
So, I try Rescan Databases.. This will take longer. Nah.. no luck.
So, I tried again, thinking it might be to do with the fact that I imported the text "root data" stuff, instead of following the (Recommended) export of watching-wallet file.
So, I used my Armory backup, and wound back the ArmoryDataDi to the point before the install of the (zero balance) wallet. (you should not need to do this, as you will hopefully use the RECOMMENDED approach of exporting the "Entire Wallet File"!)
submitted by fartinator to Bitcoin [link] [comments]

PSA: Clearing up some misconceptions about full nodes

It's time to clear up some misconceptions floating around about full nodes.
Myth: There are only about 5500 full nodes worldwide
This number comes from this site and it measured by trying to probe every nodes on their open ports.
Problem is, not all nodes actually have open ports that can be probed. Either because they are behind firewalls or because their users have configured them to not listen for connections.
Nobody knows how many full nodes there are, since many people don't know how to forward ports behind a firewall, and bandwidth can be costly, its quite likely that the number of nodes with closed ports is at least another several thousand.
Nodes with open ports are able to upload blocks to new full nodes. In all other ways they are the same as nodes with closed ports. But because open-port-nodes can be measured and closed-port-nodes cannot, some members of the bitcoin community have been mistaken into believing that open-port-nodes are that matters.
Myth: This number of nodes matters and/or is too low.
Nodes with open ports are useful to the bitcoin network because they help bootstrap new nodes by uploading historical blocks, they are a measure of bandwidth capacity. Right now there is no shortage of bandwidth capacity, and if there was it could be easily added by renting cloud servers.
The problem is not bandwidth or connections, but trust, security and privacy. Let me explain.
Full nodes are able to check that all of bitcoin's rules are being followed. Rules like following the inflation schedule, no double spending, no spending of coins that don't belong to the holder of the private key and all the other rules required to make bitcoin work (e.g. difficulty)
Full nodes are what make bitcoin trustless. No longer do you have to trust a financial institution like a bank or paypal, you can simply run software on your own computer. To put simply, the only node that matters is the one you use
Myth: There is no incentive to run nodes, the network relies on altruism
It is very much in the individual bitcoin's users rational self interest to run a full node and use it as their wallet.
Using a full node as your wallet is the only way to know for sure that none of bitcoin's rules have been broken. Rules like no coins were spent not belonging to the owner, that no coins were spent twice, that no inflation happens outside of the schedule and that all the rules needed to make the system work are followed (e.g. difficulty.) All other kinds of wallet involve trusting a third party server.
All these checks done by full nodes also increase the security. There are many attacks possible against lightweight wallets that do not affect full node wallets.
This is not just mindless paranoia, there have been real world examples where full node users were unaffected by turmoil in the rest of the bitcoin ecosystem. The 4th July 2015 accidental chain fork effected many kinds of wallets. Here is the wiki page on this event https://en.bitcoin.it/wiki/July_2015_chain_forks#Wallet_Advice
Notice how updated node software was completely unaffected by the fork. All other wallets required either extra confirmations or checking that the third-party institution was running the correct version.
Full nodes wallets are also currently the most private way to use Bitcoin, with nobody else learning which bitcoin addresses belong to you. All other lightweight wallets leak information about which addresses are yours because they must query third-party servers. The Electrum servers will know which addresses belong to you and can link them together. Despite bloom filtering, lightweight wallets based on BitcoinJ do not provide much privacy against nodes who connected directly to the wallet or wiretappers.
For many use cases, such privacy may not be required. But an important reason to run a full node and use it as a wallet is to get the full privacy benefits.
Myth: I can just set up a node on a cloud server instance and leave it
To get the benefits of running a full node, you must use it as your wallet, preferably on hardware you control.
Most people who do this do not use a full node as their wallet. Unfortunately because Bitcoin has a similar name to Bittorrent, some people believe that upload capacity is the most important thing for a healthy network. As I've explained above: bandwidth and connections are not a problem today, trust, security and privacy are.
Myth: Running a full node is not recommended, most people should use a lightweight client
This was common advice in 2012, but since then the full node software has vastly improved in terms of user experience.
If you cannot spare the disk space to store the blockchain, you can enable pruning. In Bitcoin Core 0.12, pruning being enabled will leave the wallet enabled. Altogether this should require less than 900MB of hard disk space.
If you cannot spare the bandwidth to upload blocks to other nodes, there are number of options to reduce or eliminate the bandwidth requirement. These include limiting connections, bandwidth targetting and disabling listening. Bitcoin Core 0.12 has the new option -blocksonly, where the node will not download unconfirmed transaction and only download new blocks. This more than halves the bandwidth usage at the expense of not seeing unconfirmed transactions.
Synchronizing the blockchain for a new node has improved since 2012 too. Features like headers-first and libsecp256k1 have greatly improved the initial synchronization time.
It can be further improved by setting -dbcache=3000 which keeps more of the UTXO set in memory. It reduces the amount of time reading from disk and therefore speeds up synchronization. Tests showed that the entire blockchain can now be synchronized in less than 3 and a half hours (Note that you'll need Bitcoin Core 0.12 or later to get all these efficiency improvements) Another example with 2h 25m
How to run a full node as your wallet.
I think every moderate user of bitcoin would benefit by running a full node and using it as their wallet. There are several ways to do this.
So what are you waiting for? The benefits are many, the downsides are not that bad. The more people do this, the more robust and healthy the bitcoin ecosystem is.
Further reading: http://www.truthcoin.info/blog/measuring-decentralization/
submitted by belcher_ to Bitcoin [link] [comments]

What settings should you use to run a full core node on a Raspberry Pi?

I have a Raspberry Pi B+
specs:
I have used http://www.raspberrypifullnode.com/ and http://raspnode.com/diyBitcoin.html as my guides so far (awesome resources btw) but wanted to open the discussion here.
After temporarily bumping the swapfile size to 1GB, I compiled bitcoind with:
./autogen.sh ./configure --disable-wallet make sudo make install 
I then started bitcoind with:
bitcoind -dbcache=4 -rpcthreads=1 -par=1 & 
Unfortunately the bitcoin server keeps crashing after a while.
Which compilation/run options should I use to conserve the most memory?
Thanks!
submitted by spacecowsgomoon to Bitcoin [link] [comments]

04-07 09:48 - 'Lightning node on Windows - testing, get not connected' (self.Bitcoin) by /u/Mr--Robot removed from /r/Bitcoin within 845-855min

'''
Ok after testing BTCPay, C-Lightning, LND on Ubuntu I said ok let's try also the Windows implementation, is just few clicks and done (as it is promoted).
So I followed this [github guide]1 that actually send you to [this one]2 .
OK, started Bitcoin-core client on Windows 7 x64, with an already synced data folder. Empty bitcoin.conf (none of guides says how to configure the conf file). Wait until the client is full synced. And then launched the windows-node-launcher (from a subfolder inside Bitcoin folder). All good, started slowly and a small popup appeared in systray saying Bitcoin node is syncing. Reviewed the config of Bitcoin and LND through that little app in systray and saw that bitcoin.conf was already filled with some settings. Didn't change anything. After 1 day (with the bitcoin blockchain already synced), the systray popup still says that is syncing and have a red dot. In the tutorial says that we have to leave it to sync until is blue and then green.
I said, ok maybe it has more things to do. So I open that LND Output link, to see what is going on... And I see that LND is not well. Says: 2019-04-06 21:11:29.772 [INF] LTND: Version: 0.6.0-beta commit=v0.6-beta-rc3, build=production, logging=default 2019-04-06 21:11:29.772 [INF] LTND: Active chain: Bitcoin (network=mainnet) 2019-04-06 21:11:29.774 [INF] CHDB: Checking for schema update: latest_version=8, db_version=8 2019-04-06 21:11:29.808 [INF] RPCS: password RPC server listening on 127.0.0.1:10009 2019-04-06 21:11:29.808 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080 2019-04-06 21:11:29.808 [INF] LTND: Waiting for wallet encryption password. Use lncli create to create a wallet, lncli unlock to unlock an existing wallet, or lncli changepassword to change the password of an existing wallet and unlock it. 2019-04-06 21:11:32.673 [INF] LNWL: Opened wallet 2019-04-06 21:11:33.183 [INF] LTND: Primary chain is set to: bitcoin unable to create chain control: unable to connect to bitcoind: unable to subscribe for zmq block events: dial tcp 127.0.0.1:18502: connectex: No connection could be made because the target machine actively refused it. 2019-04-06 21:11:36.087 [INF] LTND: Shutdown complete unable to connect to bitcoind: unable to subscribe for zmq block events: dial tcp 127.0.0.1:18502: connectex: No connection could be made because the target machine actively refused it. 2019-04-06 21:11:39.229 [INF] LTND: Version: 0.6.0-beta commit=v0.6-beta-rc3, build=production, logging=default
Now the bitcoin.conf have this: printtoconsole=1 rpcallowip=::/0 whitelist=0.0.0.0/0 datadir=C:\Users\Admin\AppData\Roaming\Bitcoin prune=0 txindex=1 server=1 disablewallet=0 timeout=6000 rpcuser=user rpcpassword=defaultxzxxxxx zmqpubrawblock=[link]3 zmqpubrawtx=[link]4 dbcache=2408
And LND.conf have this: (#) Auto-Generated Configuration File (#) Node Launcher version 6.0.2 debuglevel=info restlisten=127.0.0.1:8080 rpclisten=127.0.0.1:10009 tlsextraip=127.0.0.1 listen=127.0.0.1:9735 alias=aliasme color=#00aa7f bitcoin.active=1 bitcoin.node=bitcoind bitcoind.rpchost=127.0.0.1:8332 bitcoind.rpcuser=user bitcoind.rpcpass=defaultxxxxx bitcoind.zmqpubrawblock=[link]3 bitcoind.zmqpubrawtx=[link]4
So what is going on here? I will have to wait indefinitely? Somebody can give some help or explanation? Is this LND node working on Windows Server 2008 or 2012?
'''
Lightning node on Windows - testing, get not connected
Go1dfish undelete link
unreddit undelete link
Author: Mr--Robot
1: g*thub.c*m/light**ng**o*e*-users/no**-launc**r 2: me*ium.*o**lig*tn**g-p*wer-users/w*n**ws-m**os-l**ht*i*g-ne*work-2*4bd5034340 3: 127.0.0**:1*5*2 4: 127*0.0**:185*3 5: 1**.0.0*1:185*2 6: 12*.0**.1:*8503
Unknown links are censored to prevent spreading illicit content.
submitted by removalbot to removalbot [link] [comments]

Inadvisably small full node config

Disclaimer: As the subject implies, this is about an inadvisable config. The following is of zero practical use, but like cross-stitch, may be appealing to the random few people interested in such things. Opinions on the futility of this exercise can be considered already noted. Any suggestions to make this more ridiculously small are very welcome. Obviously I'm not running my primary wallet off of this config. It's just for fun.
TLDR: Wow look, my full node fit on a 0.5 CPU with 0.6 GB memory and 25 GB drive... yeah for me!

Background

I used to run a full node a good ways back, but stopped when the old 3rd string laptop I was using to run it was having drive issues. Still the early interest paid dividends as the price has gone exponential. Missing the good ol' days, I wanted to run another node, but really didn't want to do it on any of my work or lab units. My company took a hard stand years ago to prevent interns from mining on spare HW, so running even a full node on my corporate gear is kinda a capitol punishment. Round about this time, I got some spam for some free VPS service for a year. The promotion were really (I mean really wimpy VPSs). Crappy VPS + bitcoind performance tuning = my kind of waste of time.

Goal

My goal (perverse though it may be), is to get bitcoin or other forks running in very small VPSs. Maybe some of the tuning parameters could be used for a docker container or some whipy SOC. The system I was targeting has 0.5 CPU, 0.6 GB of memory and 25 GB of disk.

Observations

I found some interesting things out along the way that may be of interest to people tweeking bitcoind.

dbcache limits

Since I don't have the requisite memory required to run the node, I've limited memory using the dbcache parameter. Settings range from 100 to 150 depending on what other settings I have in place.

0.15.1 mallocs

I don't know what changed in 0.15.1 but it seems much more memory hungry than previous releases. Throughout the tuning process, I continually had either bitcoind quit due to memory allocation failures (logged in debug.log), or the kernel oom_killer take maters into its own hands (logged in /valog/syslog). This looks very similar to an issue that was logged against 0.14.0 that was patched in 0.14.1. My ultimate solution was to downgrade to 0.14.2 which seems to work great.

prune compromise

My initial thoughts were to use prune=550 to use the least amount of disk space possible. I found out that even on 0.14.2 this causes memory to fill up quick. I found making the pruning less aggressive with a setting of prune=10240 seems to be a good compromise for what I need done. This could possibly be an observation error, but the results seemed very reproducable.

blocksonly avoidance

I had thought to save some memory by using blocksonly. For some reason, on 0.14.2, this causes more problems than it solves. I had a hard time finding any config where blocksonly would work. Surprisingly, maxmempool=5 does effectively the same thing for the miserly cost of 5MiB of memory.

serial consoles

Seems ridiculous, but on my VPS, if bitcoind was running full speed, I would have a hard time connecting through SSH. There were other SSH clients and connection methods that seemed to work better. By far the quickest connections when under heavy utilization was to connect directly to serial ports. I wrote a small snippet to enable extended serial console on my systemd install.

canary log

Since logging into my system gobbles up memory, I wanted this config to be as low-touch as possible once in motion. After tooling up the serial ports, I found all the system log messages where peekable without logging into my VPS through my VPS provider. I wrote a small canary script to simply chirp to the serial port every 5 minutes to confirm that bitcoind was indeed alive and kicking.

Scripts

I made a few scripts during the process as the needs arose. They are very utilitarian, and could do with some major overhauls, but they did what I needed done at the time I needed it.
Scripts:

Final config

Here is my final config, that is still syncing, but seems to be stable on 0.14.2
/usbin/nice -n 15 bitcoind \ -dbcache=115 \ -prune=10240 \ -maxmempool=5 \ -daemon /usbin/nohup $HOME/canary.sh $1 300 $USER >/dev/null 2>/dev/null & cPid=$! sudo /usbin/renice -n -5 -p $cPid echo "Canary @ $cPid" 
Memory utilization while syncing seems to be at about 400MiB. Once I'm synced, I expect to retune for dbcache=60 and maxmempool=60.
Projected full blockchain sync completion in (gulp) 30 days. CPU utilization is currently reported between 30-60% but my provider offers boost periods where they unmeeter the VMs. I've gotten it up to 110% on their dashboard, for what its worth.
I'm well beyond the word limit so I'll drop off here, but I'll eventually put the snipits in a github repo in the near future.
PS If anyone knows of some free VPS or Docker hosting services, please chime in.
EDIT: s/VSP/VPS/g - lysdexia
submitted by brianddk to BitcoinDiscussion [link] [comments]

A guide to sign a super bitcoin (SBTC) transaction offline with patched Electrum for paranoid. Supports any wallets supported by Electrum (including segwit-p2sh and bech32 and all BIP39 seeds). Later BCD will be added.

This is quite advanced. This guide assumes you have some basic experience with the command line, can run Linux and you understand the basics of keys/signing/broadcasting transactions. And that you can compile and run Bitcoin Core and run Electrum. Also, some JSON experience is also nice.
Move you bitcoins to safe addresses first. It is best to use a new seed. Although the procedure in this guide is safe even for hot addresses (containing bitcoins), there is always a risk of a critical mistake. So play it safe.
Why such a guide? I followed these steps because I did not want to expose the keys to any online machine at all. Even if the keys do not have any bitcoins, you can some day have bitcoins sent to these addresses or you have a fork that you have not claimed. All can be stolen if you exposed your key.
This procedure should work with everything that Electrum supports (except maybe F2A that may be not supported on the SBTC chain), so Electrum seed legacy or segwit, LedgeTrezor with legacy or segiwt-p2sh (m/'49) derivation. Similarly, any BIP39 seeds or a single key. are also fine.
  1. Download Electrum. git clone https://github.com/spesmilo/electrum
  2. Apply my patch patch -P0 also this article. The guide assumes that you use patched Electrum from now on.
  3. Run the patched Electrum and catch up with your wallets you want to claim (the wallets can and rather should be watch only, or on ledgetrezor, otherwise your keys are exposed). Now go offline or set localhost as your server that Electrum connects to so no connection is performed. It's required so Electrum will not update the wallet after you edit it.
  4. You can manually create a transaction from the command line but you can use Electrum GUI. You need to locate the wallet file and remove all the transactions from the wallet file except for the one that funds the address you want to claim (the wallet obviously must not be encrypted but for watch-only this is OK). This is tricky. You need to make sure, you gave a proper JSON file, so all the final commas must be dropped. So "addr_history":, "transactions": , "tx_fees":, "txi", "txo", and "verified_tx3": should only contain the funding transaction(s), i.e. the one that you want to spend from.
  5. Run Electrum and check if the wallet is OK. Electrum will show an error if not. You will probably make a few errors so go back to editing the wallet.
  6. Download SBTC bitcoin core clone. git clone https://github.com/superbitcoin/SuperBitcoin
  7. Compile it and let it sync the blockchain (it will take a long time). Run it it with as large -dbcache= as you can. If you have a Bitcoin blockchain you can copy the blocks up to the fork date and issue sbtcd with -reindex. It will just reindex them and it will be faster.
  8. Generate a sbtc address with sbtc-cli getnewaddress. You can skip this step and send directly to an exchange but this intermediate step is safer.
  9. Create a transaction in Electrum to this address. Select all the bitcoins and use as small fee as possible (SBTC blocks are empty so any fee above 1 SBTCsat/byte should be OK).
  10. Save the transaction to a pendrive
  11. Download and install Kubuntu 16.04 (Kubuntu has all the QT libraries for Electrum) on a pen drive.
  12. Copy patched Electrum and the save the transaction to a pen drive (separate from Kubuntu will be more convenient).
  13. Run Kubuntu from the USB without any network access. Run Electrum from the pendrive. Create a wallet from the seed or private keys. The wallets are stored in RAM so after you reboot the computer, they will be gone. Load the transaction, sign it and save it to the pen drive.
  14. Go back to the SBTC Core on the online machine. Display the raw transaction (starts with the hex=). Check in the SBTC Core if it is correct sbtc-cli decoderawtransaction hex
  15. If it looks fine (and your blockchain got synced), broadcast it sbtc-cli sendrawtransaction hex
If there is no error, congratulations, you sent the transaction to the specified address. If it is to your SBTC Core wallet, wait until it confirms and send it further with sbtc-cli setfee feeperkb sbtc-cli sendtoaddress "addr" value "" "" true true
I'm going to update this guide when I figure out the BCD transactions intrinsics. You can download and run the BitcoinDiamond Core clone in the meantime.
SBTC tips: 1KjuY8CTrwMhdLt3uF3hCcSgfkHMyo1ELf
submitted by PVmining to BitcoinAirdrops [link] [comments]

Inadvisably small full node config

Disclaimer: As the subject implies, this is about an inadvisable config. The following is of zero practical use, but like cross-stitch, may be appealing to the random few people interested in such things. Opinions on the futility of this exercise can be considered already noted. Any suggestions to make this more ridiculously small are very welcome. Obviously I'm not running my primary wallet off of this config. It's just for fun.
TLDR: Wow look, my full node fit on a 0.5 CPU with 0.6 GB memory and 25 GB drive... yeah for me!

Background

I used to run a full node a good ways back, but stopped when the old 3rd string laptop I was using to run it was having drive issues. Still the early interest paid dividends as the price has gone exponential. Missing the good ol' days, I wanted to run another node, but really didn't want to do it on any of my work or lab units. My company took a hard stand years ago to prevent interns from mining on spare HW, so running even a full node on my corporate gear is kinda a capitol punishment. Round about this time, I got some spam for some free VPS service for a year. The promotion were really (I mean really wimpy VPSs). Crappy VPS + bitcoind performance tuning = my kind of waste of time.

Goal

My goal (perverse though it may be), is to get bitcoin or other forks running in very small VPSs. Maybe some of the tuning parameters could be used for a docker container or some whipy SOC. The system I was targeting has 0.5 CPU, 0.6 GB of memory and 25 GB of disk.

Observations

I found some interesting things out along the way that may be of interest to people tweeking bitcoind.

dbcache limits

Since I don't have the requisite memory required to run the node, I've limited memory using the dbcache parameter. Settings range from 100 to 150 depending on what other settings I have in place.

0.15.1 mallocs

I don't know what changed in 0.15.1 but it seems much more memory hungry than previous releases. Throughout the tuning process, I continually had either bitcoind quit due to memory allocation failures (logged in debug.log), or the kernel oom_killer take maters into its own hands (logged in /valog/syslog). This looks very similar to an issue that was logged against 0.14.0 that was patched in 0.14.1. My ultimate solution was to downgrade to 0.14.2 which seems to work great.

prune compromise

My initial thoughts were to use prune=550 to use the least amount of disk space possible. I found out that even on 0.14.2 this causes memory to fill up quick. I found making the pruning less aggressive with a setting of prune=10240 seems to be a good compromise for what I need done. This could possibly be an observation error, but the results seemed very reproducable.

blocksonly avoidance

I had thought to save some memory by using blocksonly. For some reason, on 0.14.2, this causes more problems than it solves. I had a hard time finding any config where blocksonly would work. Surprisingly, maxmempool=5 does effectively the same thing for the miserly cost of 5MiB of memory.

serial consoles

Seems ridiculous, but on my VPS, if bitcoind was running full speed, I would have a hard time connecting through SSH. There were other SSH clients and connection methods that seemed to work better. By far the quickest connections when under heavy utilization was to connect directly to serial ports. I wrote a small snippet to enable extended serial console on my systemd install.

canary log

Since logging into my system gobbles up memory, I wanted this config to be as low-touch as possible once in motion. After tooling up the serial ports, I found all the system log messages where peekable without logging into my VPS through my VPS provider. I wrote a small canary script to simply chirp to the serial port every 5 minutes to confirm that bitcoind was indeed alive and kicking.

Scripts

I made a few scripts during the process as the needs arose. They are very utilitarian, and could do with some major overhauls, but they did what I needed done at the time I needed it.
Scripts:

Final config

Here is my final config, that is still syncing, but seems to be stable on 0.14.2
/usbin/nice -n 15 bitcoind \ -dbcache=115 \ -prune=10240 \ -maxmempool=5 \ -daemon /usbin/nohup $HOME/canary.sh $1 300 $USER >/dev/null 2>/dev/null & cPid=$! sudo /usbin/renice -n -5 -p $cPid echo "Canary @ $cPid" 
Memory utilization while syncing seems to be at about 400MiB. Once I'm synced, I expect to retune for dbcache=60 and maxmempool=60.
Projected full blockchain sync completion in (gulp) 30 days. CPU utilization is currently reported between 30-60% but my provider offers boost periods where they unmeeter the VMs. I've gotten it up to 110% on their dashboard, for what its worth.
I'm well beyond the word limit so I'll drop off here, but I'll eventually put the snipits in a github repo in the near future.
PS If anyone knows of some free VPS or Docker hosting services, please chime in.
EDIT: s/VSP/VPS/g - lysdexia
submitted by brianddk to Bitcoin [link] [comments]

A simple guide to financial sovereignty (set up your Bitcoin fullnode)

In 2009, a 9 pages white paper by satoshi Nakamoto described a protocol that made central banking obselete. It's a new paradigm where monney is no longer controlled by a few, but by the whole network.
The shift is already happening, as we speak, even if it's hard to see, especially if you lack the fundamental knowledege of cryptoghraphy, game theory and economics. It's just a matter of time before you realize that Bitcoin is hard money, and for the first time we have a framework to apply austrian economics, without permission. Time to reset the keynesian monopoly game.
I don't think people are inherently bad, it's just that in the actual system (which I call the legacy system) people are incentivised to make decisions that are good from their individual perspective, but unfortunately, the sum of those individual decisions are bad from the collective group perspective. That's just plain simple game theory. What makes Bitcoin so special is it's perfectly aligned set of incentives that makes individuals and collectives outcomes better. It switches the economic model from keynesian to austrian, inflation to deflation, spending to saving, modern slavery (throught debt) to financial sovereingty, de-evolution to evolution. We are currently shifting from fiat to Bitcoin.
What you think capitalism is has nothing to do with what Capitalism really is in a free market. Capitalism is beautiful, it's simply the act of evolution, saving and optimising for consumming only what's needed (don't forget with live in a world with limited ressources, yes we all forgot). Stop spending and start capitalising, that's what we should be doing. But it's near impossible in a world run by socialists imposing debt using violence. What do you think back the US dollar ? gold ? no no, only tanks, aircraft carriers, soldiers and corrupt politicians.
Our only way out of this madness with the minimum violence is Bitcoin.
To be clear, if you dont run a fullnode, then you don't validate the transactions yourself (which is one purpose of running a fullnode). If you don't do the job yourself, then you have no other choice then to trust someone else for it. That's not necesserely a bad thing, as long as you are aware of it. You have no say in what defines Bitcoin, you enforce no rules. You serve no purpose in the Bitcoin realm. Why not !
Now if you seek financial sovereignty and want to take part in the new money paradigm, you will need to operate a fullnode and get your hands a little dirty. This guide hopefuly will take you there while walking you through the steps of setting up your autonomous Bitcoin Core full node.
Why Bitcoin Core ? simply because the Bitcoin core client implement and enforce the set of rules that I myself define as being Bitcoin.

Prerequis

install

Choose & download the latest binaries for your platform directly from github: https://bitcoincore.org/bin/bitcoin-core-0.16.2
at the time of writing, the latest bitcoin core version is 0.16.2
wget https://bitcoincore.org/bin/bitcoin-core-0.16.2/bitcoin-0.16.2-x86_64-linux-gnu.tar.gz tar -zxvf bitcoin-0.16.2-x86_64-linux-gnu.tar.gz sudo mv bitcoin-0.16.2/bin/* /uslocal/bin/ rm -rf bitcoin-0.16.2-x86_64-linux-gnu.tar.gz bitcoin-0.16.2 # clean 

firewall

Make sure the needed ports (8333, 8332) are open on your server. If you don't know, you can & should use a firewall on your server. I use ufw, which stands for uncomplicated firewall.
sudo apt install ufw # install ufw 
configure default rules & enable firewall
sudo ufw default deny incoming sudo ufw default allow outgoing sudo ufw allow ssh # if you operate your server via ssh dont forget to allow ssh before enabling sudo ufw enable 
Once your firewall is ready, open the bitcoin ports :
sudo ufw allow 8333 # mainnet sudo ufw allow 8332 # mainnet rpc/http sudo ufw allow 7000 # netcat transfert (for trusted sync) 
check your firewall rules with sudo ufw status numbered

init

Start bitcoind so that it create the initial ~/.bitcoin folder structure.
bitcoind& # launch daemon (the & run the copmmand in the background) bitcoin-cli stop # stop the daemon once folder structure is created 

config

In my case, for a personnal fullnode, I want to run a full txindexed chain. We only live once and i want all options to be possible/available :) If you plan to interact with the lightning network in the future and want to stay 100% trustless, I encourage you txindexing the chain (because you'll need an indexed chain). it's not hard to txindex the chain later on, but the less you touch the data, the better. so always better to start with txindex=1 if you want to go for the long run. It only adds 26Go on top of the 200Go non indexed chain. So it's worth it !
Just to get an idea of the size of the bitcoin core chain (August 23, 2018) :
network folder txindexed height size
mainnet blocks + chainstate yes 538.094 209Go + 2.7Go = 221.7
mainnet blocks + chainstate no 538.094 193Go + 2.7Go = 195.7Go
testnet blocks + chainstate yes - -
testnet blocks + chainstate no 1.407.580 20Go + 982Mo = 21Go
Create a bitcoin.conf config file in the ~/.bitcoin folder. This is my default settings, feel free to adjust to your need. [ see full config Running Bitcoin - Bitcoin Wiki ]
# see full config here https://en.bitcoin.it/wiki/Running_Bitcoin # Global daemon=1 txindex=1 rpcallowip=0.0.0.0/0 # bind network interface to local only for now server=1 rest=1 # RPC rpcport=8332 rpcuser=admin rpcpassword=password # define a password rpcworkqueue=100 # zmq zmqpubrawblock=tcp://*:8331 zmqpubrawtx=tcp://*:8331 #zmqpubhashblock=tcp://*:8331 #zmqpubhashtx=tcp://*:8331 # numbers of peers. default to 125 maxconnections=10 # utxo cache. default to 300M dbcache=100 # Spam protection limitfreerelay=10 minrelaytxfee=0.0001 

Sync the blockchain

There are 2 ways you can donwload/sync the bitcoin blochain :

Network sync (default)

If this is the first time you are setting up a bitcoin full node, it's the only way to trust the data. It will take time, depending on your hardware and network speed, it could vary from hours to days. You have nothing to do but leave the bitcoind daemon running. check status with bitcoin-cli getblockchaininfo, kill daemon with bitcoin-cli stop.
Remember that this is the only procedure you should use in order to sync the blockchain for the first time, as you don't want to trust anyone with that data except the network itself.

Trusted sync

Skip this chapter if this is the first you're setting up a full node.
Once you operate a fully "network trusted" node, if you'd like to operate other nodes, syncing them from your trusted node(s) will go much faster, since you simply have to copy the trusted data from server to server directly, instead of going throught the bitcoin core network sync.
You will need to transfer the chainstate & blocks directory from the ~/.bitcoin folder of one of your trusted node to the new one. The way you achieve that transfer is up to you.
At the time of writing (August 23, 2018), the txindexed blockchain (chainstate + blocks up to height 538.094) is around 220Go. Moving that quantity of data over the network is not a trivial task, but if the transfer happens between 2 reliable servers, then netcat will be great for the job. (netcat sends raw tcp packets, there is no authentification or resume feature).
Note: with netcat, if one of the servers connection is not stable, and you lose connection, you will have to start again. that's a bummer. in that case you are better of with tools like rsync or rcp that let you resume a transfer.
In order to make the transfer a simple task, make sure you do the following on both of the receiver and the sender server :
Once both your servers (receiver & sender) are netcat ready, proceed as follow :
This is the transfer times for my last data sync between 2 servers hosted at time4vps.eu (not too bad) | folder | size | transfer time | - | - | - | blocks | 209Go | 5h20 | chainstate | 2.7Go | 4min

bitcoind as a service

For ease of use and 100% uptime, simply add bitcoind to your system service manager (in my case systemd) create the file /etc/systemd/system/bitcoind.service and add the following to it :
[Unit] Description=Bitcoin daemon After=network.target [Service] User=larafale RuntimeDirectory=bitcoind Type=forking ExecStart=/uslocal/bin/bitcoind -conf=/home/larafale/.bitcoin/bitcoin.conf ExecStop=/uslocal/bin/bitcoin-cli stop KillMode=process Restart=always RestartSec=120 TimeoutSec=240 # Hardening measures #################### # Provide a private /tmp and /vatmp. PrivateTmp=true # Mount /usr, /boot/ and /etc read-only for the process. ProtectSystem=full # Disallow the process and all of its children to gain # new privileges through execve(). NoNewPrivileges=true # Use a new /dev namespace only populated with API pseudo devices # such as /dev/null, /dev/zero and /dev/random. PrivateDevices=true # Deny the creation of writable and executable memory mappings. MemoryDenyWriteExecute=true [Install] WantedBy=multi-user.target 
Don't forget to correct the user name & the bitcoin.conf path. Once the systemd bitcoind config file is created, reload system services and start the bitcoind service:
sudo systemctl daemon-reload # reload new services sudo systemctl enable bitcoind # enable bitcoind sudo systemctl start bitcoind # start bitcoind sudo systemctl status bitcoind # check bitcoind status 
If everything worked, status should output the following:
● bitcoind.service - Bitcoin daemon Loaded: loaded (/etc/systemd/system/bitcoind.service; enabled; vendor preset: enabled) Active: active (running) since jeu. 2018-08-23 21:17:41 CEST; 5s ago Process: 5218 ExecStart=/uslocal/bin/bitcoind -conf=/home/larafale/.bitcoin/bitcoin.conf (code=exited, status=0/SUCCESS) Main PID: 5219 (bitcoind) CGroup: /system.slice/bitcoind.service └─5219 /uslocal/bin/bitcoind -conf=/home/larafale/.bitcoin/bitcoin.conf 
The bitcoind service is active and will automatically restart on statup/crash. Wait a couple minutes until the bitcoin-cli getblockchaininfo command returns the chain status. You can also query the rest interface by opening http://nodeIP:8332/rest/chaininfo.json in your browser.

Conclusion

You now have a full Bitcoin core node running on it's own. What's next ? Well I never blogged before, this is the first time I am outsourcing some of my work. I'm a passionnate enginner working on all kind of technologies. I've been dedicating half of my time to Bitcoin for the last 2 years already, so if this guide was usefull and want to go deeper , just let me know, depending on the feedback I get, i'll consider outsourcing more interesting work. For example next post could be about setting up an Electrum Server so you can safely use SPV wallets trusting your own fullnode.
Also I'm currently working on a trustless bitcoin payment processor called 8333, make sure you follow @_8333_ on twitter. I think I will release the project end of 2018. Ping me if interested.
The best way you can show support is via Bitcoin : 16FKGPiivpo3Z7FFPLdkoVRcV2ASBc7Ktu
submitted by larafale to Bitcoin [link] [comments]

Speeding up Bitcoin Core sync? (gigabit internet, solid state drive, 32GB RAM, Overclocked Intel 7700K)

I have been researching about speeding up the sync of my bitcoin core wallet, but haven't found a solution, and not sure what is currently binding my speeds.
I have set dbcache to 8000, and made sure port 8333 is open. I am on gigabit internet, but I am only pulling around 80-100mbs.
My CPU is around 25% utilized, and bitcoin core is only using 600mb of ram. Disk usage is around 1%.
Are there any additional options I can add to speed up the sync? Was hoping to really max out the connection for this, it's currently estimating days to sync, around 1% per hour.
submitted by how2s101 to Bitcoin [link] [comments]

Bitcoin Core 0.11.0 released | Wladimir J. van der Laan | Jul 12 2015

Wladimir J. van der Laan on Jul 12 2015:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Bitcoin Core version 0.11.0 is now available from:
<https://bitcoin.org/bin/bitcoin-core-0.11.0/>
This is a new major version release, bringing both new features and
bug fixes.
Please report bugs using the issue tracker at github:
<https://github.com/bitcoin/bitcoin/issues>
The entire distribution is also available as torrent:
magnet:?xt=urn:btih:82f0d2fa100d6db8a8c1338768dcb9e4e524da13&dn;=bitcoin-core-0.11.0&tr;=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr;=udp%3A%2F%2Ftracker.publicbt.com%3A80%2Fannounce&tr;=udp%3A%2F%2Ftracker.ccc.de%3A80%2Fannounce&tr;=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr;=udp%3A%2F%2Fopen.demonii.com%3A1337&ws;=https%3A%2F%2Fbitcoin.org%2Fbin%2F 
Upgrading and downgrading

How to Upgrade
If you are running an older version, shut it down. Wait until it has completely
shut down (which might take a few minutes for older versions), then run the
installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or
bitcoind/bitcoin-qt (on Linux).
Downgrade warning
Because release 0.10.0 and later makes use of headers-first synchronization and
parallel block download (see further), the block files and databases are not
backwards-compatible with pre-0.10 versions of Bitcoin Core or other software:
  • Blocks will be stored on disk out of order (in the order they are
received, really), which makes it incompatible with some tools or
other programs. Reindexing using earlier versions will also not work
anymore as a result of this.
  • The block index database will now hold headers for which no block is
stored on disk, which earlier versions won't support.
If you want to be able to downgrade smoothly, make a backup of your entire data
directory. Without this your node will need start syncing (or importing from
bootstrap.dat) anew afterwards. It is possible that the data from a completely
synchronised 0.10 node may be usable in older versions as-is, but this is not
supported and may break as soon as the older version attempts to reindex.
This does not affect wallet forward or backward compatibility. There are no
known problems when downgrading from 0.11.x to 0.10.x.
Important information

Transaction flooding
At the time of this release, the P2P network is being flooded with low-fee
transactions. This causes a ballooning of the mempool size.
If this growth of the mempool causes problematic memory use on your node, it is
possible to change a few configuration options to work around this. The growth
of the mempool can be monitored with the RPC command getmempoolinfo.
One is to increase the minimum transaction relay fee minrelaytxfee, which
defaults to 0.00001. This will cause transactions with fewer BTC/kB fee to be
rejected, and thus fewer transactions entering the mempool.
The other is to restrict the relaying of free transactions with
limitfreerelay. This option sets the number of kB/minute at which
free transactions (with enough priority) will be accepted. It defaults to 15.
Reducing this number reduces the speed at which the mempool can grow due
to free transactions.
For example, add the following to bitcoin.conf:
minrelaytxfee=0.00005 limitfreerelay=5 
More robust solutions are being worked on for a follow-up release.
Notable changes

Block file pruning
This release supports running a fully validating node without maintaining a copy
of the raw block and undo data on disk. To recap, there are four types of data
related to the blockchain in the bitcoin system: the raw blocks as received over
the network (blk???.dat), the undo data (rev???.dat), the block index and the
UTXO set (both LevelDB databases). The databases are built from the raw data.
Block pruning allows Bitcoin Core to delete the raw block and undo data once
it's been validated and used to build the databases. At that point, the raw data
is used only to relay blocks to other nodes, to handle reorganizations, to look
up old transactions (if -txindex is enabled or via the RPC/REST interfaces), or
for rescanning the wallet. The block index continues to hold the metadata about
all blocks in the blockchain.
The user specifies how much space to allot for block & undo files. The minimum
allowed is 550MB. Note that this is in addition to whatever is required for the
block index and UTXO databases. The minimum was chosen so that Bitcoin Core will
be able to maintain at least 288 blocks on disk (two days worth of blocks at 10
minutes per block). In rare instances it is possible that the amount of space
used will exceed the pruning target in order to keep the required last 288
blocks on disk.
Block pruning works during initial sync in the same way as during steady state,
by deleting block files "as you go" whenever disk space is allocated. Thus, if
the user specifies 550MB, once that level is reached the program will begin
deleting the oldest block and undo files, while continuing to download the
blockchain.
For now, block pruning disables block relay. In the future, nodes with block
pruning will at a minimum relay "new" blocks, meaning blocks that extend their
active chain.
Block pruning is currently incompatible with running a wallet due to the fact
that block data is used for rescanning the wallet and importing keys or
addresses (which require a rescan.) However, running the wallet with block
pruning will be supported in the near future, subject to those limitations.
Block pruning is also incompatible with -txindex and will automatically disable
it.
Once you have pruned blocks, going back to unpruned state requires
re-downloading the entire blockchain. To do this, re-start the node with
  • -reindex. Note also that any problem that would cause a user to reindex (e.g.,
disk corruption) will cause a pruned node to redownload the entire blockchain.
Finally, note that when a pruned node reindexes, it will delete any blk???.dat
and rev???.dat files in the data directory prior to restarting the download.
To enable block pruning on the command line:
  • - -prune=N: where N is the number of MB to allot for raw block & undo data.
Modified RPC calls:
    • getblockchaininfo now includes whether we are in pruned mode or not.
    • getblock will check if the block's data has been pruned and if so, return an
error.
  • - getrawtransaction will no longer be able to locate a transaction that has a
UTXO but where its block file has been pruned.
Pruning is disabled by default.
Big endian support
Experimental support for big-endian CPU architectures was added in this
release. All little-endian specific code was replaced with endian-neutral
constructs. This has been tested on at least MIPS and PPC hosts. The build
system will automatically detect the endianness of the target.
Memory usage optimization
There have been many changes in this release to reduce the default memory usage
of a node, among which:
    • Accurate UTXO cache size accounting (#6102); this makes the option -dbcache
    precise where this grossly underestimated memory usage before
    • Reduce size of per-peer data structure (#6064 and others); this increases the
    number of connections that can be supported with the same amount of memory
    • Reduce the number of threads (#5964, #5679); lowers the amount of (esp.
    virtual) memory needed
Fee estimation changes
This release improves the algorithm used for fee estimation. Previously, -1
was returned when there was insufficient data to give an estimate. Now, -1
will also be returned when there is no fee or priority high enough for the
desired confirmation target. In those cases, it can help to ask for an estimate
for a higher target number of blocks. It is not uncommon for there to be no
fee or priority high enough to be reliably (85%) included in the next block and
for this reason, the default for -txconfirmtarget=n has changed from 1 to 2.
Privacy: Disable wallet transaction broadcast
This release adds an option -walletbroadcast=0 to prevent automatic
transaction broadcast and rebroadcast (#5951). This option allows separating
transaction submission from the node functionality.
Making use of this, third-party scripts can be written to take care of
transaction (re)broadcast:
    • Send the transaction as normal, either through RPC or the GUI
    • Retrieve the transaction data through RPC using gettransaction (NOT
    getrawtransaction). The hex field of the result will contain the raw
    hexadecimal representation of the transaction
    • The transaction can then be broadcasted through arbitrary mechanisms
    supported by the script
One such application is selective Tor usage, where the node runs on the normal
internet but transactions are broadcasted over Tor.
For an example script see [bitcoin-submittx](https://github.com/laanwj/bitcoin-submittx).
Privacy: Stream isolation for Tor
This release adds functionality to create a new circuit for every peer
connection, when the software is used with Tor. The new option,
-proxyrandomize, is on by default.
...[message truncated here by reddit bot]...
original: http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-July/009400.html
submitted by bitcoin-devlist-bot to bitcoin_devlist [link] [comments]

Bitcoin Core 0.13.0 release candidate 2 available | Wladimir J. van der Laan | Jul 31 2016

Wladimir J. van der Laan on Jul 31 2016:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Binaries for bitcoin Core version 0.13.0rc2 are available from:
https://bitcoin.org/bin/bitcoin-core-0.13.0/test.rc2/ 
Source code can be found on github under the signed tag
https://github.com/bitcoin/bitcoin/tree/v0.13.0rc2 
This is a release candidate for a new major version release, bringing new
features, bug fixes, as well as other improvements.
Preliminary release notes for the release can be found at
https://github.com/bitcoin/bitcoin/blob/0.13/doc/release-notes.md 
Release candidates are test versions for releases. When no critical problems
are found, this release candidate will be tagged as 0.13.0.
Please report bugs using the issue tracker at github:
https://github.com/bitcoin/bitcoin/issues 
Notable changes since rc1:

Build system

GUI

Wallet

P2P protocol and network code

Consensus

Mining

Block and transaction handling

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBCgAGBQJXngBiAAoJEHSBCwEjRsmmS5kIAMFiXFua9ruR8Vwu1fNgnWTb
X4tsNOdPScm7jwsFavcwygqZQlDNDURjcocQFcehHgEickBrk6eaplTuB4VJidPG
Aqw+nLrd6M//Ohy+7eke7aCg5/QV7poplM3glwow4gQfoSBvL0ywMEhWEzGL7EPH
FH5pyY9o4QZw5wGdvMWxvYVTLPZkm0W2cSWCHZ0WgzWvTkZ7aMzSQ5F5TXPfjzED
DNuQQRMm9H1H3LJkmWAwjCXLzKNMzjmefLujyEII388s6UoWnA1ufosqb1kMqL+h
kuEelzef4cMBZEvHgfzsvlLmba2DLr7xhwudd3HK2NHSmO/wAUdhbQOQSts9NoY=
=rN68
-----END PGP SIGNATURE-----
original: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-July/012916.html
submitted by dev_list_bot to bitcoin_devlist [link] [comments]

Clearing up some misconceptions about full nodes | Chris Belcher | Feb 10 2016

Chris Belcher on Feb 10 2016:
I've been asked to post this to this mailing list too. It's time to
clear up some misconceptions floating around about full nodes.
=== Myth: There are only about 5500 full nodes worldwide ===
This number comes from this and similar sites: https://bitnodes.21.co/
and it measured by trying to probe every nodes on their open ports.
Problem is, not all nodes actually have open ports that can be probed.
Either because they are behind firewalls or because their users have
configured them to not listen for connections.
Nobody knows how many full nodes there are, since many people don't know
how to forward ports behind a firewall, and bandwidth can be costly, its
quite likely that the number of nodes with closed ports is at least
another several thousand.
Nodes with open ports are able to upload blocks to new full nodes. In
all other ways they are the same as nodes with closed ports. But because
open-port-nodes can be measured and closed-port-nodes cannot, some
members of the bitcoin community have been mistaken into believing that
open-port-nodes are that matters.
=== Myth: This number of nodes matters and/or is too low. ===
Nodes with open ports are useful to the bitcoin network because they
help bootstrap new nodes by uploading historical blocks, they are a
measure of bandwidth capacity. Right now there is no shortage of
bandwidth capacity, and if there was it could be easily added by renting
cloud servers.
The problem is not bandwidth or connections, but trust, security and
privacy. Let me explain.
Full nodes are able to check that all of bitcoin's rules are being
followed. Rules like following the inflation schedule, no double
spending, no spending of coins that don't belong to the holder of the
private key and all the other rules required to make bitcoin work (e.g.
difficulty)
Full nodes are what make bitcoin trustless. No longer do you have to
trust a financial institution like a bank or paypal, you can simply run
software on your own computer. To put simply, the only node that matters
is the one you use.
=== Myth: There is no incentive to run nodes, the network relies on
altruism ===
It is very much in the individual bitcoin's users rational self interest
to run a full node and use it as their wallet.
Using a full node as your wallet is the only way to know for sure that
none of bitcoin's rules have been broken. Rules like no coins were spent
not belonging to the owner, that no coins were spent twice, that no
inflation happens outside of the schedule and that all the rules needed
to make the system work are followed (e.g. difficulty.) All other kinds
of wallet involve trusting a third party server.
All these checks done by full nodes also increase the security. There
are many attacks possible against lightweight wallets that do not affect
full node wallets.
This is not just mindless paranoia, there have been real world examples
where full node users were unaffected by turmoil in the rest of the
bitcoin ecosystem. The 4th July 2015 accidental chain fork effected many
kinds of wallets. Here is the wiki page on this event
https://en.bitcoin.it/wiki/July_2015_chain_forks#Wallet_Advice
Notice how updated node software was completely unaffected by the fork.
All other wallets required either extra confirmations or checking that
the third-party institution was running the correct version.
Full nodes wallets are also currently the most private way to use
Bitcoin, with nobody else learning which bitcoin addresses belong to
you. All other lightweight wallets leak information about which
addresses are yours because they must query third-party servers. The
Electrum servers will know which addresses belong to you and can link
them together. Despite bloom filtering, lightweight wallets based on
BitcoinJ do not provide much privacy against nodes who connected
directly to the wallet or wiretappers.
For many use cases, such privacy may not be required. But an important
reason to run a full node and use it as a wallet is to get the full
privacy benefits.
=== Myth: I can just set up a node on a cloud server instance and leave
it ===
To get the benefits of running a full node, you must use it as your
wallet, preferably on hardware you control.
Most people who do this do not use a full node as their wallet.
Unfortunately because Bitcoin has a similar name to Bittorrent, some
people believe that upload capacity is the most important thing for a
healthy network. As I've explained above: bandwidth and connections are
not a problem today, trust, security and privacy are.
=== Myth: Running a full node is not recommended, most people should use
a lightweight client ===
This was common advice in 2012, but since then the full node software
has vastly improved in terms of user experience.
If you cannot spare the disk space to store the blockchain, you can
enable pruning as in:
https://bitcoin.org/en/release/v0.11.0#block-file-pruning. In Bitcoin
Core 0.12, pruning being enabled will leave the wallet enabled.
Altogether this should require less than 1.5GB of hard disk space.
If you cannot spare the bandwidth to upload blocks to other nodes, there
are number of options to reduce or eliminate the bandwidth requirement
found in https://bitcoin.org/en/full-node#reduce-traffic . These include
limiting connections, bandwidth targetting and disabling listening.
Bitcoin Core 0.12 has the new option -blocksonly, where the node will
not download unconfirmed transaction and only download new blocks. This
more than halves the bandwidth usage at the expense of not seeing
unconfirmed transactions.
Synchronizing the blockchain for a new node has improved since 2012 too.
Features like headers-first
(https://bitcoin.org/en/release/v0.10.0#faster-synchronization) and
libsecp256k1 have greatly improved the initial synchronization time.
It can be further improved by setting -dbcache=6000 which keeps more of
the UTXO set in memory. It reduces the amount of time reading from disk
and therefore speeds up synchronization. Tests showed that the entire
blockchain can now be synchronized in less than 3 and a half hours
(See
https://github.com/bitcoin/bitcoin/pull/6954#issuecomment-154993958)
Note that you'll need Bitcoin Core 0.12 or later to get all these
efficiency improvements.
=== How to run a full node as your wallet ===
I think every moderate user of bitcoin would benefit by running a full
node and using it as their wallet. There are several ways to do this.
(https://bitcoinarmory.com/) or JoinMarket
(https://github.com/AdamISZ/JMBinary/#jmbinary)
Multibit connecting only to your node running at home, Electrum
connecting only to your own Electrum server)
So what are you waiting for? The benefits are many, the downsides are
not that bad. The more people do this, the more robust and healthy the
bitcoin ecosystem is.
original: http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-February/012435.html
submitted by dev_list_bot to bitcoin_devlist [link] [comments]

[Informational] [CC0] Keeping Bitcoin Peer to Peer

The purpose of full nodes in the Bitcoin network is manifold. They exist as sovereign arbiters of the true state of the currency, they welcome new entrants into the network by sharing the history of the shared ledger, and they work together to spread new transactions to every corner of the earth.
There are many ways to use Bitcoin that do not require the use of a full node, however a full node describes something that offers the best level of security and privacy. As long as it is practical to use a full node, it's strongly suggested that one be used.
The precautionary suggestion to use a full node is one in which the user must be proactive about their own safety. The safety recommendation is analogous to wearing a seat belt in a car, or using a prophylactic device in an amorous encounter. Following a general guideline for safety that incurs some unwanted cost might not be immediately obvious, but on sober reflection of all the risks ignoring the guideline can be seen to be a mistake.

Strength in Numbers

The link between Bitcoin's health and the health of the full node peer to peer network is often stated. This is because a distributed network of redundant peers is seen as the most durable configuration possible. Thousands upon thousands of full nodes give strength to the network through herd protection. To sever a geographic link to the network, every node in the geographic area would have to be terminated, even a single remaining node could bridge the replication gap. It is seen that every additional user running a node translates to another brick in the wall keeping the network alive.
It's hard to determine the exact number of nodes on the network at any given time, because the network is designed to be distributed and decentralized, with each node giving thought only to its connected peer nodes and not the greater network. Despite this design, services exist to attempt to map the nature of the network by deliberately attempting to connect to as many peers as possible. These services are easily misled by fake nodes, and they cannot easily connect to the vast majority of nodes behind firewalls or with other limiting factors, so their published data must be treated as suspect.

Node Cooperative Contribution

Nodes in the network act in a peer to peer way, meaning that they act as servers and clients. Acting as a client is a baseline requirement for every node, however some nodes can limit the ways in which they act as servers, to limit their costs or for other reasons. In a network of full nodes, the level of server-like nodes is not important beyond a certain degree due to the great level of redundancy and the low demands full nodes place on the network. Just like almost any server and client split network topology, clients may outnumber servers greatly without any ill effects.
There are a variety of methods in which a node may act as a server: relaying transactions and blocks, catching up other nodes on Blockchain history, helping peer discovery. Generally speaking, contributory full nodes service two types of clients: other full nodes, and light clients.
A full node server serving other full nodes generally speaking has very light requirements. Full nodes have very limited demands because they only require a tiny differential sync from their current state. This differential sync cost is easily covered by the altruism of other nodes, in a model generally seen as sustainable to a large degree.
A full node servicing light clients, also known as SPV clients, has a much more costly set of requirements. Light clients cannot query their own local data set and thus require syncs tasks which carry a high marginal cost in both networking and system resources. Covering this cost through generalized altruism is not seen as sustainable, so most light clients have moved to a model of querying more formalized servers instead of the network at large.

Full Nodes Promote Privacy

An important element of Bitcoin as a unit of account and a convenient medium of exchange is that every single unit of Bitcoin is equivalent to every other unit. If some coins became more valuable than other coins, despite their face value, it would make for a confusing and therefore lower utility experience in exchanging them.
Unfortunately, Bitcoins are implemented in such a way that every Bitcoin balance is accompanied by a wealth of metadata relating to its origin. This represents a risk to every unit being exchangeable for every other unit, also known as the fungibility of the currency. Coin metadata represents a risk to the coin owner's privacy that can have unwanted negative secondary consequences, such as being accused of being linked to a theft through the web of transactions.
Full nodes uniquely help the network and the user from this negative privacy outcome by carefully protecting the metadata surrounding balances and transactions. In wallets that do not sync the entire Blockchain, they must query outside third parties for information about the funds they control. This querying represents a leak of information: information that can link multiple addresses together, can link Bitcoin addresses to IP addresses, funds to identities and actions that tar the theoretically neutral value tokens with a harmful history of their use.
Bitcoin full nodes can even take obscuring metadata one step further, severing even the link of IP address to Bitcoin full node and transaction relaying by automatically detecting a local Tor connection and then rerouting connections using Tor to provide for the privacy of the node.

Full Node Validation Security

The security of a user's funds and exchanges using Bitcoin is guarantees by a set of rules that govern how Bitcoin works. These rules describe things like the total possible number of coins in the system, or the coin limit, which promotes the utility of Bitcoin as a scarce tradable commodity. People are incentivized to use full nodes to remove their risk of these rules being broken, and this also serves to limit the impact of rule breaking: validating nodes will refuse to relay and spread invalid data.
Other notable rules are the subsidy schedule, which describes how quickly the currency can be minted, double spending, which prevents a user from spending the same funds in two places, signature validation, which prevents unauthorized users from spending others' funds, the block size limit which promotes network durability by preventing network denial of service deliberately or indirectly, and Bitcoin script execution, which evaluates intelligent rules for spending coins, like the CLTV which prevents funds from being spent until a certain time.
The validation that a full node performs is complete and total. Every single piece of data supplied by a third party is checked, so that even if all information a full node receives is supplied by a malicious attacker, they cannot create any negative results by manipulating the supplied data. The one exception to this rule is a situation in which the full node itself is running on a compromised platform. Therefore it is considered that the most secure practice for using Bitcoin is to only run a Bitcoin node on a platform known to be secure: third party platforms like cloud services where trust is an unknown factor are not recommended.
Due to the stringent checks performed by full nodes rule violations are few and far between. However rule violations, even by miners, are not unknown, for example in July of 2015 invalid blocks were published to the network in multiple incidents. This proves in practice what is obvious in theory: data from third parties, even miners who are strongly incentivized to publish valid data, can at times be invalid, either maliciously or through simple error. A full node's validation mechanisms will automatically ignore invalid data from any source, even a miner, unlike many alternatives to a full node that offer reduced levels of validation.

Full Node Code Security

When selecting a wallet, important consideration should be given to the authorship of the wallet. Is the wallet open source? Has the code been reviewed? Has there been thorough security testing? Examining the methodology in developing and releasing a wallet can help prevent the use of malware that abscond with user funds, or buggy prototype wallets that lose coins through simple coding errors.
Bitcoin Core as the Bitcoin reference client represents a very thoroughly vetted wallet. The code produced by Bitcoin Core is seen by many eyes, the scope of the wallet is narrow and focused, the users of the wallet are wide and varied. Bitcoin Core is designed as a comprehensive client, meaning it should be seen as comprehensively reliable, and the code should be seen as thoroughly vetted and secure. These qualities help make Bitcoin Core a very attractive choice for security conscious use.

Altruism in Full Nodes

The Bitcoin network relies upon having some nodes to bear some costs without direct recompense. This mechanism generally relies upon altruism and default behavior. It's well understood that this is a weak mechanism, but realistic given a limited cost: some percentage of users of Bitcoin Core who are not inconvenienced by the limited costs of default altruism will not adjust their default settings and some percentage of Bitcoin users can be expected to even go out