From 751d7b858f2f91b50f306b18333b7ade6cafcdd3 Mon Sep 17 00:00:00 2001 From: Bill Butler Date: Sat, 27 May 2017 12:24:26 -0400 Subject: [PATCH 01/12] Procedural changes to becoming a witness --- README.md | 59 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 811b0514f..4b8598f04 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Intro for new developers and witnesses This is a quick introduction to get new developers and witnesses up to speed on Peerplays blockchain. -Starting A Peerpalys Noe +Starting A Peerplays Node ----------------- For Ubuntu 14.04 LTS and up users, see this link first: @@ -28,7 +28,7 @@ Then, in a separate terminal window, start the command-line wallet `cli_wallet`: ./programs/cli_wallet/cli_wallet -To set your iniital password to 'password' use: +To set your initial password to 'password' use: >>> set_password password >>> unlock password @@ -56,25 +56,62 @@ Testnet ---------------------- - chain-id - 82c339d32256728bcc4df63bcc3e3244f6140a16fef31f707a6613ad189156ae -- seed node - 213.184.225.234:59500 -- faucet address - https://595-dev.pixelplex.by/ -Register your username at the faucet address. -Use the get_private_key_from_password command in cli_wallet with the password downloaded during your username signup to access your private keys. You will need owner, active, and memo +### Add this seed node to config.ini +``` +vim witness_node_data_dir/config.ini + +seed-node = 213.184.225.234:59500 +``` -import_keys into your cli_wallet +### Register your username at the faucet address +https://595-dev.pixelplex.by/ -upgrade_account username true -create_witness username url true +### Use the get_private_key_from_password command in cli_wallet with the password downloaded during your username signup to access your private keys. You will need owner, active, and memo +``` +get_private_key_from_password the_key_you_received_from_the_faucet your_witness_username active +``` +This will reveal an array `['PPYxxx', 'xxxx']` + +### import_keys into your cli_wallet +- use the second value in the array returned from the previous step for the private key +- be sure to wrap your username in quotes +``` +import_key "your_witness_username" private_key_from_previous_step +``` + +### Upgrade your account to lifetime membership +``` +upgrade_account your_witness_username true +``` + +### Create your witness (substitute the url for your witness information) +``` +create_witness your_witness_username url true +``` Be sure to take note of the block_signing_key and use get_private_key so you can have your key pair for your config. +### Get your witness id +``` get_witness username (note the "id" for your config) +``` -Modify your witness_node config.ini to include your witness id and private key pair. +### Modify your witness_node config.ini to include **your** witness id and private key pair. +``` +vim witness_node_data_dir/config.ini + +witness-id = "1.6.x" +private-keys = ['PPYxxx'.'xxxx'] +``` + +### start your witness with resync +``` +./programs/cli_wallet/cli_wallet --resync --replay +``` -start your witness specifying the seed node: ./programs/cli_wallet/cli_wallet --seed-node=213.184.225.234:59500 +### Ask to be voted in! Join @Peerplays Telegram group to find information about the witness group. From 26735b2010d14fef2b7ee15d50a4109e44d8bc29 Mon Sep 17 00:00:00 2001 From: Bill Butler Date: Sat, 27 May 2017 12:36:00 -0400 Subject: [PATCH 02/12] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 4b8598f04..8a77089c8 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,18 @@ private-keys = ['PPYxxx'.'xxxx'] ### Ask to be voted in! Join @Peerplays Telegram group to find information about the witness group. +http://t.me/@peerplayswitness + +You will get logs that look like this: + +``` +2070264ms th_a application.cpp:506 handle_block ] Got block: #87913 time: 2017-05-27T16:34:30 latency: 264 ms from: bhuz-witness irreversible: 87903 (-10) +2071000ms th_a witness.cpp:204 block_production_loo ] Not producing block because slot has not yet arrived +2072000ms th_a witness.cpp:204 block_production_loo ] Not producing block because slot has not yet arrived +2073000ms th_a witness.cpp:201 block_production_loo ] Not producing block because it isn't my turn +``` + +Assuming you've received votes, you will start producing as a witness at the next maintenance interval (once per hour). Running specific tests From 2c5d2ef3807a05cc74f68fbcc446cfd5db99ee7d Mon Sep 17 00:00:00 2001 From: Bill Butler Date: Sat, 27 May 2017 12:48:08 -0400 Subject: [PATCH 03/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a77089c8..45bd3b6bb 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ private-keys = ['PPYxxx'.'xxxx'] ### start your witness with resync ``` -./programs/cli_wallet/cli_wallet --resync --replay +./programs/witness_node/witness_node --resync --replay ``` ### Ask to be voted in! From fb7560928716c193eeab1e3ec07869921309e25b Mon Sep 17 00:00:00 2001 From: Bill Butler Date: Sat, 27 May 2017 16:45:14 -0400 Subject: [PATCH 04/12] Clean instructions tested by billbutler with help from taconator --- README.md | 100 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 59 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 45bd3b6bb..4f2d2438f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Intro for new developers and witnesses ------------------------ -This is a quick introduction to get new developers and witnesses up to speed on Peerplays blockchain. +This is a quick introduction to get new developers and witnesses up to speed on Peerplays blockchain. It is intended for witnesses plannig to join a live, already deployed blockchain. Starting A Peerplays Node ----------------- @@ -17,12 +17,16 @@ and then proceed with: cmake -DCMAKE_BUILD_TYPE=Debug . make ./programs/witness_node/witness_node + +Launching the witness creates required directories. Next, **stop the witness** and continue. -This will launch the witness node. If you would like to launch the command-line wallet, you must first specify a port -for communication with the witness node. To do this, add text to `witness_node_data_dir/config.ini` as follows, then -restart the node: - + vi witness_node_data_dir/config.ini rpc-endpoint = 127.0.0.1:8090 + seed-node = 213.184.225.234:59500 + +Start the witness back up + + ./programs/witness_node/witness_node Then, in a separate terminal window, start the command-line wallet `cli_wallet`: @@ -33,72 +37,73 @@ To set your initial password to 'password' use: >>> set_password password >>> unlock password -To import your initial balance: - - >>> import_balance nathan [5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3] true - -If you send private keys over this connection, `rpc-endpoint` should be bound to localhost for security. A list of CLI wallet commands is available [here](https://github.com/PBSA/peerplays/blob/master/libraries/wallet/include/graphene/wallet/wallet.hpp). -Witness node ------------- - -The role of the witness node is to broadcast transactions, download blocks, and optionally sign them. - -``` -./witness_node --rpc-endpoint 127.0.0.1:8090 --enable-stale-production -w '"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"' '"1.6.10"' '"1.6.11"' '"1.6.12"' '"1.6.13"' '"1.6.14"' '"1.6.15"' '"1.6.16"' '"1.6.17"' '"1.6.18"' '"1.6.19"' '"1.6.20"' '"1.6.21"' '"1.6.22"' '"1.6.23"' '"1.6.24"' '"1.6.25"' '"1.6.26"' '"1.6.27"' '"1.6.28"' '"1.6.29"' '"1.6.30"' '"1.6.31"' '"1.6.32"' '"1.6.33"' '"1.6.34"' '"1.6.35"' '"1.6.36"' '"1.6.37"' '"1.6.38"' '"1.6.39"' '"1.6.40"' '"1.6.41"' '"1.6.42"' '"1.6.43"' '"1.6.44"' '"1.6.45"' '"1.6.46"' '"1.6.47"' '"1.6.48"' '"1.6.49"' '"1.6.50"' '"1.6.51"' '"1.6.52"' '"1.6.53"' '"1.6.54"' '"1.6.55"' '"1.6.56"' '"1.6.57"' '"1.6.58"' '"1.6.59"' '"1.6.60"' '"1.6.61"' '"1.6.62"' '"1.6.63"' '"1.6.64"' '"1.6.65"' '"1.6.66"' '"1.6.67"' '"1.6.68"' '"1.6.69"' '"1.6.70"' '"1.6.71"' '"1.6.72"' '"1.6.73"' '"1.6.74"' '"1.6.75"' '"1.6.76"' '"1.6.77"' '"1.6.78"' '"1.6.79"' '"1.6.80"' '"1.6.81"' '"1.6.82"' '"1.6.83"' '"1.6.84"' '"1.6.85"' '"1.6.86"' '"1.6.87"' '"1.6.88"' '"1.6.89"' '"1.6.90"' '"1.6.91"' '"1.6.92"' '"1.6.93"' '"1.6.94"' '"1.6.95"' '"1.6.96"' '"1.6.97"' '"1.6.98"' '"1.6.99"' '"1.6.100"' -``` - Testnet ---------------------- - - chain-id - 82c339d32256728bcc4df63bcc3e3244f6140a16fef31f707a6613ad189156ae - -### Add this seed node to config.ini -``` -vim witness_node_data_dir/config.ini - -seed-node = 213.184.225.234:59500 -``` - -### Register your username at the faucet address +Register your username at the faucet address +--------------------------- https://595-dev.pixelplex.by/ -### Use the get_private_key_from_password command in cli_wallet with the password downloaded during your username signup to access your private keys. You will need owner, active, and memo +Use the get_private_key_from_password command in cli_wallet with the password downloaded during your username signup to access your private keys. You will need owner, active, and memo +--------------------------------- ``` get_private_key_from_password the_key_you_received_from_the_faucet your_witness_username active +get_private_key_from_password the_key_you_received_from_the_faucet your_witness_username memo +get_private_key_from_password the_key_you_received_from_the_faucet your_witness_username owner ``` -This will reveal an array `['PPYxxx', 'xxxx']` +This will reveal an array for each `['PPYxxx', 'xxxx']` -### import_keys into your cli_wallet -- use the second value in the array returned from the previous step for the private key +import_keys into your cli_wallet +------------------------------- +- use the second value in each array returned from the previous step for the private key - be sure to wrap your username in quotes +- import all 3 keys received above ``` -import_key "your_witness_username" private_key_from_previous_step +import_key "your_witness_username" xxxx +import_key "your_witness_username" xxxx +import_key "your_witness_username" xxxx ``` -### Upgrade your account to lifetime membership +Upgrade your account to lifetime membership +-------------------------------- ``` upgrade_account your_witness_username true ``` -### Create your witness (substitute the url for your witness information) +Create your witness (substitute the url for your witness information) +------------------------------- +- place quotes around url +``` +create_witness your_witness_username "url" true +``` +**Be sure to take note of the block_signing_key** + +IMPORTANT (issue below command using block_signing_key just obtained) ``` -create_witness your_witness_username url true +get_private_key block_signing_key ``` -Be sure to take note of the block_signing_key and use get_private_key so you can have your key pair for your config. +Compare this result to -### Get your witness id +``` +dump_private_keys +``` + +Get your witness id +----------------- ``` get_witness username (note the "id" for your config) ``` -### Modify your witness_node config.ini to include **your** witness id and private key pair. +Modify your witness_node config.ini to include **your** witness id and private key pair. +------------------------- +Comment out the existing private-key before adding yours ``` vim witness_node_data_dir/config.ini @@ -106,11 +111,24 @@ witness-id = "1.6.x" private-keys = ['PPYxxx'.'xxxx'] ``` -### start your witness with resync +start your witness with resync +------------------ +``` +./programs/witness_node/witness_node +``` + +If it fails to start, try with these flags (not for permanent use) + ``` ./programs/witness_node/witness_node --resync --replay ``` +Vote for yourself +-------------- +``` +vote_for_witness your_witness_account your_witness_account true true +``` + ### Ask to be voted in! Join @Peerplays Telegram group to find information about the witness group. From e723e5d58eb551f548e1e9f4fbd3500842cb4650 Mon Sep 17 00:00:00 2001 From: Bill Butler Date: Sat, 27 May 2017 17:18:48 -0400 Subject: [PATCH 05/12] Update p2p-endpoint --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4f2d2438f..663dda58a 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ and then proceed with: Launching the witness creates required directories. Next, **stop the witness** and continue. vi witness_node_data_dir/config.ini + p2p-endpoint = 0.0.0.0:7777 rpc-endpoint = 127.0.0.1:8090 seed-node = 213.184.225.234:59500 From 5c28dda2bf6613841c13aef1e68798f359299e96 Mon Sep 17 00:00:00 2001 From: Bill Butler Date: Sat, 27 May 2017 17:27:47 -0400 Subject: [PATCH 06/12] better instructions for adding block_signing_key --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 663dda58a..a139f0f81 100644 --- a/README.md +++ b/README.md @@ -109,10 +109,10 @@ Comment out the existing private-key before adding yours vim witness_node_data_dir/config.ini witness-id = "1.6.x" -private-keys = ['PPYxxx'.'xxxx'] +private-keys = ['block_signing_key'.'private_key_for_your_block_signing_key'] ``` -start your witness with resync +start your witness back up ------------------ ``` ./programs/witness_node/witness_node From 6299a35bf1dce6b690880e5e33a87f543b5ecb62 Mon Sep 17 00:00:00 2001 From: Bill Butler Date: Sat, 27 May 2017 17:31:25 -0400 Subject: [PATCH 07/12] check your current votes --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a139f0f81..70dd6ec28 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,8 @@ Vote for yourself vote_for_witness your_witness_account your_witness_account true true ``` -### Ask to be voted in! +Ask to be voted in! +-------------- Join @Peerplays Telegram group to find information about the witness group. http://t.me/@peerplayswitness @@ -144,7 +145,11 @@ You will get logs that look like this: 2073000ms th_a witness.cpp:201 block_production_loo ] Not producing block because it isn't my turn ``` -Assuming you've received votes, you will start producing as a witness at the next maintenance interval (once per hour). +Assuming you've received votes, you will start producing as a witness at the next maintenance interval (once per hour). You can check your votes with. + +``` +get_witness your_witness_account +``` Running specific tests From 3e9209308339531b300185c11bfa33d275746fc4 Mon Sep 17 00:00:00 2001 From: Bill Butler Date: Sat, 27 May 2017 17:37:41 -0400 Subject: [PATCH 08/12] clarify --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 70dd6ec28..f3c08d076 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ Compare this result to ``` dump_private_keys ``` +You should see 4 pairs of keys. The last pair should match your block_signing_key and this is the one you will use in the next step! Get your witness id ----------------- From 92851de701e787c5d354b00df03cdf66b01d3171 Mon Sep 17 00:00:00 2001 From: Bill Butler Date: Sat, 27 May 2017 17:58:30 -0400 Subject: [PATCH 09/12] change Debug to Release --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f3c08d076..e4b791f6d 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ and then proceed with: git clone https://github.com/pbsa/peerplays.git cd peerplays git submodule update --init --recursive - cmake -DCMAKE_BUILD_TYPE=Debug . + cmake -DCMAKE_BUILD_TYPE=Release . make ./programs/witness_node/witness_node From 7ebe19ab59dd51862afca7b4602a27ebb3cd5013 Mon Sep 17 00:00:00 2001 From: Bill Butler Date: Sat, 27 May 2017 21:21:59 -0400 Subject: [PATCH 10/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e4b791f6d..ca83776fd 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Comment out the existing private-key before adding yours vim witness_node_data_dir/config.ini witness-id = "1.6.x" -private-keys = ['block_signing_key'.'private_key_for_your_block_signing_key'] +private-keys = ['block_signing_key','private_key_for_your_block_signing_key'] ``` start your witness back up From d58ed2cbf193f1bf1b35550c77afb53b89851096 Mon Sep 17 00:00:00 2001 From: Bill Butler Date: Sat, 27 May 2017 21:51:48 -0400 Subject: [PATCH 11/12] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index ca83776fd..47c7571c0 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,6 @@ Use the get_private_key_from_password command in cli_wallet with the password do --------------------------------- ``` get_private_key_from_password the_key_you_received_from_the_faucet your_witness_username active -get_private_key_from_password the_key_you_received_from_the_faucet your_witness_username memo get_private_key_from_password the_key_you_received_from_the_faucet your_witness_username owner ``` This will reveal an array for each `['PPYxxx', 'xxxx']` @@ -69,7 +68,6 @@ import_keys into your cli_wallet ``` import_key "your_witness_username" xxxx import_key "your_witness_username" xxxx -import_key "your_witness_username" xxxx ``` Upgrade your account to lifetime membership From ccdee44ab03c41ed80f9df4b44d0f42fdf11dc19 Mon Sep 17 00:00:00 2001 From: Bill Butler Date: Sat, 27 May 2017 21:54:20 -0400 Subject: [PATCH 12/12] remove memo key creation --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 47c7571c0..39d581361 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,10 @@ Register your username at the faucet address https://595-dev.pixelplex.by/ -Use the get_private_key_from_password command in cli_wallet with the password downloaded during your username signup to access your private keys. You will need owner, active, and memo +Use the get_private_key_from_password command --------------------------------- +You will to generate owner and active keys + ``` get_private_key_from_password the_key_you_received_from_the_faucet your_witness_username active get_private_key_from_password the_key_you_received_from_the_faucet your_witness_username owner