Splitting the data directory - Bitcoin Wiki

Bitcoin Fullnode Install Guide for Dummies ;-)

Bitcoin Fullnode Install Guide for Dummies ;-)
Feel free to stop at Level 0 or Level 1, which is fine. More advanced configs are offered to those with more tech savvy. This guide, obviously assumes a Windows 10 install, but other OSes work fine, just find a different guide. BTW, the "For Dummies" is a callback to a set of "tech" books in the 90's intended to be as easy as possible. It is in jest and not intended to insult the reader. Finally, if you dislike the formatting, a well formatted copy can be found here
There is a fairly small subset of Bitcoin users that run a full node. I think the idea of running a full node has gotten a bad rap over the years since there is so much talk about running on a Raspberry Pi, or getting zippy SSDs. Although all of this can be fun, it is often not really required at all. Here are some ways to run a full node starting with the very simple. I'll get into more complex configs, but these are all optional.

Tech Skill Level: 0 (the basics)

  1. Download Bitcoin Core
  2. Launch the downloaded installer and install the app
  3. Launch the installed "Bitcoin Core" app and let it run overnight
In many cases, thats it. If your running a new machine with a fairly good internet connection, 8 or 9 hours will be enough to complete the "Initial Block Download" (IBD). This may fill up your drive a bit, but again, on most new machines, 300 GB of space isn't that hard to come by.

Tech Skill Level: 1 (encrypted wallet)

One thing we left out in the level-0 exercise is encrypting your wallet. It's easy enough to do well, but a bit more difficult to do right. The main challenge is that humans generate really poor passwords. If you want a good password, the best way is to use something called "diceware". Basically, you just grab 4 or 5 dice and each throw of the dice represents a certain word on a special list. The throw {1,4,5,3,1} for example would be the word camping on the EFF-diceware-wordlist. So you repeat this a few times until you have a list of 8 or so words which becomes the passphrase you use to encrypt your wallet. Write it down, it is always hard to remember at first. So at level-1 your list becomes:
  1. Download Bitcoin Core
  2. Launch the downloaded installer and install the app
  3. Launch the installed "Bitcoin Core" app and let it run overnight
  4. Choose Encrypt Wallet from the Settings menu
  5. Enter your 8 word (or so) passphrase generated using the Diceware method

Wallet Encryption Dialog

Tech Skill Level: 2 (enable pruning if needed)

Though I said "300 GB of space isn't hard to come by", some times it actually is. If space is an issue, a simple way to fix it is to tell bitcoin to simple take less space. This is called "pruning" and can take that number from 300 GB down to below 5 GB. If you can't find 5 GB, then you'll have to read ahead to level-4 to add USB storage. But the good news is, enabling pruning is pretty easy, we just add another step to our working list:
  1. Download Bitcoin Core
  2. Launch the downloaded installer and install the app
  3. Launch the installed "Bitcoin Core" app and let it run overnight
  4. Do the wallet encryption steps here if you wish
  5. Choose Options from the Settings menu
  6. Choose Prune block storage to: and select the max size for the blocks to use
  7. Exit and restart the bitcoin application for the changes to take effect

Pruning Dialog
Note, even setting this to 1 GB will still leave you with about a 4.5 GB install. The blocks take up a lot of space, but the chainstate and other folders eat up at least 3.5 GB and they can't be pruned. Also, be aware, to disable pruning requires you to perform the entire IBD again. While pruned some other functions my be disabled as well, so just know that pruning does limit some functionality.

Tech Skill Level: 3 (verify the installer)

Although this is arguably something that should be done at level-0, some find the intricacies of comparing hash (thumbprint) values to be tedious and beyond the scope of a beginner. You will find these types of hash compares suggested quite often as a way to prevent running tainted programs. Programs are often tainted by bad disk or network performance, but most often, taint is malicious code inserted by viruses or malware. This is a way to guard yourself against those types of attacks.
What I cover here is a very basic comparison on the certificate, but a more thorough verification advised by mosts uses a program called Gpg4Win, and is beyond the scope of this beginners guide. But regardless, most users should strive to do this minimum level of validation.
  1. Download Bitcoin Core
  2. Launch the downloaded installer
  3. When prompted "Do you want to allow..." click Show more details
  4. In the details section select Show information about the publisher's certificate
  5. In the certificate window select the Details tab
  6. In the Details tab Subject should start with "CN = Bitcoin Core Code Signing Association"
  7. Ensure Thumbprint in Details reads ea27d3cefb3eb715ed214176a5d027e01ba1ee86
  8. If the checks pass, click OK to exit the certificate window and Yes to allow the installer to run.
  9. Launch the installed "Bitcoin Core" app and let it run overnight
  10. Do the wallet encryption steps here if you wish
  11. Do the optional pruning steps here if you wish

Certification Validation Windows
Note: The certificate used to sign the current Bitcoin installer is only valid from March 2020 to March 2021. After that point the thumbprint on the certificate will change. This is by design and intentional. If your reading this post after March 2021, then it is understood that the thumbprint has changed.

Tech Skill Level: 4 (use secondary storage)

We glossed over the "new machine with fairly good internet" part. Truth be known many people do not have fairly new machines, and find the IBD to take longer than the "over night" best wishes. For most people the slowdown is the disk access when calculating what is called chainstate. This requires fast random reads and writes to the disk. If you have an SSD disk, this will be no problem, but if you have a non-SSD "spinning" disk, random writes are always slow. Though an SSD will speed things up, they are pricey, so a nice middle ground may be a simple high-end USB key drive. You can get some with 10 to 15 MB/s random writes for $20 on Amazon. This is usually a order of magnitude faster than a "spinning" disk. And with pruning (see level-2), a small USB drive should be fine.
Once you decide on a drive, the tricky part will be to enable external storage. It requires editing a configuration file and adding a line. First, we want to create a directory on the key drive. You will need to determine the drive letter of your USB key drive. For the sake of this example, we will assume it is D:, but you must determine this yourself and correct the example. Once you know the drive letter, create a blank folder on the drive called Bitcoin. So for this example, creating Bitcoin on drive D: will create the path D:\Bitcoin. Once done, assuming that D: is your drive, here are the new steps including the edit of the configuration file:
  1. Download Bitcoin Core
  2. Launch the installer, verify it, then run it
  3. Launch the installed "Bitcoin Core" app and let it run overnight
  4. Do the wallet encryption steps here if you wish
  5. Do the optional pruning steps here if you wish
  6. Launch "Notepad" by typing "Notepad.exe" in the windows search bar then click Open
  7. Type the line datadir=D:\Bitcoin (depending on your drive letter) in the blank file
  8. Choose Save from the File menu in notepad
  9. Type %APPDATA%\Bitcoin\bitcoin.conf (note the percent signs) in the File name box
  10. Select All Files from the Save as type dropdown
  11. Click the Save button and overwrite the file if prompted
  12. Exit and restart the bitcoin application for the changes to take effect

Save As Dialog
Now that you've reached this level of technical expertise, there are many new configuration options that you can begin to modify if you wish. Most configuration data is contained in the bitcoin.conf file and learning how to maintain it is a key step for a node operator.

Tech Skill Level: 5 (all other customizations)

Here's a short list of various things you can ADD to your bitcoin.conf file. You generally just add a new line for each configuration settings.
  • addresstype=bech32
  • changetype=bech32
The addresstype / changetype allows your wallet to use the native-segwit (bech32) format. This is the most efficient and inexpensive way to spend bitcoin, and is a recommended configuration. The default uses something called p2sh-segwit which is more compatible with older wallets, but more expensive to spend.
  • minrelaytxfee=0.00000011
Changing the minrelaytxfee setting allows you to help propagate lower fee transactions. It will require more memory but TXN memory is capped at 300 MB by default anyways, so if you have enough memory, it is a good setting to choose.
  • dbcache=2048
The dbcache setting controls how many MB of memory the program will use for the chainstate database. Since this is a key bottleneck in the IBD, setting this value high (2048 MB) will greatly speed up the IBD, assuming you have the memory to spare
  • blocksdir=C:\Bitcoin
  • datadir=D:\Bitcoin
In level-4 we discussed moving the datadir to a fast external storage, but the majority of the space used for bitcoin is the blocks directory (blocksdir). Although you should always use for fastest storage for datadir, you are free to use slow storage for blocksdir. So if you only want to consume a small amount of your SSD (assumed D:) then you can keep your blocks on your slow "spinning" drive.
  • upnp=1
One of the harder challenges you may face running a node, is to get incoming connections. If you are lucky, you may find that your firewall and network HW support the uPnP protocol. If they do, this setting will allow bitcoin to configure uPnP to allow incoming connections to your node. Other methods exist to make your node reachable, but they are well beyond the scope of this guide.
submitted by brianddk to Bitcoin [link] [comments]

Anatomy of the Bitcoin Node filesystem

There are man explanations like this, but this one is mine.
Just in case anyone was curious. I dug up some good posts on this and thought I'd distill it as best I could. I'll be using Windows file separators, but fee free to change them in your head.
If you name a -datadir argument, this is what will land there. If one is not named it defaults to %APPDATA%\Bitcoin
If you name a -blocksdir argument, this is what will land there. If one is not named it defaults to
If you name a -walletdir argument, this is what will land there. If one is not named it defaults to \wallets or just if the wallets subdirectory doesn't exist.
  • \wallet.dat - The wallet file with private keys and UTXOs
  • \db.log - Database log of access to wallet
Note that -datadir, -blocksdir and -walletdir can all point to different storage. The things you need to keep in mind:
  1. -datadir should be your FASTEST storage
  2. -blocksdir should be your LARGEST storage
  3. -walletdir should be your most SECURE storage
As a footnote, -testnet will throw a testnet3\ in everything, and -walletdir would be assumed to refer to test.walletdir
submitted by brianddk to Bitcoin [link] [comments]

Batch script to create pruned block data from full block data

TLDR; Produce a pruned block directory from a full block directory without copying any extra block data
I have a full node, but at times I want to run in a VM or on a RPi or something. Normally I have to clone my whole 300 GB block directory, enable pruning, then point bitcoin-qt.exe to the clone to finally arrive at a small 4 GB datadir. I found it frustrating that I was doing this 295 GB of pointless copy operations since once I enable pruning, the old blocks are discarded. I was also discouraged at the fact that .\Bitcoin\testnet3\blocks\blk00186.dat is different (by checksum) in a pruned and non-pruned directory.
So I finally came up with an answer. Basically, I copy over the latest few blk*.dat and rev*.dat files, then just make empty copies of the other blk*.dat and rev*.dat files. Then once bitcoin-qt.exe launches, it discards the empty files and rewrites the few files it needs. For Windows, it looks something like this:
set /a "sum=0" for /f %%I in ('dir /s /b /o:-n %full_blk%\blk*.dat') do ( set size=%%~zI set blkdat=%%~nxI set revdat=!blkdat:blk=rev! if !sum! GTR !pruned_mb! ( echo.> %pruned_blk%\!blkdat! echo.> %pruned_blk%\!revdat! ) else ( copy %full_blk%\!blkdat! %pruned_blk%\!blkdat! copy %full_blk%\!revdat! %pruned_blk%\!revdat! ) set /a "sum=!sum! -1 + !size!/(1024*1024)" )
I can stamp out a pruned blocks directory from my full blocks directory in seconds. Much easier... well for me.
Here's the source, but no guarantees. Just food for thought.
 
Update: I had originally thought to symlink the unused files, but turns out they are never read at all, so I can just dummy them out.
submitted by brianddk to Bitcoin [link] [comments]

[ Bitcoin ] Anatomy of the Bitcoin Node filesystem

Topic originally posted in Bitcoin by brianddk [link]
There are man explanations like this, but this one is mine.
Just in case anyone was curious. I dug up some good posts on this and thought I'd distill it as best I could. I'll be using Windows file separators, but fee free to change them in your head.
If you name a -datadir argument, this is what will land there. If one is not named it defaults to %APPDATA%\Bitcoin
If you name a -blocksdir argument, this is what will land there. If one is not named it defaults to
  • \blocks\blk*.dat - The raw block data
  • \blocks\rev*.dat - The Undo files. List of spent UTXOs for each block
If you name a -main.walletdir argument, this is what will land there. If one is not named it defaults to \wallets or just if the wallets subdirectory doesn't exist.
  • \wallet.dat - The wallet file with private keys and UTXOs
  • \db.log - Database log of access to wallet
Note that -datadir, -blocksdir and -main.walletdir can all point to different storage. The things you need to keep in mind:
  1. -datadir should be your FASTEST storage
  2. -blocksdir should be your LARGEST storage
  3. -main.walletdir should be your most SECURE storage
As a footnote, testnet will through a testnet3\ in everything, and would require a -test.walletdir switch to set the wallet directory.
brianddk your post has been copied because one or more comments in this topic have been removed. This copy will preserve unmoderated topic. If you would like to opt-out, please send a message using [this link].
[deleted comment]
submitted by anticensor_bot to u/anticensor_bot [link] [comments]

Test

Test
There is a fairly small subset of Bitcoin users that run a full node. I think the idea of running a full node has gotten a bad rap over the years since there is so much talk about running on a Raspberry Pi, or getting zippy SSDs. Although all of this can be fun, it is often not really required at all. Here are some ways to run a full node starting with the very simple. I'll get into more complex configs, but these are all optional.

Tech Skill Level: 0 (the basics)

  1. Download Bitcoin Core
  2. Launch the downloaded installer and install the app
  3. Launch the installed "Bitcoin Core" app and let it run overnight
In many cases, thats it. If your running a new machine with a fairly good internet connection, 8 or 9 hours will be enough to complete the "Initial Block Download" (IBD). This may fill up your drive a bit, but again, on most new machines, 300 GB of space isn't that hard to come by.

Tech Skill Level: 1 (encrypted wallet)

One thing we left out in the level-0 exercise is encrypting your wallet. It's easy enough to do well, but a bit more difficult to do right. The main challenge is that humans generate really poor passwords. If you want a good password, the best way is to use something called "diceware". Basically, you just grab 4 or 5 dice and each throw of the dice represents a certain word on a special list. The throw {1,4,5,3,1} for example would be the word camping on the EFF-diceware-wordlist. So you repeat this a few times until you have a list of 8 or so words which becomes the passphrase you use to encrypt your wallet. Write it down, it is always hard to remember at first. So at level-1 your list becomes:
  1. Download Bitcoin Core
  2. Launch the downloaded installer and install the app
  3. Launch the installed "Bitcoin Core" app and let it run overnight
  4. Choose Encrypt Wallet from the Settings Menu
  5. Enter your 8 word (or so) passphrase generated using the Diceware method

Wallet Encryption Dialog

Tech Skill Level: 2 (enable pruning if needed)

Though I said "300 GB of space isn't hard to come by", some times it actually is. If space is an issue, a simple way to fix it is to tell bitcoin to simple take less space. This is called "pruning" and can take that number from 300 GB down to below 5 GB. If you can't find 5 GB, then you'll have to read ahead to level-3 to add USB storage. But the good news is, enabling pruning is pretty easy, we just add another step to our working list:
  1. Download Bitcoin Core
  2. Launch the downloaded installer and install the app
  3. Launch the installed "Bitcoin Core" app and let it run overnight
  4. Do the wallet encryption steps here if you wish
  5. Choose Options from the Settings Menu
  6. Choose Prune block storage to: and select the max size for the blocks to use
  7. Exit and restart the bitcoin application for the changes to take effect

Pruning Dialog
Note, even setting this to 1 GB will still leave you with about a 4.5 GB install. The blocks take up a lot of space, but the chainstate and other folders eat up at least 3.5 GB and they can't be pruned. Also, be aware, to disable pruning requires you to perform the entire IBD again. While pruned some other functions my be disabled as well, so just know that pruning does limit some functionality.

Tech Skill Level: 3 (verify the installer)

Although this is arguably something that should be done at level-0, some find the intricacies of comparing hash (thumbprint) values to be tedious and beyond the scope of a beginner. You will find these types of hash compares suggested quite often as a way to prevent running tainted programs. Programs are often tainted by bad disk or network performance, but most often, taint is malicious code inserted by viruses or malware. This is a way to guard yourself against those types of attacks. What I cover here is a very basic comparison on the certificate, but a more thorough comparison advised by mosts uses a program called Gpg4Win, and is beyond the scope of this beginners guide. But regardless, most users should strive to do this minimum level of validation.
  1. Download Bitcoin Core
  2. Launch the downloaded installer
  3. When prompted "Do you want to allow..." click Show more details
  4. In the details section select Show information about the publisher's certificate
  5. In the certificate window select the Details tab
  6. In the Details tab Subject should start with "CN = Bitcoin Core Code Signing Association"
  7. Also ensure Thumbprint reads ea27d3cefb3eb715ed214176a5d027e01ba1ee86
  8. If the checks pass, click OK to exit the certificate window and Yes to allow the installer to run.
  9. Launch the installed "Bitcoin Core" app and let it run overnight
  10. Do the wallet encryption steps here if you wish
  11. Do the optional pruning steps here if you wish

Certification Validation Windows
Note: The certificate used to sign the current Bitcoin installer is only valid from March 2020 to March 2021. After that point the thumbprint on the certificate will change. This is by design and intentional. If your reading this post after March 2021, then it is understood that the thumbprint has changed.

Tech Skill Level: 4 (use secondary storage)

We glossed over the "new machine with fairly good internet" part. Truth me known many people do not have fairly new machines, and find the IBD to take longer than the "over night" best wishes. For most people the slowdown is the disk access when calculating what is called chainstate. This requires fast random reads and writes to the disk. If you have an SSD disk, this will be no problem, but if you have a non-SSD "spinning" disk, random writes are always slow. Though an SSD will speed things up, they are pricey, so a nice middle ground may be a simple high-end USB key drive. You can get some with 10 to 15 MB/s random writes which is usually a order of magnitude faster than a "spinning" disk. And with pruning (see level-2), a small USB drive should be fine.
Once you decide on a drive, the tricky part will be to enable external storage. It requires editing a configuration file and adding a few lines. The configuration file needs to be in both the default directory, and USB key drive, but before we do that, we want to create a directory on the key drive. You will need to determine the drive letter of your USB key drive. For the sake of this example, we will assume it is D:, but you must determine this yourself and correct the example. Once you know the drive letter, create a blank folder on the drive called Bitcoin. So for this example, creating Bitcoin on drive D: will create the path D:\Bitcoin. Once done, assuming that D: is your drive, here are the steps to edit the two configuration files:
  1. Download Bitcoin Core
  2. Launch the installer, verify it, then run it
  3. Launch the installed "Bitcoin Core" app and let it run overnight
  4. Do the wallet encryption steps here if you wish
  5. Do the optional pruning steps here if you wish
  6. Launch "Notepad" by typing "Notepad.exe" in the windows search bar then click Open
  7. Type the line datadir=D:\Bitcoin (depending on your drive letter) in the blank file
  8. Choose Save from the File menu in notepad
  9. Type %APPDATA%\Bitcoin\bitcoin.conf (note the percent signs) in the File name box
  10. Select All Files from the Save as type dropdown
  11. Click the Save button and overwrite the file if prompted
  12. Exit and restart the bitcoin application for the changes to take effect

Save As Dialog
Now that you've reached this level of technical expertise, there are many new configuration options that you can begin to modify if you wish. Most configuration data is contained in the bitcoin.conf file and learning how to maintain it is a key step for a node operator.

Tech Skill Level: 5 (all other customizations)

Here's a short list of various things you can ADD to your bitcoin.conf file. You generally just add a new line for each configuration settings.
  • addresstype=bech32
  • changetype=bech32
The addresstype / changetype allows your wallet to use the native-segwit (bech32) format. This is the most efficient and inexpensive way to spend bitcoin, and is a recommended configuration. The default uses something called p2sh-segwit which is more compatible with older wallets, but more expensive to spend.
  • minrelaytxfee=0.00000011
Changing the minrelaytxfee setting allows you to help propagate lower fee transactions. It will require more memory but TXN memory is capped at 300 MB by default anyways, so if you have enough memory, it is a good setting to choose.
  • dbcache=2048
The dbcache setting controls how many MB of memory the program will use for the chainstate database. Since this is a key bottleneck in the IBD, setting this value high (2048 MB) will greatly speed up the IBD, assuming you have the memory to spare
  • blocksdir=C:\Bitcoin
  • datadir=D:\Bitcoin
In level-4 we discussed moving the datadir to a fast external storage, but the majority of the space used for bitcoin is the blocks directory (blocksdir). Although you should always use for fastest storage for datadir, you are free to use slow storage for blocksdir. So if you only want to consume a small amount of your SSD (assumed D:) then you can keep your blocks on your slow "spinning" drive.
  • upnp=1
One of the harder challenges you may face running a node, is to get incoming connections. If you are lucky, you may find that your firewall and network HW support the uPnP protocol. If they do, this setting will allow bitcoin to configure uPnP to allow incoming connections to your node.
submitted by brianddk to brianddk [link] [comments]

Does it helps the network?

Hi guys, in this days I decided to switch from windows to linux (I installed an Ubuntu's distro "Lubuntu") and I also decided to try to run Bitcoin Core on my old but capable pc. I configured the program in order to install the program on the first of the two disks that I have, and in the second disk (both are 320GB) I put the datadir, blockdir ecc files. I also decided to run the node in prune=50'000.
Now I have a question for you: Does a prune node helps the network? I'll speak in a crearer way....if I don't storage the all 280GB of blockchain it will be a problem for the other peers? Does it will be a problem if in a few months I decide to run a lightning network node?
I'll be so grateful if someone will give me some advices.
submitted by pipxy to Bitcoin [link] [comments]

is not pruned!

to have a bitcoin full node on Raspbi I loaded the blockchain with windows on a ssd (vfat), after connection to Raspbi (lubuntu) bitcoin-qt says: sorry your data is pruned, start resync (lasts 4 years). I definitely did not prune, started bitcoin-qt without any commandline options (despite datadir), any idea what went wrong?
submitted by 4piII to Bitcoin [link] [comments]

Bitcoin core configuration in Windows

I've installed Bitcoin Core on Windows with the installer. I don't know how to increase the number of connections. Currently, it's always 8.
Several sources on the internet claim that custom configuration belong to a bitcoin.conf in the AppData/Bitcoin directory. But that doesn't work for me. I tried. In fact, I found out that the configuration including the datadir is currently contained in the registry. Not a single source I could found tells me that the registry contains these config values, so I'm kinda bummed out by this.
In any case, does that mean that I have to add a config value in the registry? And if so, how? The config names are different, namely, the registry config names are in camel case, while the names in bitcoin.conf are like "maxconnections=150". Help!
Edit: I consider the possibility that using the bitcoin.conf actually works and I made a mistake.
Edit2: Only 8 outgoing connections are possible (without addnode), so I opened the firewall as suggested.
Edit3: I finally get incoming connections. It's still slow but I'm optimistic that the speed will increase. It almost feels like synching an Ethereum node ffs.
Edit4: After having had 16 peers at some point yesterday, I'm back to 8 peers and no incoming connections. Speed is 1.3% per hour.
Edit5: I'm under the impression that I simply underestimated the size of the blockchain. I'm used to download huge files within minutes but 200gb is certainly something else. My bandwidth doesn't seem to be used to its full extent but it spikes up to the maximum throughput from time to time, so I guess this is the limiting factor after all. And some people want even larger blocks? F*** that.
submitted by HelloImRich to Bitcoin [link] [comments]

AMA/Tutorial: Run a full node on AWS free tier with local LAN storage

AMA/Tutorial: Run a full node on AWS free tier with local LAN storage
This is a tutorial/AMA on how you can be running a full node, in the AWS cloud, for very low cost or even free.
I used to run a node on my local network but there is a problem with this; your public IP is broadcast, and then it gets associated with Bitcoin. Node owners are likely to own Bitcoin, and this raises your personal threat profile, validated against my IDS/IPS logs.
Run a VPN? Many VPNs are automatically blocked, or sketchy. Tor is also blocked on a large portion of the internet. Neither provide you with a real static IP, and that helps out the network.
There is a easy solution to this; run a node on the AWS free tier, and use an elastic IP so you have a static address. Bandwidth is free in, and low cost out, and you can control how much of that you use easily, and control your spent. The problem is that Amazon charges a LOT for online storage and even with a 1MB blocksize, the blockchain is very large and growing steadily! We mitigate this by using a VPN back to your network, where you can store the blockchain on a SMB share.
It is not complicated to do, but there are very many moving pieces to keep track of and configure. In order to fully trust your node, the best way is to build it from scratch. This is my goal in walking you through the process.
There are lots of ways to accomplish this same task; I only want to present one that works, and you can go from there. Once you have access to the blockchain in the cloud for reasonable prices, you can also look at things like the Lightning Network.
This article makes four major assumptions:

  1. That you have a OpenVPN server on your network and know how to configure it. I use pfSense and OpenVPN; others will work just as well, but you'll need to do a little work to figure out the particulars. If you don't know how, do not fret! There are loads of good tutorials for just about every platform. Or ask below. I also limited the user with access to the share at the firewall specifically to the IP hosting the share to lower the threat envelope.
  2. That you have the blockchain downloaded locally and reasonably up to date. If you don't, head on over to bitcoin.org and download it for OSX or Windows or Linux, whatever you use for your workstation. Follow the directions to set up the software and download/synchronize it to the network. This will take awhile! Once you've synchronized, copy the data directory to your SMB share you want the AWS instance to access. You could also synchronize everything directly on AWS too, but it will likely take longer and may cost a bit for the bandwidth.
  3. That you're on windows. OSX and Linux will have slightly different processes to connect to the instance via the terminal and SSH. If you need help, ask, and I am sure we can get you fixed up.
  4. That you've read the excellent bitcoin.org full node tutorial here: https://bitcoin.org/en/full-node

With that, on with the show!
First: Head on over to https://aws.amazon.com/ and make yourself an account.
Once you've set up you'll need to start the process of creating a virtual machine on AWS. Look for this graphic and click on it:

Start by launching a new machine

Follow the rabbit hole, and you'll be looking to create a plain jane Amazon AMI Linux instance. It looks like this:

Pick the basic AMI instance
Keep in mind you want to pick the x86 version, which is the default.

Continue clicking, you'll want to select the t2.micro instance that is eligible for the free tier for new accounts.

Pick the free tier. You can also upgrade to the smaller tier for more ram, but the micro works for now.
Now, you're going to need a way to connect to your soon-to-be-created node in the cloud. Amazon uses SSH keys to do this, so the next step means you're going to make some. You need to save this file, as if you lose it, you won't be able to access your node anymore. Much like your wallet private keys!

Beware losing your keys!

If you've made it this far, you're almost launched!
Now we need to convert the key to a format that we can use to connect to the instance from Windows. I recommend using Putty! https://www.putty.org/ if you don't have it already; if you're on OSX or Linux, you likely have what you need already.
Follow the guide here to get connected: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html

Next you'll need to set up a opening in the firewall if you want incoming connections. This is done by adding to the security group in the "Network and Security" section; edit it to look like this:

Change the inbound security rules for the instance to accept incoming connections on 8333.

The hard part is over!
Optional: Configuring a static IP. Amazon calls their implementation "elastic" IPs, but it's really a static IP that you can move around between instances very easily. It will ensure your public address on AWS does not change; it isn't required, but it is better if you intend on allowing outgoing connections.
Go back to the main dashboard display.
In "Network and Security", click on "Elastic IPs".
Select Allocate New Address (blue button on top) and then select it in the table. In actions, you will see "Associate Address". Select this then assign the address to the instance you have previously configured. Done!

Next up: Log into your machine, and immediately update everything. Use the IP provided by Amazon, or the Elastic IP if you assigned one to the instance in the last step.
type: "sudo yum update"

Now, let's get the VPN configured.
First step is to install OpenVPN. We need to install the extended package library to do this.
type: "sudo amazon-linux-extras install epel"
type: "sudo yum-config-manager --enable epel"
Now you can install OpenVPN.
type: "sudo yum install openvpn"
You will need your credential file from OpenVPN; it's a file you generate that will have a .ovpn extension. But you're going to need to upload it to the instance. You can do this through the scp command on OSX or Linux, but if you're on Windows, you'll need another utility. Get WinSCP here: https://winscp.net/eng/download.php
But we'll have to tell it where your key file is so you can login. Select "New Session", then use the same IP and username as you did to connect before. We'll need to tell it about the key file though! Select the "Advanced" tab then under the SSH section, click on "Authentication" and then select your private key file you generated in the tutorial above.
Connect and upload the .ovpn file that you generated when you added a user for the VPN. This step depends on your OpenVPN configuration - ask below if you have problems.
Next, let's verify we can connect to the VPN!
type: "openvpn --config my-configuration-file-made-by-openvpn.ovpn &"
You will be prompted for a password if you configured one.
Verify operation by pinging your LAN router, e.g.
type: "ping 192.168.2.1" or the address of the SMB server where you shared the information.

Allllrighty! Next up is getting connected to your blockchain. Create a directory where the data directory will be mounted.
type: "mkdir blockchain"
We need to install samba and some utilities to get things mounted.
type: "sudo yum install samba"
type: "sudo yum install cifs-utils"

Now let's mount the folder:
type: "sudo mount -t cifs //192.168.2.100/Bitcoin ./blockchain -o user=bitcoin,vers=2.0,uid=ec2-user,gid=ec2 user,file_mode=0777,dir_mode=0777"
Where " //192.168.2.100/Bitcoin" is the address of the SMB server and share where you put the data directory from your initial sync. If you didn't, and just want to sync everything from AWS, then make sure it's a folder where your user has access. In this case, I'm assuming you've made a SMB user with the name "Bitcoin". The command will prompt you for the password to access the share. The other bits ensure you can have read and write access to the share once it's mounted in AWS.

Now we're ready for some Bitcoin! Props to the tutorial here: https://hackernoon.com/a-complete-beginners-guide-to-installing-a-bitcoin-full-node-on-linux-2018-edition-cb8e384479ea
But I'll summarize for you:
Download and then re-upload with WinSCP, or download directly to your instance with wget, the most current Bitcoin core. In this case, it's bitcoin-0.18.0-i686-pc-linux-gnu.tar.gz downloaded from https://bitcoin.org/en/bitcoin-core/.
Let's verify it hasn't been tampered with once you have it uploaded to the terminal:
type: "sha256sum bitcoin-0.18.0-i686-pc-linux-gnu.tar.gz"
Then compare that with the hash value that's listed in the SHA256SUMS.asc file on bitcoin.org. In this case, "36ce9ffb375f6ee280df5a86e61038e3c475ab9dee34f6f89ea82b65a264183b" all matches up, so we know nobody has done anything evil or nefarious to the file.
Unzip the file:
type: "tar zxvf bitcoin-0.18.0-i686-pc-linux-gnu.tar.gz"
There is a warning about a symbolic link; everything seems to work OK regardless, but if anyone knows what or how to fix, please comment.
We'll need to get some missing libraries before we can run it; these aren't in the basic AMI instance.
type: "sudo yum install glibc.i686"
type: "yum install libgcc_s.so.1"

FINALLY! We are ready to launch the program. Go to the "bin" directory inside where you unzipped the Bitcoin Core tarball. (e.g. /home/ec2-useblockchain/bitcoin-0.18.0/bin)
./bitcoind -datadir=/home/ec2-useblockchain/data
You will see the program either start to sync and download, or start to read the existing blockchain file that you put in the share from before.

Congrats!

There are a couple extra steps to have it automatically start on reboot, but let's see if anyone gets this far first. I use the "screen" program to do this, but there's also a daemon mode, and some other functionality that is discussed in the hackernoon tutorial.
The primary cost will be outgoing bandwidth. AWS charges $0.10/GB beyond 15GB; You can limit the outgoing bandwidth easily according to your budget: https://bitcoin.org/en/full-node#reduce-traffic

Hope this encourages people to try running a free, or very low cost, cloud node, with a substantially reduced threat profile.
submitted by xtal_00 to Bitcoin [link] [comments]

Help: Bitcoin Core does not auto start in Ubuntu with -datadir option

Please can someone help me out?
I have installed Ubuntu in VirtualBox to host Bitcoin Core. In VirtualBox I assigned a special disk with the blockchain. I am however new to Ubuntu. I am a Windows crack.
When I start bitcoin core from a terminal command prompt like:
bitcoin-qt -datadir=/media//Blockchain
then Bitcoin core starts correctly. "" is my username to login to Ubuntu. "Blockchain" is how the disk is named in VirtualBox. The host system is Windows 10.
However when I configure this command in the 'startup applications' of Ubuntu to start bitcoin core automatically when Ubuntu starts, I get the error message the path cannot be found.
While I am writing this post, I think it may be possible Ubuntu did not logged me in under username yet when auto starting bitcoin core, but this is a wild quess.
Is there an Ubuntu crack who can help me out please?
submitted by pdlvw 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]

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]

Any wallets other than QT that support *.dat format?

So my ssd main drive crashed and I had to switch to a smaller one lying around here. So I don't have space for the blockchain anymore on my main drive. But I can't find any other wallet I can use to put my backed up files to use with, I know of blockchain.info but that is not my style...
Also if there is a permanent way of setting the datadir of bitcoin-QT I could happily do that. I used to run the largest node in my country so this is kinda sad for me.
submitted by kerstn to BitcoinWallet [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]

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]

How to run both BTC and BCC nodes simultaneously?

Hi,
I've been running a full BTC node for a few months now and i'd like to setup a BCC node as well to run in paralel.
Problem is, I can't seem to run both versions of the protocol at the same time. I tried with the Core, Unlimited (core & cash versions) and Bitcoin ABC but I can't seem to specify to different data directories.
I specified the datadir to certain drive when I first installed my wallet but I can't find the options to have 2 seperate directories for the different versions of the wallets.
They all point to the same folder and I get an error message when I open a second wallet when another has already been running.
Has anyone had success running both from the same Windows session?
EDIT : Found the very embarassing solution. I had the datadir folder as ''Bitcoin Cash'' and it redirected to the Bitcoin folder because of the space between the 2 words. Changed the folder name to ''BitcoinCash'' and it worked.
submitted by adeni to btc [link] [comments]

-reindex option doesn't fix a corrupted blockchain, it's downloading all over again.

This is a follow up to the corrupted blockchain problem described by me 5 days ago: https://www.reddit.com/BitcoinBeginners/comments/8zysbx/error_when_running_a_bitcoin_core_node_corruption/
As bitusher suggested, I ran:
./bitcoind.exe -reindex --datadir=G:\Bitcoin\Bitcoin_core\Bitcoin\blockchain 
Before that I had even tried the option -reindex-chainstate but it failed for some reason.
After about 8 hours, the reindex finished but it's downloading the blockchain all over again although I already have 200 GB of blockchain data. I can see this by running:
Bitcoin\daemon> .\bitcoin-cli.exe getblockcount 323136 (wait some minutes...) Bitcoin\daemon> .\bitcoin-cli.exe getblockcount 326069 
The point when it went from reindexing to downloading the blockchain all over again looks like this in debug.log:
2018-07-24 08:32:09 Reindexing block file blk01265.dat... 2018-07-24 08:33:57 Loaded 962 blocks from external file in 107945ms 2018-07-24 08:33:57 Reindexing finished 2018-07-24 08:33:57 Pre-allocating up to position 0x100000 in rev00000.dat 2018-07-24 08:33:58 UpdateTip: new best=00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048 height=1 version=0x00000001 log2_work=33.000022 tx=2 date='2009-01-09 02:54:25' progress=0.000000 cache=0.0MiB(1txo) 2018-07-24 08:33:58 UpdateTip: new best=000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd height=2 version=0x00000001 log2_work=33.584985 tx=3 date='2009-01-09 02:55:44' progress=0.000000 cache=0.0MiB(2txo) ... 2018-07-24 15:28:52 UpdateTip: new best=00000000000000000c84841e1450c8644dfe5a85528ae551f8862a688b55db61 height=331606 version=0x00000002 log2_work=81.568221 tx=52347394 date='2014-11-25 21:30:09' progress=0.149665 cache=2153.7MiB(16335495txo) 2018-07-24 15:28:52 Pre-allocating up to position 0x200000 in rev00200.dat 2018-07-24 15:28:53 UpdateTip: new best=0000000000000000103e002b3231dbee391cf38a2890e310b3e9ee3b785a172a height=331607 version=0x00000002 log2_work=81.568291 tx=52348058 date='2014-11-25 21:40:24' progress=0.149667 cache=2153.7MiB(16334996txo) 2018-07-24 15:28:53 UpdateTip: new best=00000000000000001ac7a4a8f8b910236cfbe1ec2343af4fbe9b8dd1691b7433 height=331608 version=0x00000002 log2_work=81.56836 tx=52348254 date='2014-11-25 21:42:35' progress=0.149667 cache=2153.6MiB(16334923txo) 2018-07-24 15:28:53 UpdateTip: new best=000000000000000006ecf1eb304f3edf56f8ebea62183f8ffbb37653433d196b height=331609 version=0x00000002 log2_work=81.56843 tx=52348821 date='2014-11-25 21:52:17' progress=0.149669 cache=2153.7MiB(16334989txo) 2018-07-24 15:28:53 UpdateTip: new best=00000000000000001864ff1e384b409d9c26745e3dc36a77cb3068959c6244f7 height=331610 version=0x00000002 log2_work=81.5685 tx=52349053 date='2014-11-25 21:55:54' progress=0.149670 cache=2153.7MiB(16335046txo) 2018-07-24 15:28:53 UpdateTip: new best=000000000000000019ff0a26dd1c684661a624f52a78185ba60ad63a464be92e height=331611 version=0x00000002 log2_work=81.568569 tx=52349229 date='2014-11-25 21:57:40' progress=0.149670 cache=2153.6MiB(16334946txo) 2018-07-24 15:28:54 UpdateTip: new best=00000000000000000775b876ee6d5ef4e74ec728d92ea37f249cf4183e8d8447 height=331612 version=0x00000002 log2_work=81.568639 tx=52350965 date='2014-11-25 22:27:56' progress=0.149675 cache=2153.7MiB(16335409txo) 2018-07-24 15:28:54 Pre-allocating up to position 0x1200000 in rev00199.dat 2018-07-24 15:28:54 UpdateTip: new best=000000000000000009547c69932fa9cc2a8d2c9f6449ef23db13da3f71ac8d40 height=331613 version=0x00000002 log2_work=81.568709 tx=52351547 date='2014-11-25 22:36:56' progress=0.149677 cache=2153.6MiB(16334933txo) 
I am feeling pretty frustrated because I can't run a simple bitcoin node every once in a while. Seems like every time I close bitcoind or bitcoin-qt the blockchain gets corrupted. I have found several people complaining about this problem online but I haven't found any definitive solution. Seems like avoiding windows is a good thing (I like to use the same blockchain folder that I store in an external hard drive in both windows and linux).
TLDR
1 - How to avoid getting a corrupted blockchain in both windows and linux and both bitcoin-qt and bitcoind?
2 - How to fix a corrupted blockchain quickly, if this is even possible. -reindex and -reindex-chainstate don't seem to work in my case.
If this doesn't get solved here, I am opening an issue in bitcoin's github.
submitted by johnturtle to BitcoinBeginners [link] [comments]

The bitcoin-qt core wallet in pruned mode, cold storage and scaling: test results.

CONCLUSION
 
DETAILS
First a wallet was created in the following way:
bitcoin-qt -connect=wrong_ip_address -prune=550 -listen=0 -datadir=/home/use.bitcoin_pruned &
The trick here is to add a wrong ip address so bitcoin-qt won't start loading blocks. The -listen=0 makes it possible to run bitcoin-qt while bitcoind (as a full archival node) is running in the background on the same computer.
 
Now some "watch only" addresses, that already had some bitcoin in them, were added
(in bitcoin-qt: help -> Debug window -> Console)
importaddress watch_only_address "" false
The pruned blockchain was then created by inserting the correct ip address (pointing to my node) or by removing "-connect=ip_address" completely.
 
Because bitcoin-qt was not the only program, creating the pruned blockchain was a very long process that took about 5 days! I could speed up the process a lot by turning off bitcoind and running the pruned node as a bitcoind with some extra priority:
sudo /usbin/ionice -c 2 -n 0 /usbin/nice -n -20 ./bitcoind -datadir=/home/use.bitcoin_pruned/
Had I done that from the start, it could have been much faster and maybe 1 or 2 days would have been enough.
The final pruned blockchain has a size of: 2542 MB so about 2.5 GB.
 
I now moved the wallet.dat to wallet.dat_back and restarted bitcoin-qt. The program will create a new wallet that can be used to receive and then send transactions. If you now add a private key that already has some bitcoins in it, they will NOT be visible. There is no reason for that as the balances (not the history) are in the UTXO set.
 
I now started bitcoin-qt with the original wallet.dat file. The bitcoins in the watch only addresses are now visible. I then imported the private key of one of the addresses but the move of the bitcoins from "Watch only" to "Spendable" was not visible in bitcoin-qt. However, after a restart of bitcoin-qt the funds were visible in the "Spendable" section of the wallet. I then did a transaction to another address. Now in this case I want the change of the transaction to stay within MY "watch only" addresses and they shouldn't move to the (arbitrary) addresses created when the wallet was created. This is fortunate possible in bitcoin-qt. You have to choose in bitcoin-qt:
Settings -> Options -> Wallet -> Enable coin controle features.
It is then possible to choose the return address to be one of the watch only addresses (with or without bitcoins in them). It all worked just fine! It is not clear to me why bitcoin-qt has the option to "importprunedfunds", that doesn't seem necessary.
 
Of course, a big thank you to all developers who implemented the currently available great features.
submitted by sumBTC to Bitcoin [link] [comments]

Guidance please on how to import .dat file in BTC core 0.16.0

Hi guys!
Backstory:
My old friend, somehow bought BTC before the mtgox hack, somewhere in 2013 probably. In fact he doesn't really remember. He gave me his MacBook, from which I've extracted the wallet.dat file, and made a couple of backups of said file.
Specs: Windows 10, x64 install of BTC core, have not fully synced the blockchain as of yet.
My current problem:
I've tried following this really helpfull guide, but I'm getting stuck since I cant find the datadir file to replace the wallet.dat file. (please note that I've installed the program files as well as the blockchain location on my secondary drive because that has enough space for the blockchain, and am currently trying again with program data in C, blockchain data in D).
My anticipated problem:
He has a guess about the passphrase its something in the format of 'vaalkeo12' or something. After I've exhausted the most logical combinations is there still a (semi-noobfriendly way to crack the passphrase)?
Assuming this goes well I'd then dumpwallet for a human readable version of the private key, said private key I could then import into for example electrum wallet, and then send the files to a new wallet, and make a paper wallet/usb stick backup of it.
To summarize my questions: - How do I replace the BTC Core wallet.dat if I cant find the datadir? (bitcoin.it's guide says you can choose a datadir by rightclicking the exe under properties but I see no such option? - If I cant find the right passhprase any reccomended course of action? - Once I have the private key, which client do you recommend me to import it in? - Any other pointers or things I should anticipate?
Any advice would be greatly appreciated!
Sorry for spelling/grammar, throwaway for privacy reasons!
Thank you for reading.
submitted by discardez to Bitcoin [link] [comments]

Installing a Bitcoin XT full node to access your BCC

If you are already running a satoshi client, you can be up and running pretty quickly with BCC, using the invalidateblock method below to get yourself onto the Bitcoin Cash chain.
I tested this with XT release G. If you are using another satoshi-derived Bitcoin Cash full node implementation, please look for instructions for that client.
STEP 1
Make a copy of the entire data directory -- including the wallet file, if you want access to your BCC coins. Once you create this new copy of your wallet, treat it just as you treat any other independent wallet. Make backups. From the moment you start sending/receiving BCC, this wallet will contain different information than the BTC wallet you copied from (and that original wallet still controls your BTC!)
Another way to bring your coins over that some prefer is to export and import the private keys.
STEP 2
Getting ready to launch your XT client.
Use the -datadir parameter to point your new BCC client at your newly copied data directory when launching. If you accidentally forget to do this, and start doing BCC stuff with your existing directory, your wallet may quickly become broken for use with BTC
The easy, but very slow way to get onto the correct chain is, in addition to the -datadir parameter, specify the -reindex command-line parameter when launching Bitcoin XT the first time. The reindexing process could last several days before the program finishes launching.
Also, if you use -reindex, REMOVE it from your launch shortcut / command line before running next time, or you will start the whole reindex process over again next time!
QUICK METHOD TO GET ONTO THE RIGHT CHAIN
Launch with new -datadir as specified above, but do not use -reindex. Launch should be as quick as usual, but you will be on the wrong chain. You'll see your BTC balance (displayed as BCC) but you won't see any new blocks.
To get onto the right chain, go to Help->Debug Window->Console tab (or use bitcoin-cli on the command line), and issue the command
invalidateblock 00000000000000000019f112ec0a9982926f1258cdcc558dd7c3b7e5dc7fa148
This is the post-fork block on the BTC side.
This will take you back to the fork point, which is at block height 478558. It may take a while (an hour for me) for this to happen. The debug window doesn't provide status updates but you can look in the debug.log file for UpdateTip messages that show block height decreasing toward 478558 (and a log of SIGHASH_FORKID errors from all the unwound transactions that are not valid to Bitcoin Cash)
To make sure you don't get stuck at the fork point, also issue this command:
reconsiderblock 000000000000000000651ef99cb9fcbe0dadde1d424bd9f15ff20136191a5eec
This is the post-fork block on the BCC side.
At this point Bitcoin Cash blocks should begin arriving and you'll soon sync to the end of the Bitcoin Cash chain.
submitted by biosense to btc [link] [comments]

[PSA] Keeping your doge safe.

There's multiple ways you could go about doing this. Here are two methods that I know.
You could have a usb, external hdd, etc. with your wallet on it (Basically making a mobile wallet).
I see this being moderately safe as you always have your wallet with you. I do believe that the only way someone can gain access to your wallet is if they get the files from the USB or the USB itself. Although I am unsure of the threat of using your wallet on multiple machines as far as hacking goes.
OR
You could have a designated laptop/machine for your wallet.
Think of this method as a bank. Your main machine, machine A, is used for everyday use (So mainly Reddit). Machine B is your "vault/bank" or "offline" machine. All obtained doge (from mining, tips, services, etc.) are sent to Machine A. From there, you would send said doge to Machine B. You would then turn on Machine B, connect it to the internet and confirm that the doge was received. Machine B would then be disconnected from the internet. Now you have an offline machine (vault/bank) holding your doge.
Now lets say that you want to spend some of your doge. Turn on/Connect Machine B to the internet. Now send the desired amount of doge from Machine B to Machine A. Then disconnect Machine B from the internet. The amount of doge that you wish to spend is now on Machine A rather than Machine B.
This is probably the safest method that you could use between the two or just in general.
I guess if you wanted to be even safer, you could always use different addresses between transactions between your machines. Also, you could have multiple offline machines/wallets to spread your doge between to be even safer. Or even mix these two methods so you would have both a mobile wallet, offline wallet (bank), and your online wallet (main machine).
Edit: formatting
submitted by Zibal to dogecoin [link] [comments]

Question: How to split Bitcoin Core data directory (Windows)

Hi,
Anyone could tell me how do I split the different parts of the data directory in windows between different folders?
Currently I have:
I'm using a "modified shortcut" with the "-datadir" command to run the app (in my PC) using the datadir everytime I plug the drive the external USB drive. (From what I read this should improve performance using an SSD without spending a lot of space in the SSD)
A shortcut with something like this: -datadir=X:\BTC\Bitcoin (this folder has my wallet and is over 80GB).
What I would like to achieve is to have the "chainstate" folder (It's a 2-3GB folder) in my local C: drive (SSD). But ALL the rest in my external USB drive.
So,
A) Is this possible? (To have chainstate and client in C: and the rest of the data directory with wallet in an external USB?)
Additionally. I'm going to buy a 1TB SSD. When that happens, I would like to have everything BUT the wallet in that local SSD. And the wallet, in an external drive. So everytime I want to run Bitcoin, I connect the USB drive (with the wallet) before opening the app. So:
B) How can I have the Wallet in an external USB drive, and all the rest of the data directory (without wallet) in my local drive?
Currently, the -datadir command is not useful, because I can't split the different components of the data directory.
BTW, I got this idea from here:
https://en.bitcoin.it/wiki/Data_directory#chainstate_subdirectory
https://en.bitcoin.it/wiki/Splitting_the_data_directory
I've tried to cut/paste the chainstate to another folder, but failed (because started to create a new chainstate folder) and now rolled back the original chainstate folder, and the app is "Rescanning"
Thanks!
EDIT: Ok I've done this. Now I understand the tutorial from https://en.bitcoin.it/wiki/Splitting_the_data_directory With the "mklink" a "symbolic link" is created. So: 1) I moved the "chainstate" folder from the external drive to the C: drive. 2) I created this symbolic link in my external USB drive. The link created is pointing to my C: drive's chainstate folder. I've never used symbolic links before....(had some idea of them from Android, but never in windows). I'll give this a try. So far the speed to build a block has been triplicated, maybe more. My progress increase per hour was 4%, now is 14% with 3GB cache
submitted by amenotef to BitcoinBeginners [link] [comments]

Lastpass & 1Password ✅ 2 geniale Passwort-Tools Database Lecture5part2 Changing cryptocurrency wallet location (Dogecoin - Bitcoin - Litecoin ....) Tone Vays - Full Node Config - From My Understanding - 03 June 2017 YouTube: Kostenpflichtige Kanäle

C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe" -datadir=d:\BitcoinData Starten Sie Bitcoin, jetzt sehen Sie, dass alle Dateien im neuen Datenverzeichnis erstellt wurden. Linux . Standardmäßig legt Bitcoin seine Daten hier ab: ~/.bitcoin/ Sie müssen ein "ls -a" machen, um Verzeichnisse zu sehen, die mit einem Punkt beginnen. Unter Windows 10 haben Sie gleich drei Optionen, sich den Ordner AppData anzeigen zu lassen. Finden Sie zuerst unsere Schnellanleitung oder schauen Sie darunter in unsere Schritt-für-Schritt-Anleitung - dort zeigen wir Ihnen, wie Sie den Ordner finden. Öffnen Sie den Explorer und tragen Sie den Suchbegriff %appdata% in das Suchfeld ein. Bestätigen Sie mit [Enter], um sich den Ordner ... Bitcoin Core normally puts all of its data into one data directory, but oftentimes it is useful to adjust things so that certain of these files go elsewhere.. If your data directory is on a magnetic disk: Moving chainstate for improved speed. Bitcoin Core's overall speed is significantly affected by the random-access speed of the contents of the chainstate directory; if your data directory is ... "C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe" -datadir=d:\BitcoinData Start Bitcoin, now you will see all the files are created in the new data directory. Linux. By default Bitcoin will put its data here: ~/.bitcoin/ You need to do a "ls -a" to see directories that start with a dot. If that's not it, you can do a search like this: The first step is finding the default data directory. Mac, Windows, and Linux version of Bitcoin Core each store data in a different location. The procedure described here will use a graphical file browser to find it. On Windows 7, begin by clicking on the Windows menu. Then click your username from the right-hand menu. Windows Explorer should ...

[index] [22808] [10601] [14128] [26616] [11423] [12992] [47783] [46899] [42466] [6747]

Lastpass & 1Password ✅ 2 geniale Passwort-Tools

BTC-ECHO Bitcoin News & Tutorials 15,027 views. 9:04. PHOTOVOLTAIK - ZUKUNFT VON MARKT UND TECHNOLOGIE - Duration: 28:20. Leben mit der Energiewende Recommended for you. 28:20. Best Password ... For the Love of Physics - Walter Lewin - May 16, 2011 - Duration: 1:01:26. Lectures by Walter Lewin. They will make you ♥ Physics. Recommended for you Перенос тяжёлого крипто бумажника bitcoin с диска C на диск D: 1.на диске С в папке "Program Files" найти папку "bitcoin ... Tone Vays - Full Node Config - From My Understanding - 03 June 2017 BTC at $4,000...I mean BTC at $2,440...BTC at $4k would be good though... I could be Sato... Banking on Bitcoin YouTube Movies. 2017 · Documentary; 1:23:41. How do I select multiple rows and columns from a pandas DataFrame? - Duration: 21:47. Data School 175,087 views. 21:47. Microsoft ...

#