Synchronization

October 5, 2020 ยท View on GitHub

sync_remotenode

After creating and opening a wallet file, Monero GUI will start synchronizing. This process is required to know your balance, receive and send transactions.

Monero GUI's synchronization is composed of two parts:

  1. Daemon synchronization
  2. Wallet synchronization

Daemon synchronization

Monero GUI wallet uses a daemon (monerod), which is a program running in the background that synchronizes with the Monero network to scan for incoming transactions and to send new transactions.

Your daemon must have access to the Monero blockchain, which is a very large file (more than 100 GB) which contains all transactions that have been made since the beginning of Monero in 2014. The blockchain file can be stored in your computer (if your daemon run a local node) or in a computer of another person (if your daemon connect to a third-party remote node). If you decide to run a local node, you can run it as a full node, that has the whole blockchain file (more than 100 GB) or as a prunned node, that has a light version of the blockchain file (1/3 of the size, aproximatedly 35 GB).

The best way to contribute to Monero's security and decentralization is running a local node as a full node. Even though local nodes running as pruned nodes also contribute to Monero's security and decentralization, they are still less comprehensive than full nodes. However, pruned nodes are better for your privacy and to the Monero network than connecting to someone else's remote node.

Daemon synchronization with local node

If you run a local node as a full node (requires wallet in "advanced mode" with local node selected in Setings > Node), your wallet daemon will download the blockchain file into your computer. Since it's a very large file (more than 100 GB), this can take a long time, even days, depending on your internet speed and storage unit (HDD or SSD).

If you run a local node as a full node with a bootstrap node (requires wallet in "simple mode (bootstrap)"), your wallet daemon will also download the blockchain file into your computer, but it will connect to a remote node (a bootstrap node) while the download is not finished, allowing you to immediately send/receive a transaction.

If you want to run a local node as a pruned node, see this guide.

Daemon synchronization with remote node

If you want to connect to a remote node (requires wallet in "simple mode" or in "advanced mode" with remote node selected in Settings > Node), your daemon will use the blockchain of a third party remote note. Since it will not have to download the whole blockchain file, your synchronization will be faster.

Block height

After your daemon and your wallet are synchronized, your daemon progress bar will display "Daemon is synchronized (number)", see below:

sync_remotenode

This number between parenthesis is the current block height, which is the latest block received by your daemon. In average, this number wil increase +1 every 2 minutes, when a new block is found by a miner.

Wallet synchronization

After synchronizing the daemon, your wallet will scan the blockchain file, searching for past transactions. Once a previous transaction is detected and retrieved by your wallet, your balance and your transaction history will be updated.

Since all transactions are encrypted in Monero, your wallet will have to decrypt a lot of transactions. This process places very high demands on your computer's resources, including CPU processing and many readings and writings in your hard disk. Depending on your system configuration, this can take a long time, even days, so please be patient. Be aware that the synchronization speed is not always constant. Some blocks can have more transactions and/or use different technologies, therefore they may take longer to verify.

Wallet restore height

The wallet restore height is the block number (block height) where your wallet will start searching for transactions. This number should be a block height before the block that included your first incoming transaction. For example, if your wallet received Monero for the first time in 2020-09-20, your wallet restore height must be a block number before the block height of this date. Monero wallets usually ask you to write down your wallet restore height together with your restore seed when you are creating a wallet. You should never set your wallet restore height to 0, otherwise your wallet will scan all transactions in the whole blockchain (since 2014), which takes a lot of time.

How to change Wallet restore height / Wrong or zero balance after synchronizing

In order to see the correct balance, your wallet must be fully synchronized AND using a correct restore height. If your wallet is fully synchronized but your balance is still wrong, you're probably using a wallet restore height that is higher than the block height of your first incoming transaction. To solve this, you have to set a new wallet restore height. Go to Settings > Info page, Wallet restore height and click on "(Change)".

change_wallet_restore_height

Next, enter a new restore height or an estimate date before your first incoming transaction, and then click on "Ok".

set_new_restore_height

Your wallet will now rescan the blockchain starting from the new restore height.

How to speed up wallet initial synchronization

Some factors that can increase the speed of your initial synchronization are:

  • Broadband internet connection
  • Using a SSD (solid state disk drive) instead of an HDD (hard disk drive)
  • Having a faster CPU
  • Connecting to a remote node will avoid downloading the blockchain.