32

Running the daemon without any modifications can take a long time to synchronize. Are there any faster options for synchronizing the daemon with the network?

0

4 Answers 4

32

The fastest way to achieve this, is to download the current blockchain and import it into the daemon:

Step 1: Move into the folder where you downloaded the Monero Gui Wallet, e.g:
cd ~/Downloads/monero-gui-0.10.3.1-beta2

Step 2: Download the raw block chain from a trusted source, e.g:
wget -c --progress=bar https://downloads.getmonero.org/blockchain.raw

If it fails half-way, just re-run it. The above command will continue where it left off.

Step 3: Import the downloaded blockchain into the daemon:
./monero-blockchain-import --dangerous-unverified-import 1 --input-file ./blockchain.raw

Do remember though, run with --dangerous-unverified-import 1 only from a trusted source like the above. The option was previously called either --guard-against-pwnage and --verify, and previously used a 0 instead of a 1.

Step 4: You can now remove the raw blockchain to free up disk space:
rm -rf ./blockchain.raw

Step 5: You can now start the Monero daemon, either from Settings in Monero Gui Wallet, or directly from the terminal in detached/background mode with:
./monerod --detach

7
  • > Finally import it into the daemon by running; ./monero-blockchain-import --verify 0 --input-file ./blockchain.raw Where do I run this command after I download the blockchain.raw
    – dotglum
    Commented Jan 7, 2017 at 5:33
  • 1
    You run it from the Monero directory. If you are in any other dir, the command "./monero-blockchain-import..... won't work as the binary "monero-blockchain-import" is in that dir. So, basically want to go "cd ~/directoryWhereYouSavedMoneroGUI/monero-wallet-gu"i then run the import command from there.
    – pl55
    Commented Jan 7, 2017 at 7:22
  • 2
    Thanks for this! For those interested in a benchmark: As at August 2017, on Intel i5, SSD, 16gb ram, 50MBps internet: With no existing blockchain, total hard drive space required 45GB(!) Total time: 1hr18 minutes, (40 minutes to download, 18minutes for monero-blockchain-import, 20 minutes for Monero Gui Wallet to sync with the fresh blockchain). Much faster than running the daemon from scratch.
    – Mtl Dev
    Commented Aug 18, 2017 at 21:05
  • Roy - I want to use these instructions, but I also want to move the monero GUI to my Applications folder. Do I do that before or after following these instructions?
    – Steven L.
    Commented Sep 3, 2017 at 12:58
  • the fastest way would be to have the .raw file on a separate disk than the final blockchain. And also, this might not be faster than synchronizing from the network since v0.11.0.0
    – Ginger Ale
    Commented Oct 9, 2017 at 3:44
13

Changing the sync size parameter can have a positive impact in some cases.

Start the daemon with: ./monerod --block-sync-size 10

Quoting /u/closenix's test results:

I've run some tests: Syncing with block-sync-size 10 was faster than with the default of 200. I've run the daemon 9 times in sequence, every time starting at block 1275000 and ending at 1276200 (1200 blocks). I have a slow connection, but SSD. For people with similar hardware and connection I feel it might be fastest to start syncing with 200 and then switch to 10 at around block height 1200000 (when you think you're allmost done, but actually blocks are starting to get huge at around this block height and therefore longer sync time).

Results:

block-sync-size/minutes

10 / 9:52

50 / 11:29

200 / 17:49

10 / 8:09

50 / 20:30

200 / 14:08

10 / 7:37

50 / 13:56

200 / 24:49

ThinkPad W530, SSD, 2 Mbit/s internet, Debian 9 qube in Qubes-OS.

For non-RCT blocks syncing, it seems beneficial as well although not as much:

I would've guessed with old blocks 200 is faster, but because you asked I ran the tests again, this time from block height 40000 to 60000 and it turns out 10 is again faster (on average). block-sync-size / minutes

10 / 8:40

200 / 11:48

10 / 9:21

200 / 12:25

10 / 11:33

200 / 11:25

6

I didn't test that in windows command prompt but in my sync tool i'd gain best results with

 --block-sync-size 4 --db-sync-mode fastest:sync:8750

update

connection :10mbps . Although developers on github mention that the last argument lowerin the fault-proof i bet it still can be used if you wanna speed. Tool : https://github.com/alexeyneu/tool3

2

Not to necro this thread... but if anyone is looking for this answer and using windows, once you download the blockchain, move/copy it to the same folder your monero .exe's are in. Then open a cmd prompt, cd into that directory and run the following: monero-blockchain-import.exe --verify 0 --input-file blockchain.raw.

Again, follow security advice about trusted file sources. This is only different in that windows doesn't require the ./ in front of the directory/file names.

Not the answer you're looking for? Browse other questions tagged or ask your own question.