During the last few weeks a common, reoccurring, question seems to be how to get one's blockchain "unstuck". This guide will, hopefully, provide some assistance in doing so.

up vote 19 down vote accepted

Note that, if you are stuck on block 1288639 (or block 1400001) or a few blocks later, you are using a wrong, outdated, version and you should upgrade to the latest version, which can be found here. In addition, this won't require a resync from scratch, as the "new" monerod will automatically use the blockchain that was used with the previous version and pick up syncing where it left off.

The first step in getting your blockchain unstuck is making sure that no Monero related process is running anymore. Thus, close the GUI by clicking on the x and make sure to stop the daemon as well. If you're using the CLI, type exit into both monero-wallet-cli and monerod. Thereafter, use your task manager to check whether all Monero related processes are closed. Alternatively, you could simply reboot.

Now that no Monero related processes are running anymore, delete p2pstate.bin. On Windows it can be found in the following directory:

C:\ProgramData\bitmonero

Note that, by default, the ProgramData directory is hidden. Therefore, use the explorer to manually navigate to aforementioned directory.

On Linux and Mac OS X:

$HOME/.bitmonero

This directory is hidden by default too. On Linux you can use CTRL + H to unhide directories (note that this might not work on all Linux distributions), whereas on Mac OS X you can use cmd-shift-dot unhide directories.

After you've deleted p2pstate.bin you can restart monerod / the GUI. If this didn't resolve your issue, please read further and make sure monerod / the GUI is closed again.

We're going to add the following flag:

--block-sync-size 10

This will change the batch of fetched blocks from 20 to 10.

You can add the flag as follows:

If you are using the GUI, simply add --block-sync-size 10 as daemon startup flag. You can do this on the Settings page of the GUI. Note that you'll have to restart the GUI + daemon for the flag to take effect. Thus, add the flag, exit the GUI and stop the daemon as well, and lastly restart the GUI + daemon.

If you are using the CLI, please see below.

On Windows make sure to launch it from the command line. Go to the folder monerod is located and make sure your cursor isn't located on any of the files. Subsequently do SHIFT + right click and it will give you an option to "Open command window here". Lastly, type the following command:

monerod --block-sync-size 10

On Linux and Mac OS X you should use the terminal to launch monerod. Note that this has to be done from the directory monerod is located in. The command is as follows:

./monerod --block-sync-size 10

If your blockchain is still stuck after adding this flag, please browse again to C:\ProgramData\bitmonero (Windows) or $HOME/.bitmonero (Linux and Mac OS X), open bitmonero.log and check it for any errors. If you see any of these errors (or similar to them), your blockchain is most likely corrupted and you need to resync from scratch.

Error opening database: Failed to query m_blocks: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid

Failed to parse and validate tx from blob (per MoneroMooo: This can be a corrupt blockchain, if this comes from a block inside the db. However, it's much more likely to be an old version not knowing about a new fork)

This is done by deleting data.mdb from C:\ProgramData\bitmonero\lmdb (Windows) or $HOME/.bitmonero/lmdb (Linux and Mac OS X), which will trigger the resync.

  • It worked for me too... THANKS!! – luckyguy Aug 25 '17 at 21:25
  • It works for me too ! Thanks ! – user3310 Aug 30 '17 at 8:56
  • 1
    Stuck user here. First, check the logs, they will tell you if there is a problem. I followed all above solutions without checking the logs first and guess what? Half of all entries in the logs says that my db was corrupted. Simply, stopping everything and deleting db solved the issue. When I started again, it started from scratch but at least it's synching again. – sercan Nov 4 '17 at 14:28
  • I hate getting up in the morning only to find out the block height hasn't moved one bit ... this worked well, monerod would get stuck at 144xxxx and would report 100%, deleting p2pstate.bin got it unstuck. – farinspace May 10 at 16:13

protected by Afri Aug 30 '17 at 9:45

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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