What's the difference between bitcoind and bitcoin-qt

Bitcoin Developers

For programmers and developers interested in asking questions, submitting tutorials, providing notices, etc. about the technical aspects of Bitcoin.
[link]

Recompile (update) node without restarting? (maybe a question for r/linux?)

Hi, as the title asks, I'm wondering if there's been work into recompiling Bitcoin-qt (or bitcoind, really) and uupdating without restarting the node?
submitted by AltF to Bitcoin [link] [comments]

any good backup strategy for wallets?

Hello!
Man, I'm not going to live for ever. I'm just 25 years old young man, but I had outgrow that sense of immortality people have when they are adolescents (and the sooner, the better).
I have uploaded files like pictures and videos and stuff to the Internet so the rest of my family have access to that stuff that was used to be stored on my laptop's hard driver. The only thing left is backing up my Vertcoin wallet.
I really want my parents and my brothers to inherit my vertcoins in case I die, they don't have much value right now, but the coin have such technical potential that I cannot help but see its value skyrocketing in the future. In any case, what I have will help them monetarily. This means that they have to be able to access the wallet without needing to decipher it or inserting any password, but in such state, it would be a serious mistake to store in digital form.
I thought on printing the private keys where the verts are store, but after reading this (it applies to Vertcoin-qt as well, right?), well, I have my doubts that no coin will be lost.
I was thinking on a hardware wallet, man, they seems to be good, but I don't know if they are compatible with Vertcoin and besides, I would like to have something backed up for today, like, soon as possible, because death can happen to anyone in any moment and thinking you don't need to think about it until you are old is pure BS.
Any suggestions? I appreciate any insight and advice about making my backup possible.

EDIT:

Since I'm not moving my vertcoins from my wallet often (like, never), I decided to go for a paperwallet route.
submitted by shackra to vertcoin [link] [comments]

Question, I backed up my wallet about 6 months ago, since then I've done about 10 transactions and transferred the coins from one address to another within the same wallet. Will I still have my balance when I restore the wallet?

SEE UPDATE AT BOTTOM
Thank you, I think I may have messed up.
I believe I created the address and transferred my balance to that address. Then I lost my wallet. Did the address that has my balance in my wallet, even though I created it after backing it up?
After reading this, i'm not sure how this works:
The wallet contains a pool of queued keys. By default there are 100 keys in the key pool. The size of the pool is configurable using the "-keypool" command line argument. When you need an address for whatever reason (send, “new address”, generation, etc.), the key is not actually generated freshly, but taken from this pool. A brand new address is generated to fill the pool back to 100. So when a backup is first created, it has all of your old keys plus 100 unused keys. After sending a transaction, it has 99 unused keys. After a total of 100 new-key actions, you will start using keys that are not in your backup. Since the backup does not have the private keys necessary for authorizing spends of these coins, restoring from the old backup will cause you to lose Bitcoins. Creating a new address generates a new pair of public and private keys, which are added to your wallet. Each keypair is mostly random numbers, so they cannot be known prior to generation. If you backup your wallet and then create more than 100 new addresses, the keypair associated with the newest addresses will not be in the old wallet because the new keypairs are only known after creating them. Any coins received at these addresses will be lost if you restore from the backup.
UPDATE
Just got it all thank you... needed to download all the block chains to get my balance and it took a long time.
I was actually fairly confident I would get my coins back before the balance came through as I could trace which account was holding the coins using blockchain.info and doing the following:
I had the address of my first address in Bitcoin-QT, it was in my address book when I loaded the backed up wallet. I located the address on blockchain.info then followed transactions until I found an account that had a balance I recognized. Then I was able to use the debug function part of bitcoin-qt to see that I owned the public and private key in my backed up wallet. I used the following method:
-validateaddress 1BZZnJG6q95aJqPZweSCGnno2rxcXyfaLo
submitted by onowahoo to Bitcoin [link] [comments]

How can I export encrypted private keys from my cold wallet that are easy to import?

I set up a cold wallet using the reference client on an offline machine. All of the sites I read recommended simply backing up the encrypted wallet.dat file, which I did. I did a test run with 0.01 BTC and tried to recover it and it was a nightmare.
I have to do crazy things to restore using the bitcoin-qt or bitcoind client (i.e. move my old wallet.dat, then copy that one over and re-index, which on my old laptop takes literally days).
I then tried using pywallet with the correct passphrase. It dumps a thousand lines of crap along with some "Wallet data not recognized:" errors, and I assumed it wasn't working. I opened it in an editor and cut all the error lines out, and finally got it to import into blockchain.info that way, but it had 300 addresses, even though only 1 was ever used. I suppose this was my fault, I had no idea the default wallet.dat would contain so many addresses (this was all from the offline wallet that I never made a single transaction from).
What I need is something my mom can do. I'm looking for something like the encrypted backup from blockchain.info which is simple ascii text with a password. My goal is to stick this on a usb drive along with a note explaining what to do and put it in a safe deposit box. It needs to be simple enough for my mom to access if something were to happen to me (she's reasonably computer literate, but isn't going to be going and digging around moving hidden files from place to place on her computer). I'd also like the key to be encrypted so that I can make a few copies of the USB key and leave them various places. In the safe deposit box I'll also include a scrap of paper with the password, but otherwise I'll just remember the password so I can recover the coins myself in case the offline computer I'm using craps out.
Any suggestions? Sorry for the semi-rant. I really wouldn't consider myself a beginner, this is just the kind of absurdly difficult thing that scares people away. I suppose I could have used armory or something like that, but I want to understand what I'm doing and not trust any app provided by a company to do my backups.
submitted by bradfordmaster to BitcoinBeginners [link] [comments]

HOWTO: Run a Full Bitcoin Node + Armory

Estimated total time: Up to 2 hours, not including blockchain downloading.
You can install this on a VPS, a spare PC, or on your own PC. You can install it in Virtualbox on your own PC, or into Windows. If you just want to try it out, I recommend installing in Virtualbox.
  1. Download and install Virtualbox from (https://www.virtualbox.org/wiki/Downloads), and download an Ubuntu 14.04 64bit Desktop ISO from http://www.ubuntu.com/download/desktop, and follow the guide here (I recommend 2GB of RAM, 3GB if you can spare it): http://www.psychocats.net/ubuntu/virtualbox . It's a little outdated but close enough that things are the same.  
  2. After installing Ubuntu in Virtualbox, to make it fullscreen you will need Guest Additions. Run these commands by clicking on the swirl icon top right, typing ter and opening Terminal: sudo apt-get install build-essentials module-assistant and then sudo m-a prepare Before selecting Devices > Insert Guest Additions CD image, telling Ubuntu to install them, and shutting down. //Thanks go to http://www.binarytides.com/vbox-guest-additions-ubuntu-14-04 for those instructions.//  
  3. Next I went into the Virtual Machines settings and changed Network Adapter 1 to be "Attached to Bridged Network" instead of "Attached to NAT".  
  4. After booting the machine back up, I followed the steps here: https://bitcoin.org/en/full-node/#linux-instructions And installed both bitcoin-qt and bitcoind. Skip over the parts where you edit bitcoin-qt's settings to start at boot, or edit cron to start bitcoind at boot, since this will interfere with using armory.  
  5. Next I followed the instructions here to install Armory: http://bitzuma.com/posts/offline-installation-of-armory-on-tails-and-ubuntu-linux/ The reason I used these instructions was because I was having difficulty getting Armory to install (online or offline) on Ubuntu 14.04. Might just be me.  
  6. I then started up Armory in Offline Mode by clicking on the swirl icon top left and typing Armory. In the program, after clicking Skip, I scrolled down slightly, clicked on Download Bitcoin, Download, and agreed to let it do whatever it wanted to; (which was download and install Satoshi).  
  7. I then closed Armory Offline and opened Armory, which began downloading the blockchain from a torrent. I then went into File > Settings (top left of your screen, near the swirl; menu options will appear once the mouse hits that taskbar) and personally chose to Disable OS and version reporting. There is a setting here for "Enable settings for proxies/Tor" but I haven't ticked it yet, since I haven't set Tor up.  
  8. Follow the instructions here to set up port forwarding so your node is reachable, and to test this: https://bitcoin.org/en/full-node#network-configuration  
Next:
If I want to broadcast transactions over Tor, but not receive incoming connections over Tor, is that a problem for the health of the Bitcoin Tor network? Or will those transactions be broadcast out to "clearnet" nodes, as opposed to hidden ones?
Thanks to all writers of articles referenced here for your help.
By the way, even if you don't want to run a bitcoin node full time, I've read that running one even 6 hours a day is useful. These are instructions for ubuntu but you can also run it from Windows on the same machine you work on (I don't know about privacy implications). Perhaps someone should write an article about running a bitcoin node on your PC at work!
submitted by FullNodeGuide to Bitcoin [link] [comments]

Can anyone run RPC commands on my full node if I run bitcoind or bitcoin-qt connected to the internet?

Is RPC completely disabled if I don't include bitcoin.conf in my bitcoin directory, and if it's there, does bitcoind open ports automatically that allow anyone to RPC on my node?
submitted by sonkeypop to Bitcoin [link] [comments]

Can anyone run RPC commands on my full node if I run bitcoind or bitcoin-qt connected to the internet? /r/Bitcoin

Can anyone run RPC commands on my full node if I run bitcoind or bitcoin-qt connected to the internet? /Bitcoin submitted by HiIAMCaptainObvious to BitcoinAll [link] [comments]

Pledge: If the Bitcoind/Bitcoin-Qt development team attempts to change the fundamentals of the network, I will never use Bitcoind or Bitcoin-Qt again.

Signed, Howard Strong.
Anyone else?
submitted by HowardStrong45 to Bitcoin [link] [comments]

What is the stable version?

I just compiled bitcoin cash from source, version 0.21.11, and it when I do getblockchaininfo I get the warning:
"warnings": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"
So I tried with 0.21.10, 0.21.9, and even 0.21.8. They all give the same warning!
Here's what I did (on Ubuntu 20.04):
apt-get update
apt-get upgrade -y
apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev git bsdmainutils build-essential libssl-dev libevent-dev ninja-build python3 cmake libjemalloc-dev libminiupnpc-dev libdb-dev libdb++-dev libzmq3-dev -y
git clone https://github.com/Bitcoin-ABC/bitcoin-abc --branch v0.21.11 --single-branch
(cd bitcoin-abc && mkdir build && cd build && cmake -GNinja -DBUILD_BITCOIN_QT=OFF .. && ninja && strip src/bitcoind && strip src/bitcoin-cli && strip src/bitcoin-tx && ninja install)
What am I doing wrong? I am planning on mining so I am concerned by this warning.
submitted by bithire to Bitcoincash [link] [comments]

weird behavior of electrum+bitcoin-qt

past week installed the new plugin that allow me to connect my electrum wallet to bitcoin-core, i use a hardware wallet and worked like a charm.
Then today was updating the node and used bitcoin-qt instead of bitcoind and when was waiting suddendly i see some text in the gui where it says "recent transactions", and a lot of transactions where there.
Then was like WTF happened here, someone stole my btc?, or installed a compromised version of electrum(i use archlinux and install from the repos). Why some transactions where there, i neved imported my wallet to bitcoin-gui.
Inmediately deleted the wallet.dat and did the same in electrum, but my question is:
Was something imported into bitcoin-qt?, all my history was redeable from the gui, i never imported into bitcoin-qt, and as far i know the seed never leave the hardware wallet.
This is normal?, at least all my funds are still there but im really worried.
PS: everything happened with my hardwallet unplugged.
TL:DR: Connected my cold wallet to electrum(connected to bitcoind) past week, never to bitcoin-qt, today opened bitcoin-qt and all my history of transactions from my cold wallet(unplugged) was there(bitcoin-qt), is this normal?.
submitted by relgueta to Bitcoin [link] [comments]

weird behavior of electrum

past week installed the new plugin that allow me to connect my electrum wallet to bitcoin-core, i use a hardware wallet and worked like a charm.
Then today was updating the node and used bitcoin-qt instead of bitcoind and when was waiting suddendly i see some text in the gui where it says "recent transactions", and a lot of transactions where there.
Then was like WTF happened here, someone stole my btc?, or installed a compromised version of electrum(i use archlinux and install from the repos). Why some transactions where there, i neved imported my wallet to bitcoin-gui.
Inmediately deleted the wallet.dat and did the same in electrum, but my question is:
Was something imported into bitcoin-qt?, all my history was redeable from the gui, i never imported into bitcoin-qt, and as far i know the seed never leave the hardware wallet.
This is normal?, at least all my funds are still there but im really worried.
PS: everything happened with my hardwallet unplugged.
TL:DR: Connected my cold wallet to electrum(connected to bitcoind) past week, never to bitcoin-qt, today opened bitcoin-qt and all my history of transactions from my cold wallet was there(bitcoin-qt), is this normal?.
submitted by relgueta to Electrum [link] [comments]

Forgot to upgrade your node? Here's how to get back onto the upgraded BCH network:

These instructions are for those who left old versions (0.20.12 or older) of Bitcoin ABC running through the May 15th, 2020 upgrade. Follow these instructions to get back on the main network.
If you are using bitcoin-qt, follow these steps:
  1. Stop your running node
  2. Delete the list of nodes you have banned: rm ~/.bitcoin/banlist.dat
  3. Download version 0.21.x from https://download.bitcoinabc.org/latest/
  4. Start up the new version (./bin/bitcoin-qt)
  5. Open Help -> Debug window
  6. In the console type reconsiderblock 00000000000000000033dfef1fc2d6a5d5520b078c55193a9bf498c5b27530f7
  7. Wait until your node is on the correct chain. This could take some time if your old node was running for a while, and other nodes banned you on the network. You can check that you are on the correct chain by typing getblockchaininfo and verifying the information with a public block explorer such as https://explorer.bitcoin.com/bch, https://blockchair.com/bitcoin-cash, or https://cash.coin.dance/.
If you are running bitcoind, follow these steps:
  1. Stop your running node
  2. Delete the list of nodes you have banned: rm ~/.bitcoin/banlist.dat
  3. Download version 0.21.x from https://download.bitcoinabc.org/latest/
  4. Start up the new version (./bin/bitcoind)
  5. Use bitcoin-cli to type: ./bin/bitcoin-cli reconsiderblock 00000000000000000033dfef1fc2d6a5d5520b078c55193a9bf498c5b27530f7
  6. Wait until your node is on the correct chain. This could take some time if your old node was running for a while, and other nodes banned you on the network. You can check that you are on the correct chain by typing ./bin/bitcoin-cli getblockchaininfo and verifying the information with a public block explorer such as https://explorer.bitcoin.com/bch, https://blockchair.com/bitcoin-cash, or https://cash.coin.dance/.
submitted by Mengerian to btc [link] [comments]

Connecting bitcoin-qt to bitcoind on local network

Hello,
I have a bitcoin node running on a headless box (bitcoind) and I would like to connect to it using bitcoin-qt on my desktop. I'm getting a little confused with the process.... does bitcoin-qt need to connect to bitcoind using RPC? Do I store my wallet file on the bitcoind box, or bitcoin-qt box?
The bitcoin node is already setup to work with an electrum server, so I already have rpcbind=0.0.0.0, rpcallowip=$ELECTRUX_IP, and rpcuserpcpassword set. I tried adding my desktop IP to rpcallowip, and setting the appropriate username/password in bitcoin-qt's bitcoin.conf, but no luck. I can see in debug.log for bitcoin-qt that the connection is rejected.

The node runs over TOR and I have onlynet=onion set in bitcoind's bitcoin.conf, but that doesn't seem to stop electrumx connecting via RPC over clearnet, so this shouldn't be an issue right?

Am I missing something here? Help would be much appreciated!
submitted by backfromBTCpast to Bitcoin [link] [comments]

BCH Unlimited Ubuntu PPA repo updated to version 1.8.0

The BCH Unlimited Ubuntu PPA repository has been updated to serve version 1.8.0 is available at:
 
https://launchpad.net/~bitcoin-unlimited/+archive/ubuntu/bucash
 
This release is compatible the Bitcoin Cash protocol. To update already installed packages (*):
 
sudo apt update sudo apt upgrade 
 
To install
 
sudo add-apt-repository ppa:bitcoin-unlimited/bucash sudo apt-get update sudo apt install bitcoind bitcoin-qt 
 
starting from this update the repository is serving also ElectrsCash(**) v.1.1.1, for now just for the amd64 architecture. To install it just execute this command:
sudo apt install electrscash 
 
See the official announcement and the release notes for more details:
https://np.reddit.com/btc/comments/g3k4mbch_unlimited_180_has_just_been_released/
https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/release/doc/release-notes/release-notes-1.8.0.md
 
Known issues:
On Ubuntu 18.04 (bionic) you'll probably get an error while trying to install bitcoind. The error message is the following:
The following packages have unmet dependencies. bitcoind : Depends: libgcc-s1 (>= 3.4) but it is not installable E: Unable to correct problems, you have held broken packages. Package libgcc-s1 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source 
It seems like libgcc-s1 which is a focal (ubuntu 20.04, still in beta) package that has somehow crept in the bionic "food-chain", I'm working on a fix right now. Thanks to xd1gital for the initial report.
Edit: to solve the problem please do:
sudo add-apt-repository ppa:ubuntu-toolchain-test sudo apt update sudo apt dist-upgrade sudo apt install bitcoind 
 
(*) due to fact we rebranded Ubuntua PPA name along with the name of the clients, you will be displayed with this warning and question to which you could safely reply "Yes":
E: Repository 'http://ppa.launchpad.net/bitcoin-unlimited/bucash/ubuntu bionic InRelease' changed its 'Label' value from 'BU Cash' to 'BCH Unlimited' N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details. Do you want to accept these changes and continue updating from this repository? [y/N] 
  (**) ElectrsCash is an efficient re-implementation of Electrum Server written in Rust.
submitted by s1ckpig to bitcoin_unlimited [link] [comments]

How I synced on a 2013 ultrabook in a few days

Note: I don't know exactly how long it took because I didn't do it in one go. I guess it was like 4,5 days doing it only at night. At some points(2015Q3, 2018Q2) it slows down and ETA goes up to 16 weeks or something.
The main bottleneck is IO. My 2013 mobile i3 has enough processing power to sync, I only used 3 threads and most of the time only one was close to 100%. The two directories that need to be written and read from intensively are chainstate and blocks/index. I pruned to 2GB and chainstate didn't go much over 3GB during the entire process. blocks/index is like 100MB.
The best solution is to move chainstate and blocks/index to a ramdisk. If you don't have enough ram the linux kernel has a thing called zram. Zram creates a compressed swap(cache) file in ram, this effectively increases your ram size at the cost of a bit of processing power and access speed(of the compressed part). On my machine I can net a bit more than 1GB of extra ram. That's right, with linux you can download more ram! The second best solution is to leave chainstate and block/index on a sdd. From what I've tested it should take up between 5 whole days and 2 weeks.
With regards to config, I didn't see much benefit in increasing the db cache over the default 450MB in bitcoin-qt. If I recall correctly, smaller prune sizes make chainstate larger.
After the initial sync keeping up to date is very easy on resources. You can catch up a week in a few minutes. At the moment bitcoind is using 400MB but I'm still working on bringing that number down.
Remember: If you want safety or if you want to help the network you need o run a full node. A full node is a node that verifies all transactions. A pruned node is a full node.
Edit: bitocoind really likes to hover around 400MB, sometimes it gets higher than that, some times it get's lower. A lot of that is data, not code, so if you start running out of ram your OS should drop those pages and get down to 250~300MiB. If you really want the memory to be this low all the time, on linux, you can either: Use cgroups to set the swappiness of the process to 99 so all data gets swapped but not code does; Use systemd and set MemoryLimit=300MiB(for example) so almost all data gets swapped but no code. I don't think any of those options are worth the small setup hassle.
submitted by nothing_works4me to Bitcoin [link] [comments]

BCH Unlimited Ubuntu PPA repo updated to version 1.8.0

The BCH Unlimited Ubuntu PPA repository has been updated to serve version 1.8.0 is available at:
 
https://launchpad.net/~bitcoin-unlimited/+archive/ubuntu/bucash
 
This release is compatible the Bitcoin Cash protocol. To update already installed packages (*):
 
sudo apt update sudo apt upgrade 
 
To install
 
sudo add-apt-repository ppa:bitcoin-unlimited/bucash sudo apt-get update sudo apt install bitcoind bitcoin-qt 
 
starting from this update the repository is serving also ElectrsCash(**) v.1.1.1, for now just for the amd64 architecture. To install it just execute this command:
sudo apt install electrscash 
 
See the official announcement and the release notes for more details:
https://np.reddit.com/btc/comments/g3k4mbch_unlimited_180_has_just_been_released/
https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/release/doc/release-notes/release-notes-1.8.0.md
 
Known issues:
On Ubuntu 18.04 (bionic) you'll probably get an error while trying to install bitcoind. The error message is the following:
The following packages have unmet dependencies. bitcoind : Depends: libgcc-s1 (>= 3.4) but it is not installable E: Unable to correct problems, you have held broken packages. Package libgcc-s1 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source 
It seems like libgcc-s1 which is a focal (ubuntu 20.04, still in beta) package that has somehow crept in the bionic "food-chain", I'm working on a fix right now. Thanks to xd1gital for the initial report.
Edit: to solve the problem please do:
sudo add-apt-repository ppa:ubuntu-toolchain-test sudo apt update sudo apt dist-upgrade sudo apt install bitcoind 
 
(*) due to fact we rebranded Ubuntua PPA name along with the name of the clients, you will be displayed with this warning and question to which you could safely reply "Yes":
E: Repository 'http://ppa.launchpad.net/bitcoin-unlimited/bucash/ubuntu bionic InRelease' changed its 'Label' value from 'BU Cash' to 'BCH Unlimited' N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details. Do you want to accept these changes and continue updating from this repository? [y/N] 
  (**) ElectrsCash is an efficient re-implementation of Electrum Server written in Rust.
submitted by s1ckpig to btc [link] [comments]

BCH Unlimited Ubuntu PPA repo updated to version 1.8.0

The BCH Unlimited Ubuntu PPA repository has been updated to serve version 1.8.0 is available at:

 

https://launchpad.net/~bitcoin-unlimited/+archive/ubuntu/bucash

 

This release is compatible the Bitcoin Cash protocol. To update already installed packages (*):

 

sudo apt update
sudo apt upgrade

 

To install

 

sudo add-apt-repository ppa:bitcoin-unlimited/bucash
sudo apt-get update
sudo apt install bitcoind bitcoin-qt

 

starting from this update the repository is serving also ElectrsCash(**) v.1.1.1, for now just for the `amd64` architecture. To install it just execute this command:

sudo apt install electrscash

 

See the official announcement and the release notes for more details:

https://np.reddit.com/btc/comments/g3k4mbch_unlimited_180_has_just_been_released/

https://github.com/BitcoinUnlimited/BitcoinUnlimited/blob/release/doc/release-notes/release-notes-1.8.0.md

 

Known issues:

On Ubuntu 18.04 (bionic) you'll probably get an error while trying to install `bitcoind`. The error message is the following:

The following packages have unmet dependencies.
bitcoind : Depends: libgcc-s1 (>= 3.4) but it is not installable
E: Unable to correct problems, you have held broken packages.

Package libgcc-s1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

It seems like [libgcc-s1](https://packages.ubuntu.com/focal/libgcc-s1) which is a focal (ubuntu 20.04, still in beta) package that has somehow crept in the bionic "food-chain", I'm working on a fix right now. Thanks to xd1gital for the initial report.

 

(*) due to fact we rebranded Ubuntua PPA name along with the name of the clients, you will be displayed with this warning and question to which you could safely reply "Yes":

E: Repository 'http://ppa.launchpad.net/bitcoin-unlimited/bucash/ubuntu bionic InRelease' changed its 'Label' value from 'BU Cash' to 'BCH Unlimited'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N]

 
(**) ElectrsCash is an efficient re-implementation of Electrum Server written in Rust.
submitted by s1ckpig to Bitcoincash [link] [comments]

Issue upgrading my bitcoin node

Hello,
I'm trying to update my current node (v0.18.1.0). I'm running my node on Mac using an external HD.
Everything is on my HD except for the bitcoin.conf file and the Bitcoin Core icon in my Applications folder.
I was able to launch my node using the icon on my Application folder (bitcoin-qt) or using the command line (bitcoind)
Since I downloaded the new version (v0.19.0.1), I have the following issue:
When I launch my node using the icon on my Application folder (bitcoin-qt) everything is fine and the new version is running (using the data in my external HD), but when launch the node using the command line (bitcoind), it still launch the old version.
Is there a separate update from bitcoind? I've done some research online but I didn't find anything helpful.
Thank You!!!
***EDIT***
I have downloaded "bitcoin-0.19.0.1-osx64.tar.gz" which include the executable for bitcoind, bitcoin-cli, etc and replace the old ones by the new ones and everything looks fine!
submitted by germmmmmm to Bitcoin [link] [comments]

Anti-FUD: The BIP148 enforcing client - a walkthrough.

There seems to be a lot of FUD going around surrounding https://github.com/uasf/bitcoin/tree/0.14 <--that little guy. I'm a programmer, so let me walk you through what, exactly, is changed, and how you can verify what changes for yourself.
So, to get started, click on the 'Compare' button just below the green button that says 'clone or download'. link
This shows you every single change that has been merged between bitcoin core, in the 0.14 branch (the branch that was used to create the 0.14 Core client many of us use) and this repository's version of the 0.14 client, which requires any blocks after August 1, 2017 to support Segwit.
So, let's go through the page, top to bottom, and explain what it is telling you.
19 commits 4 files changed 3 commit comments 3 contributors 
That tells you that 19 times someone has changed something in the code base, in total, 4 files were changed by those 19 commits, 3 commit comments were made (think of these as replies to a thread on reddit), and 3 people total have made contributions to the code differences represented below.
Below that is a list of what commits were made on what day. You can click on the second column (BIP148 / Update client name to Satoshi BIP148 / etc) to see what changes were made in that version (compared to the version before it) specifically.
Scroll down until you hit
Showing with 19 additions and 5 deletions. 
This is where the 'fun' (programming) begins.

src/clientversion.cpp

-std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments) +std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments, const bool fBaseNameOnly) 
Red lines, which always start with a minus sign, means that line was removed from the file. Green lines, which always start with a + sign, mean that line was added. "But the line wasn't removed, just some stuff was added to the end!" Correct! This is a 'diff-ism'. Diff being the name of the program used to show differences between a file. Diff doesn't highlight just the part of the line that changed, it highlights the entire line, and leaves it to you to spot the changes in the line.
From the above, we can see a parameter was added to the end of the line. "But what does the line do!" Well, what you're looking at is a function declaration. What is a function? Well, imagine you wanted to build a robot to make sandwiches for you. You could make the sandwich yourself, but it's easier if an automated system does it for you. The function is like the robot; you put a specific set of tasks into the robot's programming, give it a specific set of inputs (bread, knife, meat/cheese/spreads/etc) and it returns the resultant sandwich. The way to read the declaration is this:
std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments, const bool fBaseNameOnly) 
  1. std::string The first argument is the return type of the function. In this case, a C++ string.
  2. FormatSubVersion This is the name of the function
  3. (const std::string& name, the first parameter of the function, since it is unchanged from Core, and unmodified by other changes in the file, I will not bother explaining what it does.
  4. int nClientVersion, Second parameter to the function. Same thing, original, unmodified, skipping.
  5. const std::vector& comments, Parameter 3, unchanged, skipping.
  6. , const bool fBaseNameOnly) Parameter 4, 'const bool' means two things: 1) we cannot change the value of this variable in the code. 2) it's a 'bool' type, which is short for boolean. It an either be true or false, those are the only values it can ever have. What does it do? Let's keep reading.

std::ostringstream ss; 
That's important for later, make note of it.
if (!fBaseNameOnly) ss << "UASF-Segwit:0.2(BIP148)/"; 
The above is the change uses the newly minted parameter 4 to add a bit of text into the output stream. Specifically, the string "UASF-Segwit:0.2(BIP148)/" is tacked on to whatever is ahead of it in the output stream. The net result of this change is that clients using this code will report their client version as '/Santoshi:0.14.0/UASF-Segwit:0.2(BIP148)/' instead of the standard value of '/Santoshi:0.14.0/'.
File complete! Next file.

src/clientversion.h

Within C or C++ programming, you have the concept of 'code files' (ending in .c or .cpp) and 'header files' (ending in .h). Strictly speaking, any code can be in either file and the compiler will figure it out (assuming you give it enough information to do so). However, programming conventions exist. Since I assume the readers of this post are (largely) not programmers, I won't bore you. It's a convention used for sanity only, and it is a convention followed by the bitcoin source code. In general, program code that 'does stuff' goes in .c and .cpp files, and the code needed to tell the compiler (compiler = the thing that converts these text files into a program) where to 'find stuff' goes into .h files.
-std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments); +std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments, bool fBaseNameOnly = false); 
Well, because this is the exact same function call we just talked about in the previous section, I'll skip going through the parameters one by one, and instead focus only on the change: , bool fBaseNameOnly = false).
"WAIT! It has 'const' before bool in the .cpp file! That's bad right!?" No. The compiler will see const in the .cpp file and mandate the variable be const.
"WAIT! Here it says '= false' and in the .cpp file it doesn't!" Again, not a problem. Remember how I said some code goes in .c/.cpp files, and some in .h files? Well, this is a case where which file contains what code actually does matter. Basically, you can't set a default value for a parameter inside a .c/.cpp file. You can only do that in a .h file. So...that's 100% correct. Here is the souce code for a quick little program to see this behavior:
--test.cpp--
#include "test.h" #include  #include  int main() { function(); } int function(const bool tmp) { tmp = !tmp; } 
---test.h---
int function(bool test = false); 
--If you tried to compile this, you'd get--
g++ test.cpp test.cpp: In function ‘int function(bool)’: test.cpp:12:6: error: assignment of read-only parameter ‘tmp’ tmp = !tmp; 
In this case, 'read only' means 'was declared const'.
Remember how a 4th parameter was added in the code above? Well, you have to tell the compiler to expect that parameter, which you do here, in the header file. That line of code tells the compiler to expect the 4th parameter. It also sets the default value of the parameter, should the caller not specify it, to be false.
Thus, you can call this function two ways:
  1. FormatSubVersion("Test", 99900, std::vector())
  2. FormatSubVersion("Test", 99900, std::vector(), true)
Using method 1 would result in a User Agent string of '/Test:99900/UASF-Segwit:0.2(BIP148)/', because the program uses the default value of 'false' and so it sticks in the bit about BIP148 support. Using method 2 would result in '/Test:99900/' "Wait, wait, how did you figure that out?" Look here, scroll to the bottom (line 88) and that is the FormatSubVersion function we went over above. All you do is built the string in steps as you read the code:
  1. Line 90: ""
  2. Line 91: "/"
  3. Line 92: "/Test:99900" {the 'Test' comes from the 'name' parameter, parameter 1. The : is statically coded (<< ":" <<) and the 99900 comes from nClientVersion, parameter 2}
  4. Line 93: From the function call, we see that parameter 3 is initialized 'std::vector()', this is an empty vector. If the vector had anything in it, it would look like this: std::vector('a')
  5. (because the if statement in line 93 fails, we go to: ) Line 101: "/Test:99900/"
  6. Line 102: (are we doing a version with or without the 4th parameter set to true?)
  7. Line 103: (if parameter 4 is false, line becomes "/Test:99900/UASF-Segwit:0.2(BIP148)/"
  8. Line 104: Convert the 'ss' variable to a standard C++ string and return the that string to whatever asked this function to be run.
SO, in total, this function literally just creates a string. Much like the robot-sandwich example, you give the function a client name, version, and list of comments and it builds you a string containing those things.

src/test/util_tests.cpp

This file is part of the automated testing for bitcoind/bitcoin-qt. When you compile the software, you'd typically run 'make check' before installing the software, to ensure that your changes didn't break anything and that your compile didn't go wrong. With the effort I've put into explaining the change to FormatSubVersion in the past two section, I believe you can now see that the only change made to this test is to ensure that the newly added code performs as expected.
That said, there is a 'defect' in this code. He should not have removed the 3 existing tests. He should have added 3 new tests. That way he'd have both 'positive' and 'negative' test case coverage. That said, it isn't something to fret about.

src/validation.cpp

All right, finally, the big file where all the cool shit happens!
+ // BIP148 mandatory segwit signalling. + if (pindex->GetMedianTimePast() >= 1501545600 && // Tue 1 Aug 2017 00:00:00 UTC + pindex->GetMedianTimePast() <= 1510704000 && // Wed 15 Nov 2017 00:00:00 UTC + !IsWitnessEnabled(pindex->pprev, chainparams.GetConsensus())) + { + // versionbits topbit and segwit flag must be set. + if ((pindex->nVersion & VERSIONBITS_TOP_MASK) != VERSIONBITS_TOP_BITS || + (pindex->nVersion & VersionBitsMask(chainparams.GetConsensus(), Consensus::DEPLOYMENT_SEGWIT)) == 0) { + return state.DoS(0, error("ConnectBlock(): relayed block must signal for segwit, please upgrade"), REJECT_INVALID, "bad-no-segwit"); + } + } + 
The entire section is newly added. Anything it does will be 'in addition to' whatever is already done. Let's go through the change line by line:
"Ok, but what about 1501545600? How do we know that?" It's an epoch timestamp. Google 'epoch converter', copy-paste that number in, convert to UTC, and you'll see it is correct for what the comment says it is.
The '&&' at the end of the line means 'and'. So in this case, 'if the mean age of the past few blocks is greater than or equal to and ...'
You can see proof of this claim in the tests written in src/test/versionbits_tests.cpp lines 277-281. line 277 creates an 'old format' block, then (line 279) checks that the ComputeBlockVersion function works, then verifies that the bitwise-and function returns TOP_BITS, as expected.
If you are concerned that more might be needed to reject a block, simply view src/validation.cpp on line 1892 and see that standard bitcoin Core code rejects blocks in the same way as the SEGWIT patch does.
"So wait, what is the total requirement to reject a block again?"
  1. If the mean age of the past few blocks is greater than or equal to AND the mean age of the past few blocks is less than or equal to AND the previous block did not show that Segwit was in 'active' state:
  2. If all of the conditions in step 1 are met AND the block either does not support BIP9 messaging, or does not signal support for SEGWIT
  3. Then it will be rejected.
"So wait, what happens after the first segregated witness block pops across the network? Hasn't that already happened?" No. Blocks that support segwit have come across the network, but in order for IsWitnessEnabled to return 'true', the SEGWIT state would need to switch to 'active' (see BIP9 spec), which is the final state of any proposal, and the point at which the setting is considered an accepted part of the blockchain.

Conclusions

So, you see, no muss, no fuss. The day-1 bug where the logic was backwards has been fixed. There is nothing to fear. Feel free to ask questions and I'll explain them over the next few hours/days as I am able. I'll try to talk to your level if I can. I like teaching in general and abhor ignorance in all its forms. Understand: ignorance strictly means 'not knowing', rather than the typical 'negative' connotation it gets in English speaking society. I would like everyone to realize just how simple this UASF patch is and that the FUD surrounding it not being 'verified' is absolutely a bad joke.
edit: Logic fix thanks to Phil. Like shaolinfry, I had my negated logic backwards. Oops.
submitted by Kingdud 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]

BTCPay Server + EPS + RTL - how?

I am trying to build a box with: - Linux Ubuntu 18.04 - BTCPay Server, using docker - EPS (Electrum Personal Server) - RTL (Ride the lightning)
I have the full bitcoin data synced in a folder already, from a previous bitcoin-qt/bitcoind instance.
  1. Can I install BTCPay Server with docker and then run beside another docker with EPS?
  2. I understand that RTL is already integrated into BTCPay, so I just have to update the server and activate it?
  3. Is possible to integrate also EPS into the BTCPay docker file, after the installation? Or is it in "works" to be integrated in the same docker installation/update server by BTCPay ?
  4. Is possible to run EPS without docker, but using the bitcoind from BTCPay docker instance?
  5. Is possible to connect a mobile wallet (ex. Samourai) to that bitcoind instance from BTCPay Server ?
  6. One last question: is there a procedure to backup all the BTCPay server settings, for in case of disaster recovery moment? So to restore all data at once after reinstall OS ?
This is very important thing, if I start to put a BTCPay server at work in production and the machine gets fucked, how easy is to restore it?
Please somebody can respond to these questions, not in a super technical manner so many others can understand it?
Maybe u/belcher_ and u/CardCollector1 or u/NicolasDorier can help with some answers here, please?
EDIT: I hope I don't have to add a meme to this post to bring more attention... seems that lately only memes are "important" here, subjects like this are ignored. EDIT2: 21 hours and still not any answer... fuck, nobody uses BTCPay ?
submitted by Mr--Robot to Bitcoin [link] [comments]

6. bitcoin-qt How to prune the blockchain in Bitcoin-Qt How to run Bitcoin-qt as a server with a configuration file (3 of 6) Programming Bitcoin-qt using the RPC api (1 of 6) How To Earn BITCOIN Only Ads Watch To BTC

Bitcoin Core (formerly Bitcoin-Qt) is the third Bitcoin client, developed by Wladimir van der Laan based on the original reference code by Satoshi Nakamoto. It has been bundled with bitcoind since version 0.5. Bitcoin-Qt has been rebranded to Bitcoin Core since version 0.9.0 .. Bitcoin Core can be used as a desktop client for regular payments or as a server utility for merchants and other Bitcoin software has both a graphical interface called bitcoin-qt and a console interface, bitcoind. If the first is convenient for human use, then without a text it is quite difficult to make an online store or any other service that accepts bitcoins as a payment. Bitcoin.org is a community funded project, donations are appreciated and used to improve the website. Make a donation Bitcoin-Qt/bitcoind version 0.8.3 released: A new version of the Bitcoin-Qt and Bitcoind clients, v0.8.3, includes a fix for a bug that can be exploited as part of a denial-of-service attack against the Bitcoin network. Without this fix, Bitcoin-Qt/bitcoind nodes that receive a specific over-size message can crash. Bitcoin Core is a community-driven free software project, released under the MIT license. Verify release signatures Download torrent Source code Show version history. Bitcoin Core Release Signing Keys v0.8.6 - 0.9.2.1 v0.9.3 - 0.10.2 v0.11.0+ Or choose your operating system. Windows exe - zip.

[index] [20041] [30933] [2437] [22423] [11603] [12394] [8077] [12190] [27196] [27772]

6. bitcoin-qt

You will need to use this code in Terminal to launch Bitcoin-Qt from now on. To launch terminal press cmd + spacebar, then search terminal. Following this guide will prune the blockchain on your ... Bitcoind is the 'official' satoshi bitcoin server. Bitcoind has been in development for six years (at the time of this video). Btcd is an alternative server to the official distribution that is ... bitcoind, briatore bitcoin d'urso, bitcoin earning app, bitcoin earning site, bitcoin explained, ... bitcoin qt, bitcoin qr scanner, bitcoin que es, bitcoin quantum computer, bitcoin qatar, Bitcoin JSON-RPC Tutorial 5 ... How to run Bitcoin-qt as a server with a configuration file ... 9. bitcoind - Duration: 7:32. 402 Payment Required 1,082 views. RPC commands: - getbalance - getwalletinfo - getnewaddress - getblockcount - getnetworkinfo www.bitcoinhackers.org @402PaymentRequierd ...

Flag Counter