How To Become an active Witness simple - esherproject/esher-core GitHub Wiki
This document serves as an introduction on how to become an actively block producing witness in in the Esher 2.0 network. Please note that there currently is no public testnet available, hence, this howto will fail at the last few steps. However, we feel that we should inform interested parties about how to prepare their machines for participation as witness as soon as possible.
You will only need ESH balances and the one of your account owner keys in order to become a witness.
Esher 2.0 network
Lock coins to get voting power
Go to UI Wallet menu Voting
, tab WITNESSES
, click Button Create Lock
. Fill in the amount you desire and select the lock period. Recommended amount is 500,000 ESH because you'll need to vote for yourself so you need a proper voting power.
Becoming a Witness
To become a witness and be able to produce blocks, you first need to create a witness object that can be voted in.
Note: If you want to experiment with things that require voting, be aware that
votes are only tallied once per day at the maintenance interval.
get_dynamic_global_properties
tells us when that will be in
next_maintenance_time
. Once the next maintenance interval passes, run
get_global_properties
again and you should see that your new witness has been
voted in.
Before we get started, we can see the current list of witnesses voted in, which will simply be the ten default witnesses:
unlocked >>> get_global_properties
...
"active_witnesses": [
"1.6.0",
"1.6.1",
"1.6.2",
"1.6.3",
"1.6.4",
"1.6.5",
"1.6.6",
"1.6.7",
"1.6.8",
"1.6.9"
],
...
unlocked >>> create_witness <accountname> "your-ip-and-port-of-your-witness-node" true
{
"ref_block_num": 139,
"ref_block_prefix": 3692461913,
"relative_expiration": 3,
"operations": [[
21,{
"fee": {
"amount": 0,
"asset_id": "1.3.0"
},
"witness_account": "1.2.16",
"url": "your-ip-and-port-of-your-witness-node",
"block_signing_key": "PUBLIC KEY",
"initial_secret": "00000000000000000000000000000000000000000000000000000000"
}
]
],
"signatures": [
"1f2ad5597af2ac4bf7a50f1eef2db49c9c0f7616718776624c2c09a2dd72a0c53a26e8c2bc928f783624c4632924330fc03f08345c8f40b9790efa2e4157184a37"
]
}
Our witness is registered, but it can't produce blocks because nobody has voted
it in. You can see the current list of active witnesses with
get_global_properties
:
unlocked >>> get_global_properties
{
"active_witnesses": [
"1.6.0",
"1.6.1",
"1.6.2",
"1.6.3",
"1.6.4",
"1.6.5",
"1.6.7",
"1.6.8",
"1.6.9"
],
...
Now, we should vote our witness in. Vote all of the shares in both
<accountname>
in favor of your new witness.
unlocked >>> vote_for_witness <accountname> <accountname> true true
[a transaction in json format]
or you can vote through Esher Web Wallet. You can vote others as well.
Now we wait until the next maintenance interval.
Get the witness object using get_witness
and take note of two things. The
id
is displayed in get_global_properties
when the witness is voted in, and
we will need it on the witness_node
command line to produce blocks. We'll
also need the public signing_key
so we can look up the correspoinding private
key.
Once we have that, run get_witness
to see your witness Id
. Witness Id prefix is 1.6.xx
. In this sample below, witness id is 1.6.10
unlocked >>> get_witness <accountname>
{
[...]
"id": "1.6.10",
"signing_key": "ESHER7vQ7GmRSJfDHxKdBmWMeDMFENpmHWKn99J457BNApiXXXXXXXX",
[...]
}
IMPORTANT!!! signing_key
could be different with all keys in your Paper Wallet. Get the public signing_key
from get_witness
command and then get the private key of this public signing_key
get_private_key "ESHER7vQ7GmRSJfDHxKdBmWMeDMFENpmHWKn99J457BNApiXXXXXXXX"
Store the signing_key
public and private key as it will be used in the next steps.
Now we need to start the witness, so shut down the wallet (ctrl-d), and shut
down the witness (ctrl-c). Re-launch the witness, now mentioning the new
witness 1.6.10 (change this witness id with your witness id) and its signing_key
keypair that we retrieve in the previous step:
./witness_node --witness-id '"1.6.10"' --private-key '["ESHER7vQ7GmRSJfDHxKdBmWMeDMFENpmHWKn99J457BNApiXXXXXXXX", "5JGi7DM7J8fSTizZ4D9roNgd8dUc5pirUe9taxYCUUsnXXXXXXX"]'
Alternatively (recommended), you can also add this line into yout config.ini:
witness-id = "1.6.10"
private-key = ["ESHER7vQ7GmRSJfDHxKdBmWMeDMFENpmHWKn99J457BNApiXXXXXXXX","5JGi7DM7J8fSTizZ4D9roNgd8dUc5pirUe9taxYCUUsnXXXXXXX"]
IMPORTANT! USE Signing Key Public/Private Key pair
Note: Make sure to use YOUR public/private keys instead of the once given above!
If you monitor the output of the witness_node
, you should see it generate
blocks signed by your witness:
Witness 1.6.10 production slot has arrived; generating a block now...
Generated block #367 with timestamp 2015-07-05T20:46:30 at time 2015-07-05T20:46:30