How to Help

Help Distribute TurtleCoin® Checkpoints via IPFS

TurtleCoin® needs to sync when you first launch it to grab a copy of the whole blockchain. We use checkpoints to make that sync faster. Serving checkpoints can be tough for just one server to host, so we have made an easy guide for people who want to help distribute the checkpoints! With IPFS we can create a swarm of decentralized nodes that host checkpoints for the rest of the community.

Follow the directions below to get started.

You will need the following:

Once you have Node.js installed, perform the following steps:

  1. Clone the TurtleCoin® Checkpoints IPFS Helper package from GitHub

    git clone https://github.com/turtlecoin/checkpoints-ipfs-helper

  2. Enter the newly cloned directory.

    cd checkpoints-ipfs-helper

  3. Install the package dependencies

    npm install

  4. Start the script

    npm start

After a few moments you will see output such as shown below:

> [email protected] /home/travis/build/turtlecoin/checkpoints-ipfs-helper
> node index.js

Tue, 15 Oct 2019 01:08:02 GMT: [INFO] Starting IPFS node in: /home/travis/TurtleCoinIPFS
Tue, 15 Oct 2019 01:08:03 GMT: [INFO] IPFS node started
Tue, 15 Oct 2019 01:08:03 GMT: [INFO] Waiting for IPFS node to connect to swarm...
Tue, 15 Oct 2019 01:08:08 GMT: [INFO] IPFS node connected to swarm...
Tue, 15 Oct 2019 01:08:08 GMT: [INFO] Detected new checkpoints IPFS hash: QmWNWv8NjbAZuLSCw3ZNuJJ7y1wLCRsDq2kpcrMaoowwNc
Tue, 15 Oct 2019 01:08:08 GMT: [INFO] Attempting to pin locally: QmWNWv8NjbAZuLSCw3ZNuJJ7y1wLCRsDq2kpcrMaoowwNc
Tue, 15 Oct 2019 01:13:31 GMT: [INFO] Pinned successfully: QmWNWv8NjbAZuLSCw3ZNuJJ7y1wLCRsDq2kpcrMaoowwNc

Note: The actual time to pin the hash varies based upon your Internet connection, firewall(s), network configuration, and the current IPFS network load. Don't worry if it takes a while to pin the hash.

Leave the script running to continue to help distribute the checkpoints via IPFS. The script will automatically check for an updated checkpoints hash to pin once per hour.

If you would rather use a tool like PM2 or forever to keep the script running, see below.

Using PM2

Keeping the service running with PM2 is easy.

If you do not already have PM2 installed, issue the following command in your terminal:

npm install -g [email protected] && pm2 startup

Add the script to PM2 by issuing the following command in your terminal:

pm2 start index.js --name checkpoints-ipfs-helper && pm2 save

Using forever

Keeping the service running with forever is easy.

If you do not already have forever installed, issue the following command in your terminal:

npm install -g forever

Let forever manage the script using the following command in your terminal:

forever start index.js