|
|
@ -14,7 +14,8 @@ How is running the Testnet different to running a Mainnet node? |
|
|
|
-------------- |
|
|
|
|
|
|
|
In essence their is very little difference in running a Testnet to a Mainnet node |
|
|
|
it only requires one of two possible changes in how you start the node. |
|
|
|
it only requires one of many possible changes in how you start the node - we will |
|
|
|
look at just a few. |
|
|
|
|
|
|
|
However - it is important that before you choose which method to use, you consider |
|
|
|
if you will be ONLY running a Testnet node, or if you will be running one alongside |
|
|
@ -30,6 +31,9 @@ Start the Testnet: |
|
|
|
``` |
|
|
|
./src/hushd -testnet |
|
|
|
``` |
|
|
|
This will give you a running node on testnet - and your node will verify testnet |
|
|
|
transactions |
|
|
|
|
|
|
|
### To run a Testnet node on it's own every time Hush is started. |
|
|
|
For this we need to edit the hush.conf configuration file. |
|
|
|
|
|
|
@ -37,12 +41,50 @@ Using your favourite text editor add the following line to the hush.conf file: |
|
|
|
``` |
|
|
|
testnet=1 |
|
|
|
``` |
|
|
|
Exit your text editor and start the node with: |
|
|
|
``` |
|
|
|
./src/hushd |
|
|
|
``` |
|
|
|
as usual. Your node will start on the Testnet and be validating Testnet transactions |
|
|
|
|
|
|
|
### I want to run the Testnet AND mine some Testnet coins! |
|
|
|
Thats great!! and you will be helping to keep the testnet alive and well - and supporting |
|
|
|
all the testing that developers are trying out out on the chain. |
|
|
|
|
|
|
|
But please remember - this is not competitive mining, we don't need a rig full of GPU's |
|
|
|
running to keep the Testnet generating blocks and coins - just one CPU core will do! |
|
|
|
Keeping the hasrate low will ensure that everybody can mine a few blocks and do some testing. |
|
|
|
|
|
|
|
Please also note - many VPS suppliers don't like users pegging a CPU core at 100% permanently |
|
|
|
you may want to run this from home in a VM or on a server you own. |
|
|
|
|
|
|
|
This time we will make some more detailed changes to the hush.conf file (these will need |
|
|
|
removing before using this datadir for a Mainnet node) |
|
|
|
|
|
|
|
Using your favourite text editor add the following lines to the hush.conf file: |
|
|
|
``` |
|
|
|
testnet=1 |
|
|
|
gen=1 |
|
|
|
genproclimit=1 |
|
|
|
equihashsolver=tromp |
|
|
|
mineraddress= |
|
|
|
``` |
|
|
|
Don't forget to add in one of your testnet transparent addresses (an empty one) |
|
|
|
on the last line there - it will keep all your mined coins on one address ready for |
|
|
|
shielding. |
|
|
|
|
|
|
|
### What if I want to run Mainnet and Testnet at the same time? |
|
|
|
Not recommended - but if you must. |
|
|
|
|
|
|
|
The simple way is to use a common hush.conf file and data directory - but then you |
|
|
|
can't mine as you can't tell one to mine and one not to mine using the same config |
|
|
|
But you will still need to talk to both nodes. |
|
|
|
|
|
|
|
This is slightly more complex - as you will need to tell the client (hush-cli) which |
|
|
|
node you want to talk to when you ask it questions. |
|
|
|
|
|
|
|
By default hush-cli will talk to the Mainnet node if one / both are running |
|
|
|
|
|
|
|
By default hush-cli will talk to the Testnet node if ONLY the testnet is running |
|
|
|
|
|
|
|
First start the Mainnet: |
|
|
@ -63,6 +105,40 @@ hush-cli -rpcport=18822 getinfo |
|
|
|
``` |
|
|
|
this should show the Testnet node details and Testnet should be listed. |
|
|
|
|
|
|
|
### I REALLY want to run Testnet and Mainnet AND mine on the Testnet |
|
|
|
OK - Then I assume you know what you are doing on Linux, some basic |
|
|
|
commands and how to troubleshoot when things go wrong. |
|
|
|
|
|
|
|
For this, no changes to the Mainnet hush.conf are needed - they can all be removed |
|
|
|
and put back to default. |
|
|
|
|
|
|
|
- Copy your ```/.hush``` data directory to ```/.hush-t``` or a suitably named alternative |
|
|
|
- Make the changes to the new ```/.hush-t/hush.conf``` file as before: |
|
|
|
``` |
|
|
|
testnet=1 |
|
|
|
gen=1 |
|
|
|
genproclimit=1 |
|
|
|
equihashsolver=tromp |
|
|
|
mineraddress= |
|
|
|
``` |
|
|
|
- Run this from the usual hush directory (adjust for your paths): |
|
|
|
``` |
|
|
|
./src/hushd -datadir=/home/username/.hush-t |
|
|
|
``` |
|
|
|
- OR make a nice bash script in ```/usr/bin/``` |
|
|
|
``` |
|
|
|
#!/bin/bash |
|
|
|
~/hush/src/hushd -datadir=/home/username/.hush-t $1 $2 $3 |
|
|
|
``` |
|
|
|
Remember that to talk to this Testnet node - you will still need to use the |
|
|
|
```./src/hush-cli -rpcport=18822``` style command, or of course you could also |
|
|
|
make other scripts and nice bits to customise the system the way you want it. |
|
|
|
Or use any combination of the methods outlined above. |
|
|
|
|
|
|
|
Happy hashing! |
|
|
|
|
|
|
|
### |
|
|
|
|
|
|
|
Building |
|
|
|
-------- |
|
|
|
Building a Testnet node is no different from building a mainnet node - it |
|
|
|