Skip to content

Generating the Initial Shares

pennybreak edited this page Apr 26, 2014 · 3 revisions

Once you have a new genesis block, generating the initial shares is a very easy process. You will need the following ...

Two (2) Linux machines

These can be virtual machines or physical machines, as long as they are on the same subnet and able to communicate with each other.

Peershares daemon that was compiled with your new genesis block

This exact build needs to be placed on both machines.

peershares.conf

You need one of these for each machine, located in your /home/.peershares/ directory.

To create:

$ mkdir ~/.peershares
$ cd ~/.peershares
$ touch peershares.conf

Then you can edit the file using your favorite text editor. Assuming your machines are on a 192.168.1.x subnet, edit your conf files as shown below ...

Machine 1 (example ip: 192.168.1.88)

server=1
rpcallowip=192.168.1.x
listen=1
rpcuser=<anything>
rpcpassword=<anything>
dnsseed=0
port=9090
rpcport=9091
gen=1

Machine 2 (example ip: 192.168.1.99)

server=1
connect=192.168.1.88:9090
rpcuser=<anything>
rpcpassword=<anything>
port=19090
rpcport=19091
gen=1

Note: If you are trying to create a TestNet, add the line 'testnet=1' to both peershares.conf files.

Note: If you would only like for all of the initial shares to be generated on one machine, comment out (using '#') gen=1 on the machine that you do not want any shares to be generated on.

Start the daemons

On machine 1, run:

$ ./peersharesd --deamon

The server will start, then you can run the same command on machine 2.

Check the status of share generation

Run:

$ ./peersharesd getinfo

If everything is working correctly, you will start seeing the "blocks" field increase. Run the same command again to refresh.

Pro tip: Use 'watch -n 30 ./peersharesd getinfo' to automatically refresh the status every 30 seconds.