Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: AB de Royse777 on March 07, 2019, 04:51:45 PM



Title: Finally setting up a full node
Post by: AB de Royse777 on March 07, 2019, 04:51:45 PM
As the title say. Finally I thought to run a Bitcoin full node with the hope to contribute for the Bitcoin Network. I feel ashamed that all those days I did not run a full node. All blame goes to Electrum though :-P

Notice the image, it says 7 years 40 weeks.

https://i.imgur.com/XPphFuc.png

Anyway, I have one question for now, may be I will need to find answers for more if I need.

= I am downloading it to an external device which size is over 1Terabyte. Once the synchronization will be done then can I just remove it from the current machine and connect it with any other machine. Install the core in the 2nd machine and show the folder path of the external device. Will this work?


Quote
Bitcoin Client Software and Version Number: 0.17.1
Operating System: Win 7, 64-bit
System Hardware Specs: RAM 10GB, Intel Core i5-6500 CPU @ 3.20 GHz 3.20 GHz
Description of Problem: No prob yet
Any Related Addresses: N/A
Any Related Transaction IDs: N/A
Screenshot of the problem: N/A
Log Files from the Bitcoin Client: N/A

Please help me to understand.
#1 I see backup wallet feature but I do not see any restore option.

Since there are no restore option then how do we do that?
Is this a correct way:
Imagine I have a wallet.dat file from Electrum. Do I just copy and past it in the main directory and replace the current .DAT file?

#2 In Electrum we can create as many wallet as we can using the 12 word seeds and extended seeds.
In Bitcoin core a full node is one wallet?

#3 How can I create a multiSign wallet? I do not see any feature. I think a full node is only one wallet if the #2 is correct.

#4 Is there any easy way to "Send to many" option.
In Electrum we can just paste the addresses separating by comma with the amount in each line but here we do not have such feature. The one we have is click and fill the form which is not much user friendly. Is there any other way?

#5 If I use the encrypt wallet feature then this means the current wallet.dat file gets encrypted. How do I recover it? Follow #1 if my explanation is correct and in this case I will need the password phrase?

#6 If someone want to take the full node from me. I give them everything except the wallet.dat file? I mean which are the files I am okay to give them if they want to get the files from me to run their own full node?

#7 This full node is of-course helping the Bitcoin Network and I am happy with that. My question is that running this full node gives me any personal benefit?
I understand miners earn Bitcoin from the network by solving the algorithm and from transaction fees but for a full noder, is there any financial gain?

Cheers :-)


Title: Re: Finally setting up a full node
Post by: Rath_ on March 07, 2019, 06:14:33 PM
= I am downloading it to an external device which size is over 1Terabyte. Once the synchronization will be done then can I just remove it from the current machine and connect it with any other machine. Install the core in the 2nd machine and show the folder path of the external device. Will this work?

Don't unplug the drive without waiting for Bitcoin Core to shut down completely. You might suffer from the problem described by @ETFbitcoin.


Title: Re: Finally setting up a full node
Post by: BitMaxz on March 07, 2019, 11:29:43 PM

Did you install the Bitcoin core just today? Just suggestion.
If you want to speed up the process of synchronizing you can download the blockchain.
There is an updated thread where you can download the whole blockchain check it from here https://bitcointalk.org/index.php?topic=1310261.160

Or if you have a friend with the full node you can copy the whole directory including the blockchain to transfer it into your own PC.


Title: Re: Finally setting up a full node
Post by: pooya87 on March 08, 2019, 04:41:43 AM

Did you install the Bitcoin core just today? Just suggestion.
If you want to speed up the process of synchronizing you can download the blockchain.
There is an updated thread where you can download the whole blockchain check it from here https://bitcointalk.org/index.php?topic=1310261.160

Or if you have a friend with the full node you can copy the whole directory including the blockchain to transfer it into your own PC.

i believe downloading the blockchain from somewhere else like the torrent file stopped being faster a long time ago. now it can even be slower.
remember that you still have to verify the whole blockchain so the process is the same you just download it elsewhere instead of letting the node software download it itself.


Title: Re: Finally setting up a full node
Post by: AB de Royse777 on March 08, 2019, 06:50:57 PM
I am okay with downloading the entire blockchian. I have not in hurry for it. He is the latest update:

https://i.imgur.com/r35sxgf.png

I ran the system for 4 to 5 hours all together since I installed the core. I think progress is okay so far?

By the way, I will have a lot of questions coming in soon. Let the synchronization done first. Thanks for all the inputs so far.

Cheers :-)


Title: Re: Finally setting up a full node
Post by: RapTarX on March 09, 2019, 07:59:12 AM
That's nice of you. I was also planning the same and have already purchased an external disk but these days so much busy that I can't start it yet.
I have reacently read some artciles on it. I want to link some of these articles here, these may assist you.

https://99bitcoins.com/step-by-step-guide-firing-up-bitcoin-node/
https://www.deepdotweb.com/2017/05/05/tutorial-start-full-bitcoin-node-windows/


Title: Re: Finally setting up a full node
Post by: AB de Royse777 on March 09, 2019, 11:24:59 AM
That's nice of you. I was also planning the same and have already purchased an external disk but these days so much busy that I can't start it yet.
I have reacently read some artciles on it. I want to link some of these articles here, these may assist you.

https://99bitcoins.com/step-by-step-guide-firing-up-bitcoin-node/
https://www.deepdotweb.com/2017/05/05/tutorial-start-full-bitcoin-node-windows/
Thanks for the links.

About starting your own full node.
I understand the busy part of our life. Same happened with me too. It's been long years I am with Crypto but never found the time to install the Bitcoin core. But when I did I thought oh well it's very easy. Just like installing a random application in your system.

The only thing takes time is the network to synchronize. As a user, you are not doing that. You just open the application once you are using your system and leave it aside while you are working. Although my one is running in a different PC. I have few laptops and desktops in my house.

I hope this inspires you to run your own node.

Take the first step. Here (https://bitcoin.org/en/download) :-)

Cheers :-)


Title: Re: Finally setting up a full node
Post by: RapTarX on March 10, 2019, 08:10:13 AM
I hope this inspires you to run your own node.

Take the first step. Here (https://bitcoin.org/en/download) :-)

Cheers :-)
I already had once tried it but didn't know I need more space in my disk. Then I left it for sometimes. Probably, in this weekend, I will start setting up. I have studied on it for someday.
Thank you, anyway.


Title: Re: Finally setting up a full node
Post by: Real-Duke on March 10, 2019, 10:24:54 AM
Iam running my own full node now since 4 years on a little banana pi (similiar to a Raspberry Pi 2) that consums ~8 watts
There is no need for using a high-end computer but for the first sync of the blockchain I would recommend to do so ;)
With a 1 TB HDD you should be fine for a few years...
Here is our topic about the project (sorry in german) https://bitcointalk.org/index.php?topic=973628.0


Title: Re: Finally setting up a full node
Post by: AB de Royse777 on March 10, 2019, 11:48:30 AM
Iam running my own full node now since 4 years on a little banana pi (similiar to a Raspberry Pi 2) that consums ~8 watts
There is no need for using a high-end computer but for the first sync of the blockchain I would recommend to do so ;)
With a 1 TB HDD you should be fine for a few years...
Here is our topic about the project (sorry in german) https://bitcointalk.org/index.php?topic=973628.0
Thanks for the information. I read through the requirements. Very cost effective in my opinion and worth giving it a try however I will see how the current process is working for the time being.

I am excited to take the experience.

This is where I am standing now.

https://i.imgur.com/8dUdJaA.png


Title: Re: Finally setting up a full node
Post by: Real-Duke on March 10, 2019, 04:40:57 PM
Last time I had to sync form scratch took me around 6 hours ;)
But to be honest, I have Fiber Internet with 500/100 connection speed...


Title: Re: Finally setting up a full node
Post by: DaCryptoRaccoon on March 10, 2019, 05:30:33 PM
Not sure if this helps but I found this.

https://bitcoin.org/bin/block-chain/

Seems to be a torrent link to the blockchain in bootstrap type format.

there is also reference to this here though the link seems to be changed.

https://bitcointalk.org/index.php?topic=145386.0

As per the above you should do verification on this if you use it.


Title: Re: Finally setting up a full node
Post by: Carlton Banks on March 10, 2019, 06:07:01 PM
Not sure if this helps but I found this.

https://bitcoin.org/bin/block-chain/

Seems to be a torrent link to the blockchain in bootstrap type format.

I doubt that's being updated any longer, it was superseded by "headers-first" downloading in version 0.10 (parallel downloading didn't work before headers-first. Bittorrent only downloads, it doesn't check the blocks, which is what really takes all the time). Version 0.10 was a very long time ago.


Title: Re: Finally setting up a full node
Post by: HCP on March 10, 2019, 08:29:13 PM
Not sure if this helps but I found this.

https://bitcoin.org/bin/block-chain/
I doubt that's being updated any longer, it was superseded by "headers-first" downloading in version 0.10 (parallel downloading didn't work before headers-first. Bittorrent only downloads, it doesn't check the blocks, which is what really takes all the time). Version 0.10 was a very long time ago.

Indeed... from the bootstrap.txt file:
Block height: 317000
So you're missing around 250,000 blocks... and the files were uploaded on 24-Aug-2014 01:40 :P

As has been mentioned several times, "syncing" the blockchain is NOT just "downloading" blocks... those blocks need to be verified and it is this processing, which is highly CPU and disk IO intensive, that is generally the bottleneck when syncing.

All the fibre bandwidth in the world won't help much if you're running on an old dual core CPU with 2 Gigs RAM using a 5400 RPM HDD :P


Title: Re: Finally setting up a full node
Post by: AB de Royse777 on March 11, 2019, 02:51:49 PM
~snip~
All the fibre bandwidth in the world won't help much if you're running on an old dual core CPU with 2 Gigs RAM using a 5400 RPM HDD :P

Utterly and butterly true :-P

Anyway, I am hoping finally today the entire synchronization will finish. Around 80k blocks are reaming for my full node. I will then start playing with the system :-)


Title: Re: Finally setting up a full node
Post by: AB de Royse777 on March 11, 2019, 06:46:50 PM
~snip~

Additionally database format was changed since Core 0.15.0 which means you'll need to wait for database conversion to newer format and verify the blocks.

I've no idea how long it'd take, but probably you will waste more time rather than download whole Blockchain using Bitcoin Core directly.
I was not aware of this newer format. My node is few hours behind to finish the synchronizing. i am happy with the process so far.

Try downloading the blockchain first. Probably to late on response :(
Download from here? I think you have not read the responses so far.


Title: Re: Finally setting up a full node
Post by: RodeoX on March 11, 2019, 07:03:29 PM
I just rebuilt my Linux node machine recently. A full DL of the blockchain took a full week.  Fortunately storage is so cheep that I was able to go with a 3 Terabyte HD. That should hold me for a few years. I like having a dedicated machine like this. I usually shop on a different computer and spend from my node for additional privacy.   

Thanks for contributing to the network's strength and resilience!


Title: Re: Finally setting up a full node
Post by: Carlton Banks on March 11, 2019, 08:07:00 PM
I doubt that's being updated any longer, it was superseded by "headers-first" downloading in version 0.10 (parallel downloading didn't work before headers-first. Bittorrent only downloads, it doesn't check the blocks, which is what really takes all the time). Version 0.10 was a very long time ago.

Additionally database format was changed since Core 0.15.0 which means you'll need to wait for database conversion to newer format and verify the blocks.

I've no idea how long it'd take, but probably you will waste more time rather than download whole Blockchain using Bitcoin Core directly.

I think only the chainstate database changed format, and I would assume the torrent file contained only the blocks. It makes no difference anyhow, the torrent is probably not being seeded anymore, and of course using Bitcoin to do the IDB is, as you say, quicker in any case


Title: Re: Finally setting up a full node
Post by: AB de Royse777 on March 13, 2019, 03:50:52 PM
Finally the synchronization has done.

https://i.imgur.com/Aw60gon.png

The total file size is now 224 GB. I want to play with the entire system and before I do that do you think I keep a copy of the current entire folder?


Title: Re: Finally setting up a full node
Post by: AB de Royse777 on March 13, 2019, 06:37:42 PM
After the synchronization so far these are the things I am wondering. I will be happy to get responses on these please:

#1 I see backup wallet feature but I do not see any restore option.

Since there are no restore option then how do we do that?
Is this a correct way:
Imagine I have a wallet.dat file from Electrum. Do I just copy and past it in the main directory and replace the current .DAT file?

#2 In Electrum we can create as many wallet as we can using the 12 word seeds and extended seeds.
In Bitcoin core a full node is one wallet?

#3 How can I create a multiSign wallet? I do not see any feature. I think a full node is only one wallet if the #2 is correct.

#4 Is there any easy way to "Send to many" option.
In Electrum we can just paste the addresses separating by comma with the amount in each line but here we do not have such feature. The one we have is click and fill the form which is not much user friendly. Is there any other way?

#5 If I use the encrypt wallet feature then this means the current wallet.dat file gets encrypted. How do I recover it? Follow #1 if my explanation is correct and in this case I will need the password phrase?

#6 If someone want to take the full node from me. I give them everything except the wallet.dat file? I mean which are the files I am okay to give them if they want to get the files from me to run their own full node?

#7 This full node is of-course helping the Bitcoin Network and I am happy with that. My question is that running this full node gives me any personal benefit?
I understand miners earn Bitcoin from the network by solving the algorithm and from transaction fees but for a full noder, is there any financial gain?

Thanks in advance.


Title: Re: Finally setting up a full node
Post by: HCP on March 13, 2019, 08:39:40 PM
Couple of notes to add to what ETFbitcoin has said:

#1 I see backup wallet feature but I do not see any restore option.
Since there are no restore option then how do we do that?
Is this a correct way:
Imagine I have a wallet.dat file from Electrum. Do I just copy and past it in the main directory and replace the current .DAT file?
Firstly... NO! wallet files from Electrum are NOT compatible with Bitcoin Core! You cannot use a wallet.dat file from Electrum.

Also, do not try and restore the wallet.dat file while Bitcoin Core is running. There is a very real potential to corrupt the file. So, when restoring, you need to ensure that Bitcoin Core is not running, then copy the backup version of the file into the data directory, then start Bitcoin Core.



Quote
#2 In Electrum we can create as many wallet as we can using the 12 word seeds and extended seeds.
In Bitcoin core a full node is one wallet?
Bitcoin Core actually does support using multiple wallet files (since v0.15.0.1)... but only the first wallet specified with the -wallet command will be displayed in the GUI. However you will be able to interact with ALL of them from either the commandline (bitcoin-cli) or using the console in the GUI (Help -> Debug Window -> Console).

Refer: https://bitcoin.org/en/release/v0.15.0.1#multi-wallet-support



Quote
#3 How can I create a multiSign wallet? I do not see any feature. I think a full node is only one wallet if the #2 is correct.
Multisig isn't quite as "tidy" as in a wallet like Electrum, it currently requires a lot of manual commands. You don't create a specific "Multisig" wallet as such... but you can create Multisig addresses in any Bitcoin Core wallet by using the createmultsig command (again, using bitcoin-cli or the console]

createmultisig nrequired ["key",...] ( "address_type" )

Creates a multi-signature address with n signature of m keys required.
It returns a json object with the address and redeemScript.

Arguments:
1. nrequired                    (numeric, required) The number of required signatures out of the n keys.
2. "keys"                       (string, required) A json array of hex-encoded public keys
     [
       "key"                    (string) The hex-encoded public key
       ,...
     ]
3. "address_type"               (string, optional) The address type to use. Options are "legacy", "p2sh-segwit", and "bech32". Default is legacy.

Result:
{
  "address":"multisigaddress",  (string) The value of the new multisig address.
  "redeemScript":"script"       (string) The string value of the hex-encoded redemption script.
}

As for spending from Multisig addresses... you can see the process in this walkthru: https://github.com/anders94/bitcoin-2-of-3-multisig



Quote
#4 Is there any easy way to "Send to many" option.
In Electrum we can just paste the addresses separating by comma with the amount in each line but here we do not have such feature. The one we have is click and fill the form which is not much user friendly. Is there any other way?
probably scripting and using the commandline... or the console, but you can't really script that, you could however generate the sendmany command (https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/sendmany/) using a script and copy/paste that to the console.



Quote
#5 If I use the encrypt wallet feature then this means the current wallet.dat file gets encrypted. How do I recover it? Follow #1 if my explanation is correct and in this case I will need the password phrase?
It's the same process as Electrum... the GUI will automatically prompt you for the passphrase when it requires access to the encrypted data... you "unlock" the wallet using the walletpassphrase command when you're trying to use the CLI or console.



Quote
#6 If someone want to take the full node from me. I give them everything except the wallet.dat file? I mean which are the files I am okay to give them if they want to get the files from me to run their own full node?
Just give them the "blocks" and "chainstate" folders... they don't require anything else.



Quote
#7 This full node is of-course helping the Bitcoin Network and I am happy with that.
Are you really "helping the Bitcoin Network" tho? Simply running Bitcoin Core is not enough. Is your node actually configured to allow incoming connections? If it is not... you're not really helping.

Refer to the "Network Configuration" section of "Running a Full Node": https://bitcoin.org/en/full-node#network-configuration


Title: Re: Finally setting up a full node
Post by: AB de Royse777 on March 15, 2019, 01:30:47 AM
Thanks to both HCP and ETFbitcoin especially to HCP. I will need some times to have all this to learn. I have one more question which I think you guys missed.

Shall I save a copy of the entire node before I play with the system or it's not a big deal? I imagine to make a copy of the entire node will also take a long time.

Thanks in advance.

Cheers :-)


Title: Re: Finally setting up a full node
Post by: HCP on March 15, 2019, 03:00:21 AM
That depends on what you mean by "play with the system"... :P

If you're not trying to manipulate blocks or other data files, then I don't see how you can do anything that would really warrant needing a backup. In any case, if anything goes really bad, you can always simply delete all the data files/blocks/chainstate etc and then simply re-sync...

However, if you have plenty of space (like a spare ~260Gigs laying around) and feel like backing it all up... it won't hurt.

Making a full backup takes as long as it takes to copy the ~260Gigs to your backup location... whatever that might be (external drive, internal drive, network storage etc)


Title: Re: Finally setting up a full node
Post by: AB de Royse777 on March 15, 2019, 09:18:38 AM
That depends on what you mean by "play with the system"... :P

If you're not trying to manipulate blocks or other data files, then I don't see how you can do anything that would really warrant needing a backup. In any case, if anything goes really bad, you can always simply delete all the data files/blocks/chainstate etc and then simply re-sync...

However, if you have plenty of space (like a spare ~260Gigs laying around) and feel like backing it all up... it won't hurt.

Making a full backup takes as long as it takes to copy the ~260Gigs to your backup location... whatever that might be (external drive, internal drive, network storage etc)
LOL not that what I meant. I will basically try to get to know with those command line things how they work etc etc. It's more like exploring the entire system and getting to know the features.

My drive is 2T so space is not an issue.

Thanks for your input again. I will come back if I face any issue.

Cheers :-)


Title: Re: Finally setting up a full node
Post by: Carlton Banks on March 15, 2019, 10:15:06 AM
LOL not that what I meant. I will basically try to get to know with those command line things how they work etc etc. It's more like exploring the entire system and getting to know the features.

You're unlikely to break the blocks db just learning the basic commands, but there are blocks commands cli that could potentially mess it up (invalidateblock for instance)


My drive is 2T so space is not an issue.

Put any backup on a different disk, then both disks would need to stop working at the same time to force you into total re-sync


Title: Re: Finally setting up a full node
Post by: Artemis3 on March 19, 2019, 02:44:31 AM
I just rebuilt my Linux node machine recently. A full DL of the blockchain took a full week.  Fortunately storage is so cheep that I was able to go with a 3 Terabyte HD. That should hold me for a few years. I like having a dedicated machine like this. I usually shop on a different computer and spend from my node for additional privacy.   

Thanks for contributing to the network's strength and resilience!

My node finally finished syncing yesterday, i started syncing at the end of December, syncing mostly at nighttime. Now that is synced it doesn't bother much to leave it running; but during syncing the I/O access to the harddrive was insane. I still run bitcoind it with ionice -c3 just in case...


Title: Re: Finally setting up a full node
Post by: Carlton Banks on March 19, 2019, 10:40:18 AM
during syncing the I/O access to the harddrive was insane

You can arrange the data directories in a way that minimises that

  • Set the bitcoind parameter -datadir to your fastest disk, preferably a disk that's not the main OS disk (e.g. a SATA/M.2/PCI SSD based SSD)
  • Set the bitcoind parameter -blocksdir to a slower disk with loads of space, again, not your OS disk (i.e. a regular mechanical HDD)

So ideally that involves 1 fast disk for the OS, 1 fast disk for the datadir, and 1 slow disk for the blocks. But it will speed things up noticeably.


Another syncing quickly tip: set the -dbcache parameter to something like dbcache=6000 or dbcache=8000, assuming you have that much RAM to spare


Title: Re: Finally setting up a full node
Post by: Artemis3 on March 23, 2019, 02:20:03 AM
during syncing the I/O access to the harddrive was insane

You can arrange the data directories in a way that minimises that

  • Set the bitcoind parameter -datadir to your fastest disk, preferably a disk that's not the main OS disk (e.g. a SATA/M.2/PCI SSD based SSD)
  • Set the bitcoind parameter -blocksdir to a slower disk with loads of space, again, not your OS disk (i.e. a regular mechanical HDD)

So ideally that involves 1 fast disk for the OS, 1 fast disk for the datadir, and 1 slow disk for the blocks. But it will speed things up noticeably.


Another syncing quickly tip: set the -dbcache parameter to something like dbcache=6000 or dbcache=8000, assuming you have that much RAM to spare

Thank you, i used -dbcache=4096 all this time, the main bottleneck was the bandwidth, but now that it synced its fine.


Title: Re: Finally setting up a full node
Post by: Lauda on March 25, 2019, 09:08:17 AM
I just rebuilt my Linux node machine recently. A full DL of the blockchain took a full week.  Fortunately storage is so cheep that I was able to go with a 3 Terabyte HD. That should hold me for a few years. I like having a dedicated machine like this. I usually shop on a different computer and spend from my node for additional privacy.  
Weak connection or weak hardware. :P Last time I checked on a dedicated machine it took me maybe half a day for a full sync (probably less).


Title: Re: Finally setting up a full node
Post by: RodeoX on March 25, 2019, 12:04:10 PM
I just rebuilt my Linux node machine recently. A full DL of the blockchain took a full week.  Fortunately storage is so cheep that I was able to go with a 3 Terabyte HD. That should hold me for a few years. I like having a dedicated machine like this. I usually shop on a different computer and spend from my node for additional privacy.   

Thanks for contributing to the network's strength and resilience!

My node finally finished syncing yesterday, i started syncing at the end of December, syncing mostly at nighttime. Now that is synced it doesn't bother much to leave it running; but during syncing the I/O access to the harddrive was insane. I still run bitcoind it with ionice -c3 just in case...
When it's syncing it's like Damn, this thing is going to catch fire running like that! Once it does sync it's like, well now it doesn't do anything. I miss syncing.

Weak connection or weak hardware. :P Last time I checked on a dedicated machine it took me maybe half a day for a full sync (probably less).
Both! It is an old beat up Dell that is basically a Frankenstein monster.  IMO, a node needs to be secure, but not pretty or fast. I know I could set-up my router to get more connections. I'm just not in a hurry.