Expand Emercoin testnet and get a lot of free coins

  • Tutorial

Let's say you decide to create a project that actively uses the blockchain. For storing data on goods and their manufacturers, for accounting vehicles, etc. It will be wise to check the operation of all nodes at all stages and more than once. There is a problem: records in the blockchain are not free, and if there are a lot of tests, then this can fly into a pretty penny.

Especially for such cases, there is a “test mode” when coins can be mined by the central processor of any low-power PC, but at the same time they have all the non-monetary properties of “large” EMC coins. Test coins can be sent to test addresses, create as many NVS blockchain records as you like, and wallets in this mode can be combined into testnet.

It is very simple to do:

First you need to downloadand install the latest Emercoin wallet. Then open emercoin.conf * and write:

testnet = 1

Run the wallet and wait a bit. The client will find the test seed server and synchronize the blockchain within minutes. If the client cannot find the seed for a long time, go to the console and specify the seed manually:

addnode add

Well, now the sweetest thing, we get coins, as in the good old 2009 - the processor!
Again we go to the console and enter:

setgenerate true X (where X is the number of processor cores allocated for mining. If nothing is specified, all available cores will be used)

PoW network complexity is so low that after a few minutes the wallet closes the block and receives test coins. Their number will be enough for most experiments. If you want more, you can leave the wallet in mining mode for a night or longer, until an amount pleasing to the eye is formed.

You can turn off the generation mode with the command:

setgenerate false

It also turns off if you close the wallet client. By the way, after 1 day, the coins received by PoW-mining will themselves generate new coins using the PoS mechanism.

For the convenience of tracking records, we also deployed a blockchain explorer for a public testnet -  testnet.emercoin.mintr.org it has the same functionality as for the “big Emer”, you can conveniently switch between them.

If for some reason you are not happy with the public testnet. You can create your own - private.

How to do it?

First you need to create a local network isolated from the Internet, in which you will conduct experiments. Isolation is needed so that your testnet does not join the public.
Next, in this test network, set at least two wallets with the activated option testnet = 1, as mentioned above.

After that, on each node of your local testnet, in the console run the “addnode” commands, as described in the example above. Specify the IP addresses of other computers where the nodes of your local testnet are running as IP addresses.

For example, suppose you installed testnet wallets on your local machines and Then in the wallet console on the machine enter “ addnode add ”, and accordingly, in the wallet console on the machine, enter “ addnode add ”.

You can enter these parameters in the emercoin.conf file. So, say on machine it will look like this:

setgenerate = true 1
addnode =
testnet = 1

* The emercoin.conf file is located in the directory where the blockchain is located:

Linux / FreeBSD: $ HOME / .emercoin
Windows: C: \ Users \% User% \ AppData \ Roaming \ EmerCoin

If the file does not exist, create it. When creating a new file in Windows, be careful - disable “extension hiding” in file explorer, so as not to create the emercoin.conf.txt file instead of emercoin.conf (Windows likes this).

Also popular now: