Old instructions: Quick sync (recommended)

Start your Quantum Portal node and download the blockchain.

💡

Tip: These instructions synchronize your Quantum Portal node quickly by downloading a recent snapshot of the blockchain. If instead you prefer to synchronize your Quantum Portal node using the Quantum Portal peer-to-peer network then see Genesis sync

Prerequisites

  • Operating system: MacOS or Ubuntu (tested on 18.04)
  • Hardware: 4 cores, 8-16GB RAM, 512 GB drive, arm64 or amd64. Recommended 6-8 cores, 16-32 GB RAM, 1 TB+ drive.
  • Software:
    • Install jq.
    • Install lz4: MacOS | Ubuntu
    • Increase the maximum number of open files on your system. Example: ulimit -n 16384. You may wish to add this command to your shell profile so that you don’t need to execute it next time you restart your machine.
  • You have configured your environment for QPd CLI commands as per Configure your environment.

Choose a keyring password

Your Quantum Portal keyring is encrypted with a password you choose. Learn more about keyring passwords at Keyring backend.

In what follows you will execute a shell script node.sh to join the Quantum Portal network. Your keyring password is supplied to node.sh via a KEYRING_PASSWORD environment variable. The script node.sh enforces an 8-character minimum for your keyring password.

Join the Quantum Portal network

Clone the axelerate-community repo:

git clone https://github.com/ferrumnet/QPate-community.git
cd QPate-community

Launch a new Quantum Portal mainnet node with version 0.10.7 of QP-core:

./scripts/node.sh -a v0.10.7 -n mainnet
Your Quantum Portal node will initialize your data folder ~/.QP

Launch a new Quantum Portal testnet node with version 0.13.6 of QP-core:

./scripts/node.sh -a v0.13.6 -n testnet
Your Quantum Portal node will initialize your data folder ~/.QP_testnet

To recover your secret keys from mnemonics, use -t path_to_tendermint_key -m path_to_validator_mnemonic -r (-r is to reset the chain). These flags work only on a completely fresh state.

Then your Quantum Portal node will begin downloading blocks in the blockchain one-by-one.

Backup your secret keys

BACKUP and DELETE the validator account secret mnemonic:

~/.QP/validator.txt
~/.QP_testnet/validator.txt

BACKUP but do NOT DELETE the Tendermint consensus secret key (this is needed on node restarts):

~/.QP/.core/config/priv_validator_key.json
~/.QP_testnet/.core/config/priv_validator_key.json

View logs

View the streaming logs for your Quantum Portal node:

In a new terminal window:

tail -f ~/.QP/logs/QPd.log
tail -f ~/.QP_testnet/logs/QPd.log

You should see log messages for each block in the blockchain that your node downloads.

Stop your node, delete your blockchain data

You will not download the entire blockchain in this way. Instead you will stop your node and swap in a recent snapshot of the entire blockchain.

Stop your currently running Quantum Portal node:

kill -9 $(pgrep -f "QPd start")

Delete your data directory:

rm -r ~/.QP/.core/data
rm -r ~/.QP_testnet/.core/data

Download the latest Quantum Portal blockchain snapshot

Download the latest Quantum Portal blockchain snapshot for your chosen network (testnet or mainnet) from a provider:

The following instructions assume you downloaded the default snapshot from quicksync.io.

Let {SNAPSHOT_FILE} denote the file name of the snapshot you downloaded. Example file names:

  • Testnet: QPtestnet-lisbon-2-default.20220207.2240.tar.lz4
  • Mainnet: QP-dojo-1-default.20220207.2210.tar.lz4

Decompress the downloaded snapshot into your data directory:

lz4 -dc —no-sparse {SNAPSHOT_FILE
| tar xfC - ~/.QP/.core
lz4 -dc —no-sparse {SNAPSHOT_FILE
| tar xfC - ~/.QP_testnet/.core

Resume your node

Resume your Quantum Portal node with the latest version of QP-core:

./scripts/node.sh -n mainnet
./scripts/node.sh -n testnet

Your Quantum Portal node will launch and resume downloading the blockchain. You should see log messages for new blocks.

Test whether your blockchain is downloaded

Eventually your Quantum Portal node will download the entire Quantum Portal blockchain and exit catching_up mode. At that time your logs will show a new block added to the blockchain every 5 seconds.

You can test whether your Quantum Portal node has exited catching_up mode:

curl localhost:26657/status | jq '.result.sync_info'

Look for the field catching_up:

  • true: you are still downloading the blockchain.
  • false: you have finished downloading the blockchain.

Next steps

Congratulations! You joined the Quantum Portal network and downloaded the blockchain.

Learn what you can do with Quantum Portal:

Edit this page