This manual describes how you can configure a local testnet.
Here are some terms to start with:
- Testnet,
- Test shard,
- Test chain.
These terms mean the same, except that you can form your testnet out of more than one chain.
Attention
This testnet uses preinstalled private keys for nodes. These keys are open and used for testing purposes only. Therefore, the testnet will be compromised when using it in a real-world system.
To start the testnet, ensure you have the following software installed on your machine:
- git,
- docker-compose.
Note
If you use Unix and if you is not root, you must be included into the user group
docker
to usedocker-compose
.To check the groups, you are included into, run:
$ groupsTo include your account into the group
docker
, run:$ sudo usermod -aG dockerThis group is available only after you have installed Docker. If you haven't installed it yet, here is a How-To. Go to the link and choose your OS.
To install the testnet:
-
Clone the
test_shard
repository into your working directory using the following command:git clone https://github.com/thepower/test_chain.git
-
Go to
test_shard
directory:cd test_shard
To start a testnet, run:
docker-compose up -d
After starting the testnet, node API is available under the following addresses:
http://localhost:44001/api/status
http://localhost:44002/api/status
http://localhost:44003/api/status
Please, stop your local testnet after completing all necessary testing or development. To stop the testnet, run:
docker-compose down