Bitcoin Forum
April 25, 2024, 11:49:24 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Quickest method to initialize new bitcoind node  (Read 695 times)
Soros Shorts (OP)
Donator
Legendary
*
Offline Offline

Activity: 1616
Merit: 1003



View Profile
December 01, 2015, 12:34:07 AM
 #1

Can someone tell me what is the best practice for initializing a new bitcoind node quickly? Do I really need to wait 2 days for the blockchain to be downloaded and validated before the node is operational? As far as I can tell most of the time is spent not on network resources but on CPU resources, at least for the hardware I am running (Azure & Amazon EC).

If I already have another fully initalized node that I trust, is there anyway I can just copy the blockchain database from a trusted node over to the new node (bypassing all the time consuming validation)?
1714045764
Hero Member
*
Offline Offline

Posts: 1714045764

View Profile Personal Message (Offline)

Ignore
1714045764
Reply with quote  #2

1714045764
Report to moderator
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714045764
Hero Member
*
Offline Offline

Posts: 1714045764

View Profile Personal Message (Offline)

Ignore
1714045764
Reply with quote  #2

1714045764
Report to moderator
1714045764
Hero Member
*
Offline Offline

Posts: 1714045764

View Profile Personal Message (Offline)

Ignore
1714045764
Reply with quote  #2

1714045764
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
December 01, 2015, 12:42:54 AM
 #2

Can someone tell me what is the best practice for initializing a new bitcoind node quickly? Do I really need to wait 2 days for the blockchain to be downloaded and validated before the node is operational? As far as I can tell most of the time is spent not on network resources but on CPU resources, at least for the hardware I am running (Azure & Amazon EC).

If I already have another fully initalized node that I trust, is there anyway I can just copy the blockchain database from a trusted node over to the new node (bypassing all the time consuming validation)?
If you have access (can login and copy stuff to and from) to a fully synced node, you could copy over most of the stuff in the data directory and the node would just pick from where that data was left off.

Soros Shorts (OP)
Donator
Legendary
*
Offline Offline

Activity: 1616
Merit: 1003



View Profile
December 01, 2015, 01:59:30 AM
 #3

Can someone tell me what is the best practice for initializing a new bitcoind node quickly? Do I really need to wait 2 days for the blockchain to be downloaded and validated before the node is operational? As far as I can tell most of the time is spent not on network resources but on CPU resources, at least for the hardware I am running (Azure & Amazon EC).

If I already have another fully initalized node that I trust, is there anyway I can just copy the blockchain database from a trusted node over to the new node (bypassing all the time consuming validation)?
If you have access (can login and copy stuff to and from) to a fully synced node, you could copy over most of the stuff in the data directory and the node would just pick from where that data was left off.

Trying this out now. I had to stop the source node for 20 minutes to make a local copy. Now I am copying 60GB worth of data to the new server. Unfortunately this is a single threaded SSH/SCP operation and the servers are 6000 miles apart (high latency), so it remains to be seen if I save any time at all.
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4163


View Profile
December 01, 2015, 02:04:05 AM
 #4

Can someone tell me what is the best practice for initializing a new bitcoind node quickly? Do I really need to wait 2 days for the blockchain to be downloaded and validated before the node is operational? As far as I can tell most of the time is spent not on network resources but on CPU resources, at least for the hardware I am running (Azure & Amazon EC).

If I already have another fully initalized node that I trust, is there anyway I can just copy the blockchain database from a trusted node over to the new node (bypassing all the time consuming validation)?
If you have access (can login and copy stuff to and from) to a fully synced node, you could copy over most of the stuff in the data directory and the node would just pick from where that data was left off.

Trying this out now. I had to stop the source node for 20 minutes to make a local copy. Now I am copying 60GB worth of data to the new server. Unfortunately this is a single threaded SSH/SCP operation and the servers are 6000 miles apart (high latency), so it remains to be seen if I save any time at all.
Only the download speed at your server to the fully synchronized node and the upload speed from fully synchronized node matters. I wouldn't recommend going with this way, the client would still have to verify every single block. With the CPU as a bottleneck, it would likely take far more time. Bitcoin Core with headers-first synchronization downloads from various nodes simultaneously so it would be much faster.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
BitAurum
Sr. Member
****
Offline Offline

Activity: 318
Merit: 250


View Profile
December 01, 2015, 02:34:07 AM
 #5

Can someone tell me what is the best practice for initializing a new bitcoind node quickly? Do I really need to wait 2 days for the blockchain to be downloaded and validated before the node is operational? As far as I can tell most of the time is spent not on network resources but on CPU resources, at least for the hardware I am running (Azure & Amazon EC).

If I already have another fully initalized node that I trust, is there anyway I can just copy the blockchain database from a trusted node over to the new node (bypassing all the time consuming validation)?
If you have access (can login and copy stuff to and from) to a fully synced node, you could copy over most of the stuff in the data directory and the node would just pick from where that data was left off.

Trying this out now. I had to stop the source node for 20 minutes to make a local copy. Now I am copying 60GB worth of data to the new server. Unfortunately this is a single threaded SSH/SCP operation and the servers are 6000 miles apart (high latency), so it remains to be seen if I save any time at all.
Only the download speed at your server to the fully synchronized node and the upload speed from fully synchronized node matters. I wouldn't recommend going with this way, the client would still have to verify every single block. With the CPU as a bottleneck, it would likely take far more time. Bitcoin Core with headers-first synchronization downloads from various nodes simultaneously so it would be much faster.
The new client won't have to verify every single block if the entire .bitcoin directory is copied from another fully initialized node.
Soros Shorts (OP)
Donator
Legendary
*
Offline Offline

Activity: 1616
Merit: 1003



View Profile
December 02, 2015, 10:44:09 AM
 #6

Update: So the file copy method works better. Both servers are 100 Mbps down/up, but with a single SSH session I was only able to get 7 Mbps throughput.  I ended up having to write a script to split the files up into 10 groups and run parallel copy operations over 10 different SSH sessions to get close to the max. 100 Mbps throughput and was able to initialize a new node in under 3 hours compared with 2+ days the normal way.

As a test, I also set up a temp web server on the source node and tested copying the files over using the HTTP protocol. It turned out to be a lot faster than SSH for the single threaded copy, but I still needed to run 2 parallel copy operations to max. out my 100 Mbps bandwidth. This is understandable as SSH/SCP is a chattier protocol than HTTP and generates more "dead air" over a WAN.

So yes, copying the files over is a lot quicker than just starting up a blank node from scratch. but you still need to some work on your part to get the most of your available bandwidth.
mocacinno
Legendary
*
Offline Offline

Activity: 3374
Merit: 4917


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
December 02, 2015, 10:51:30 AM
 #7

Update: So the file copy method works better. Both servers are 100 Mbps down/up, but with a single SSH session I was only able to get 7 Mbps throughput.  I ended up having to write a script to split the files up into 10 groups and run parallel copy operations over 10 different SSH sessions to get close to the max. 100 Mbps throughput and was able to initialize a new node in under 3 hours compared with 2+ days the normal way.

As a test, I also set up a temp web server on the source node and tested copying the files over using the HTTP protocol. It turned out to be a lot faster than SSH for the single threaded copy, but I still needed to run 2 parallel copy operations to max. out my 100 Mbps bandwidth. This is understandable as SSH/SCP is a chattier protocol than HTTP and generates more "dead air" over a WAN.

So yes, copying the files over is a lot quicker than just starting up a blank node from scratch. but you still need to some work on your part to get the most of your available bandwidth.

I've always found SSH slow, but you can speed it up by using a different algo:

https://www.neuhalfen.name/2009/02/04/scp_performance_gain_by_using_right_algorithm/

you can try it out next time Wink

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BitAurum
Sr. Member
****
Offline Offline

Activity: 318
Merit: 250


View Profile
December 02, 2015, 01:08:09 PM
 #8

So yes, copying the files over is a lot quicker than just starting up a blank node from scratch. but you still need to some work on your part to get the most of your available bandwidth.
You will need to do some work only if you are in a hurry. At 50 Mbps(Max of a single-threaded HTTP) it will only take ~1-2 hours to copy the entire blockchain. Still better than starting Bitcoin Core from fresh.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!