Skip to content

MerkleTreeLabs/QRL.CO.IN

Repository files navigation

QRL.CO.IN Instructions and development Notes

  • The site is hosted out of Github sites.
  • DNS points to cloudflare which points to github sites with
  • QRL.CO.IN is the directory with the goods

Chain Data

The chain data is served from a link out of digital ocean https://cloud.digitalocean.com/spaces/qrl-chain and hosted on https://qrl.co.in/chain for the public to download.

This data is uploaded form a server running the QRL node software. The node is stopped, state files rsync over to a backup directory where they are tar'd up, the hash sums are taken and node stats recorded, then all files are sent up to the cloud CDN for content serving to the community.

Web Configuration

This is a Jekyll site, running in Github pages. Update this Repo to update the site.

Development setup is simple, follow Jekyll instructions to bundle your way into a running live site.

Chain State Files

Point links for mainnet and testnet chain files to these links for serving.

There are custom COORS settings that allow this to be served from the site without cross origin issues. See the settings in the digital ocean spaces dashboard for more.

Mainnet

Mainnet State checksums

Mainnet State

Mainnet Node Stats

Testnet

Testnet State checksums

Testnet State

Testnet Node Stats

Uploading files

The chain state and related information is created through a number of scripts.

Mainnet Scripts

Script Link Use
CreateQRLBootstrap.sh script/QRL_bootstrap/CreateQRLBootstrap.sh Creates a backup of the chain state files (blockchain)
notarize-mainnet.sh script/notarize-mainnet.sh Notarizes the checksums file
cloudUp-mainnet.sh script/cloudUp-mainnet.sh Uploads all of the files to the cloud location to serve
mainnet-chain.sh Combination script pulling all functions together into one.

Testnet Scripts

Script Link Use
CreateQRLBootstrap_testnet.sh script/QRL_bootstrap/CreateQRLBootstrap_testnet.sh Creates a backup of the chain state files (blockchain)
notarize-testnet.sh script/notarize-testnet.sh Notarizes the checksums file
cloudUp-testnet.sh script/cloudUp-testnet.sh Uploads all of the files to the cloud location to serve
testnet-chain.sh Combination script pulling all functions together into one.

Setup the s3cmd following this guide:

https://docs.digitalocean.com/products/spaces/resources/s3cmd/

After successful configuration test, you can upload files using this guide https://docs.digitalocean.com/products/spaces/resources/s3cmd-usage/

s3cmd put file.txt s3://spacename/path/

Will use the endpoint, and credentials setup during the configuration.

bootstrap

cd into the bootstrap submodule at script/QRL_bootstrap and run the following

git submodule init
git submodule update 

Mainnet

./script/QRL_bootstrap/CreateQRLBootstrap.sh

Testnet

./script/QRL_bootstrap/CreateQRLBootstrap-testnet.sh

Notarize

Notarize the checksums on the chain

If node is installed through nvn, use the following to symlink the executable into your path where expected.

sudo ln -s "$(which node)" /usr/bin/node
sudo ln -s "$(which npm)" /usr/bin/npm

Mainnet

./script/notarize-mainnet.sh

Testnet

./script/notarize-testnet.sh

Upload Script

Using the s3cmd upload the files to the cloud

Mainnet

./script/cloudUp-mainnet.sh

Testnet

./script/cloudUp-testnet.sh

Crontab Entries

Using the combined script, compress, notarize and upload all of the files at once

#crontab entry to sync the chainstate

0 0 * * 6  /home/$USER/chainState/script/testnet_chainstate.sh
0 0 * * 7  /home/$USER/chainState/script/mainnet_chainstate.sh
# Optional crontab to restart the node on reboot

@reboot /home/$USER/chainState/script/start_qrl.sh
@reboot /home/$USER/chainState/script/start_qrl-testnet.sh

Releases

No releases published

Packages

No packages published