Giter VIP home page Giter VIP logo

peerplays's Introduction

Intro for new developers and witnesses

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

For Ubuntu 14.04 LTS and up users, see this link first: https://github.com/cryptonomex/graphene/wiki/build-ubuntu

and then proceed with:

git clone https://github.com/pbsa/peerplays.git
cd peerplays
git submodule update --init --recursive
cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Release .
make
./programs/witness_node/witness_node

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:9777
rpc-endpoint = 127.0.0.1:8090
seed-node = 213.184.225.234:59500

Start the witness back up

./programs/witness_node/witness_node

Upgrading A Peerplays Node

To minimize downtime of your peerplays node when upgrading, one upgrade idea was written in this steemit article: https://steemit.com/peerplays/@joseph/peerplays-update-setting-a-backup-witness-server-switching-servers

Wallet Setup

Then, in a separate terminal window, start the command-line wallet cli_wallet:

./programs/cli_wallet/cli_wallet

To set your initial password to 'password' use:

>>> set_password password
>>> unlock password

A list of CLI wallet commands is available here.

Testnet

  • chain-id - 5b37954aa0d33a8e0d57b084995c262a7c13dbc0693d3e96654e63ff45a9ceec

Register your username at the faucet address

https://595-dev.pixelplex.by/

Use the get_private_key_from_password command

You will to generate owner and active keys

get_private_key_from_password your_witness_username active the_key_you_received_from_the_faucet

This will reveal an array for your active key ["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 the key with this command
import_key "your_witness_username" xxxx

Upgrade your account to lifetime membership

upgrade_account your_witness_username true

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)

get_private_key block_signing_key

Compare this result to

dump_private_keys

You should see 3 pairs of keys. One of the pairs should match your block_signing_key and this is the one you will use in the next step!

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.

Comment out the existing private-key before adding yours

vim witness_node_data_dir/config.ini

witness-id = "1.6.x"
private-key = ["block_signing_key","private_key_for_your_block_signing_key"]

start your witness back up

./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. 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). You can check your votes with.

get_witness your_witness_account

systemd

It's important for your witness to start when your system boots up. The filepaths here assume that you installed your witness into /home/ubuntu/peerplays

Create a logfile to hold your stdout/err logging

sudo touch /var/log/peerplays.log

Save this file in your peerplays directory. vi /home/ubuntu/peerplays/start.sh

#!/bin/bash

cd /home/ubuntu/peerplays
./programs/witness_node/witness_node &> /var/log/peerplays.log

Make it executable

chmod 744 /home/ubuntu/peerplays/start.sh

Create this file: sudo vi /etc/systemd/system/peerplays.service Note the path for start.sh. Change it to match where your start.sh file is if necessary.

[Unit]
Description=Peerplays Witness
After=network.target

[Service]
ExecStart=/home/ubuntu/peerplays/start.sh

[Install]
WantedBy = multi-user.target

Enable the service

sudo systemctl enable peerplays.service

Make sure you don't get any errors

sudo systemctl status peerplays.service

Stop your witness if it is currently running from previous steps, then start it with the service.

sudo systemctl start peerplays.service

Check your logfile for entries

tail -f /var/log/peerplays.log

Running specific tests

  • tests/chain_tests -t block_tests/name_of_test

peerplays's People

Contributors

cryptoapi-project avatar cryptosig avatar kstdl avatar pbsa-github avatar tranquilbeardown avatar wmbutler avatar xeroc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

peerplays's Issues

Key rotation helper method

It would be helpful and improve account security, if there was a command available in the wallet to rotate account keys for any combination of labels.

Perhaps the validation is simply proving that you hold the current key for a given label, or a key with a higher permission for that account.

I'm pretty sure this is possible on Steem, not sure if Peerplays needs to be modified at the blockchain level to support this.

Rotate Backup Witnesses Into The Production Queue

Similar to Steem, it would be beneficial for witnesses outside of the active group to be cycled through regularly. While we may not yet need the excess capacity, in the future these witnesses/nodes may be called upon to produce. Voters and node operators should be able to identify which backups are configured properly and reliably.

As applications are built out and witness feeds become a critical point of failure, it will become even more important to know which backups are ready to assume active production with reliable feeds as well.

GUI wallet vote search is case sensative

People are having trouble voting for witnesses because they inadvertently capitalize the witness name and incorrectly think they can't vote for the witness or that the witness doesn't exist. The solution is to not check for case or to automatically lower all case. Since the GUI code is not forkable I am putting it here in hopes that PBSA developers will fix this problem.

chain test cases 20 errors

alfredo@alfredo-Inspiron-5559 ~/CLionProjects/peerplays $ ./tests/chain_test 
...
*** 20 failures detected in test suite "Master Test Suite"
alfredo@alfredo-Inspiron-5559 ~/CLionProjects/peerplays $ 

Peerplays.exe file not working on 32bit OS

L.S.,

I read on a few posts elsewhere the non-working .exe file on a (Windows) 32 bit system is already a known factor. Is this to be mentioned here to make it an official issue? I.e., is this already a verified subject for the devops team and is a new release to solve this underway?

Kind regards,
Mathieu

Peerplays wallet GUI only shows active witnesses

Just in case a GUI dev or other team member of Peerplays does not see the discussion in the witness channel, a few of us have been discussing how the GUI not displaying non-active witnesses has severely hampered the ability to get votes for those (currently) 24 and down. You can see the disparity by visiting: https://peerplaysdb.com/witnesses

A proposed solution is to simply display all witnesses ordered by delegation. It seems only fair if people have invested the PPY to create their witness accounts. And perhaps a hack could be added to not display the initX accounts.

setup issues

following the instructions but on this one
import_key "your_witness_username" xxxx
i get the following error:


unlocked >>> import_key "myUsername" 5somelongkey
import_key "myUsername" 5somelongkey
10 assert_exception: Assert Exception
rec && rec->name == account_name_or_id:
    {}
    th_a  wallet.cpp:742 get_account

i've checked and rechecked to make sure I'm using the second value in the array from the previous step. i'm also sure that i'm using the same username as the previous step. any ideas?

Unable to claim PPY (BTS share-drop)

Using the 0.1.8 osx build.

After inputting Owner WIF, and clicking on "Login and claim", I get this:
screen shot 2017-06-27 at 4 14 41 am

I tripple checked to make sure the key is right.

Peerplays GUI wallet - source code not published?

Multiple crowdfund contributors looking to claim their PPY tokens have asked a number of times on the Telegram channel for a link to the source code of the GUI wallet.
It's understandable that providing one's private key from a redemption file, or a BitShares private key to an application whose source code has not been reviewed would be a valid cause for concern.
For that reason, some contributors have been holding off claiming their PPY tokens and have therefore been unable to vote for witnesses.

peerplays dont compile in ubuntu 18.04

i think it is by the openssl 1.1. tried with different boost versions and it is the same thing. bitshares haves a patch for this, peerplays will need to port.

log:

[  8%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/thread/thread.cpp.o
In file included from /usr/include/boost/coroutine/stack_context.hpp:14:0,
                 from /home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/context.hpp:10,
                 from /home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread_d.hpp:5,
                 from /home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread.cpp:5:
/usr/include/boost/coroutine/detail/config.hpp:17:4: warning: #warning "Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINES_NO_DEPRECATION_WARNING." [-Wcpp]
 #  warning                  "Boost.Coroutine is now deprecated. Please switch to Boost.Coroutine2. To disable this warning message, define BOOST_COROUTINES_NO_DEPRECATION_WARNING."
    ^~~~~~~
In file included from /home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread_d.hpp:5:0,
                 from /home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread.cpp:5:
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/context.hpp:215:9: error: ‘fcontext_t’ in namespace ‘bc’ does not name a type
     bc::fcontext_t               my_context;
         ^~~~~~~~~~
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/context.hpp: In constructor ‘fc::context::context(void (*)(intptr_t), stack_allocator&, fc::thread*)’:
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/context.hpp:69:6: error: ‘my_context’ was not declared in this scope
      my_context = bc::make_fcontext( stack_ctx.sp, stack_ctx.size, sf);
      ^~~~~~~~~~
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/context.hpp:69:6: note: suggested alternative: ‘context’
      my_context = bc::make_fcontext( stack_ctx.sp, stack_ctx.size, sf);
      ^~~~~~~~~~
      context
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/context.hpp:69:23: error: ‘make_fcontext’ is not a member of ‘bc’
      my_context = bc::make_fcontext( stack_ctx.sp, stack_ctx.size, sf);
                       ^~~~~~~~~~~~~
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/context.hpp:69:23: note: suggested alternative: ‘stack_context’
      my_context = bc::make_fcontext( stack_ctx.sp, stack_ctx.size, sf);
                       ^~~~~~~~~~~~~
                       stack_context
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/context.hpp: In constructor ‘fc::context::context(fc::thread*)’:
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/context.hpp:88:6: error: class ‘fc::context’ does not have any field named ‘my_context’
      my_context(nullptr),
      ^~~~~~~~~~
In file included from /home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread.cpp:5:0:
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread_d.hpp: In member function ‘bool fc::thread_d::start_next_fiber(bool)’:
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread_d.hpp:401:21: error: ‘jump_fcontext’ is not a member of ‘bc’
                 bc::jump_fcontext( &prev->my_context, next->my_context, 0 );
                     ^~~~~~~~~~~~~
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread_d.hpp:401:21: note: suggested alternative: ‘stack_context’
                 bc::jump_fcontext( &prev->my_context, next->my_context, 0 );
                     ^~~~~~~~~~~~~
                     stack_context
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread_d.hpp:401:43: error: ‘struct fc::context’ has no member named ‘my_context’; did you mean ‘context’?
                 bc::jump_fcontext( &prev->my_context, next->my_context, 0 );
                                           ^~~~~~~~~~
                                           context
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread_d.hpp:401:61: error: ‘struct fc::context’ has no member named ‘my_context’; did you mean ‘context’?
                 bc::jump_fcontext( &prev->my_context, next->my_context, 0 );
                                                             ^~~~~~~~~~
                                                             context
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread_d.hpp:443:21: error: ‘jump_fcontext’ is not a member of ‘bc’
                 bc::jump_fcontext( &prev->my_context, next->my_context, (intptr_t)this );
                     ^~~~~~~~~~~~~
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread_d.hpp:443:21: note: suggested alternative: ‘stack_context’
                 bc::jump_fcontext( &prev->my_context, next->my_context, (intptr_t)this );
                     ^~~~~~~~~~~~~
                     stack_context
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread_d.hpp:443:43: error: ‘struct fc::context’ has no member named ‘my_context’; did you mean ‘context’?
                 bc::jump_fcontext( &prev->my_context, next->my_context, (intptr_t)this );
                                           ^~~~~~~~~~
                                           context
/home/alfredo/CLionProjects/peerplays/libraries/fc/src/thread/thread_d.hpp:443:61: error: ‘struct fc::context’ has no member named ‘my_context’; did you mean ‘context’?
                 bc::jump_fcontext( &prev->my_context, next->my_context, (intptr_t)this );
                                                             ^~~~~~~~~~
                                                             context
libraries/fc/CMakeFiles/fc.dir/build.make:182: recipe for target 'libraries/fc/CMakeFiles/fc.dir/src/thread/thread.cpp.o' failed
make[2]: *** [libraries/fc/CMakeFiles/fc.dir/src/thread/thread.cpp.o] Error 1
CMakeFiles/Makefile2:397: recipe for target 'libraries/fc/CMakeFiles/fc.dir/all' failed
make[1]: *** [libraries/fc/CMakeFiles/fc.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.