Skip to content

QANplatform/privnet

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
March 8, 2021 18:47
September 7, 2020 23:31
December 3, 2020 14:20

Private network of QAN Platform

You can play around with QAN's private network with EC crypto stack. The bundled test.sh convenience script will help you out to get up and running quickly.

How to use

Start X nodes locally

The below example will:

  • Check for a newer docker image and pull it
  • Ensure that a dedicated QAN docker network exists
  • Launch a QAN privnet bootstrap node on this network
  • Create 5 QAN privnet nodes
  • Connect above nodes to the network
  • Start all nodes one-by-one
sh test.sh start 5

Deploy using container orchestration

QAN supports deploying to major container orchestrators, such as Docker Compose, Docker Swarm and Kubernetes.

Deploy using Docker Compose

To deploy a QAN private network locally with Docker Compose, first ensure that:

  • The "docker-compose" command is executable on your system.
  • You have a valid Access Key for BETA testing.

If above two conditions are satisfied, then you can proceed to deploy by entering the following:

bash test.sh deploy compose "192A4209-F2CC-4F81-9F17-E8C4FBC89D74"

This will deploy the stack template defined in deploy/docker-swarm/stack.yml.

Deploy using Docker Swarm

To deploy a QAN private network to Docker Swarm, first ensure that:

  • The machine is a docker swarm manager node.
  • There is at least one worker node in your swarm cluster.

If above two conditions are satisfied, then you can proceed to deploy by entering the following:

bash test.sh deploy swarm

This will deploy the stack template defined in deploy/docker-swarm/stack.yml.

Deploy using Kubernetes

To deploy a QAN private network to Kubernetes, first ensure that:

  • You have kubectl installed locally

If above condition is met, then you can proceed to deploy by entering the following:

bash test.sh deploy kubernetes

This will deploy the kubernetes manifests defined in deploy/kubernetes/*.yaml.

Separate bootstrap node

All nodes are initialized by connecting them to the bootstrap node of the private network.

But what happens when it becomes unavailable? To simulate this scenario issue the following command:

sh test.sh separate

All nodes will renegotiate routing among each other and everything continues to work as expected.

CLI Wallet examples

Simply issue the following command:

sh test.sh wallet

This will drop you in a REPL where you can unlock a wallet and execute certain functions.

  1. When prompted for wallet name, simply enter "testwallet".
  2. When prompted for password, simply hit the RETURN button (empty passphrase)
  3. Execute print_address in the REPL to ensure the unlock was successful, it should print the address 52c4ba9a2237cc9e03192cd448e8e5e9a17211dd.

Stop test

Simply issue the following command:

sh test.sh stop

This will remove all launched nodes (including the bootstrap node if it was not separated) and the dedicated QAN docker network as well, so everything related to this test run is cleaned up properly.

About

Private network of QAN Platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages