Author Topic: Setting Up a New Witness Node  (Read 21059 times)

0 Members and 1 Guest are viewing this topic.

Offline tbone

  • Hero Member
  • *****
  • Posts: 632
    • View Profile
  • BitShares: tbone2
Here are some notes on installing and running my witness:  sahkan-bitshares

1. My 16GB RAM runs at 95% utilization, in comparison CPUs and Network around 5%
2. I am one of 56 witness nodes, only 19 are block producing (Active) I would say that it is extremely  centralized ATM.
3. To vote yourself in as an active node as of today you need over 403mln votes, around $23MLN?
4. 11 Committee members control most of the votes and setting on the network, including voting in witness nodes.
5. I saw a recent proposal to raise the witness pay to 3BTS per block (from 1.5BTS) maybe the number of Active witnesses should be raised as well?

My witness runs in Hawaii, if it ever goes active I will update this post with the MPA Price Feeds guide. Any feedback on fine tuning my witness will be appreciated and I will be grateful for any votes for  witness sahkan-bitshares!

Just so you know, the inventor of DPOS -- one of the world's foremost blockchain experts -- has shown over and over that Bitshares and Steem are effectively far more decentralized than Bitcoin, and that adding more witnesses does not improve security much and would actually have a negative consequence because it would increase the time to irreversible confirmation.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
I just want to remind guys don't give your vote so easy
don't forget account  bue who was our witness appear as a new member too.
I will only support new witness who has do some volunteer job for community already.
witness is not only a job but also an honour for those who believe Bitshares
It shouldn't be so easy to got.
I wish more volunteer like JonnyBitcoin will set up the witness node.

according to the info I collected from China community, the man behind witness "bue" is sfinder, a famous cheater in China cryptocurrency area.
if this is the fact,  we should definitely remove "bue" from witness slate immediately, it's a shame to let a cheater hide there.
this old post shows what sfinder has done in the past: https://bitsharestalk.org/index.php/topic,10937.0.html

however, I am 95%, but not 100% sure what I collected is the fact, to be careful, I set the title of this thread as "about witness "bue"" instead of "please remove "bue" from witness slate". if you know more about "bue", please post it here as proof for community to reach a decision.

to bue: if you are not sfinder, please claim here and provide evidence about who you are.

cheaters are always good at lying, so just being nice is not enough, being careful is always a must.

Offline rnglab

  • Full Member
  • ***
  • Posts: 171
    • View Profile
  • BitShares: rnglab
Hi sahkan, just a heads up:

Quote
Now you can test your install, run a full node to update the blockchain: (took me about 1.5 hrs or so...)
$./programs/witness_node/witness_node --rpc-endpoint="0.0.0.0:8090"

there's no need to expose the witness_node websocket rpc  to sync the blockchain, and block producer witness shouldn't expose it for security reasons.

Quote
HW Recommendation: There is no official recommendation. But what I found out is that ATM you should be OK with 8G RAM and a reasonable CPU and with a current blockchain of about 7GB enough disk space to support it.

My block producer witness nodes are using more than 9G RAM on Arch and Jessie this days. Even if you can successfully run it with just 8G, take into consideration that in-memory blockchain state is always growing with new objects  being created every day.  The node will crash if it gets out of RAM so I'd suggest starting with 16G RAM.

Good luck and welcome aboard

Offline JonnyB

  • Hero Member
  • *****
  • Posts: 636
    • View Profile
    • twitter.com/jonnybitcoin
thanks for this guide, you have my proxy vote
I run the @bitshares twitter handle
twitter.com/bitshares

Offline sahkan

  • Sr. Member
  • ****
  • Posts: 247
    • View Profile
    • BitShares DEX
Quick Background: I have been on the crypto arena since 2013. A big fan of Peercoin and POS. I think we all have been waiting for a true decentralized exchange since creation of bitcoin technology. There is no doubt that PoW was a break through thinking in the early crypto stages I do not belive that is sustainable because of it's huge burden on the world's power grid (I believe currently equal to about 1/3 electricity consumption of Ireland).  Recently I have decided to shift my focus to bitshares and since I like to support the crypto economy I would like to get involved with making the current infrastructure more stable.

Hopefully this short guide will enable more people to support the witness nodes.

COST: You have to be a lifetime member to run a witness node current cost: 17,612 BTS for a lifetime membership. And a cost to create a witness: 7,338 BTS, since you had to upgrade your node to a lifetime membership 5,870 BTS will be returned to you after 90 days and your final cost will be 1,468 BTS. You can check current fees at: https://www.cryptofresh.com/fees

HW Recommendation: There is no official recommendation. But what I found out is that ATM you should be OK with 8GB 16GB RAM and a reasonable CPU and with a current blockchain of about 7GB enough disk space to support it.

My Build: Ubuntu 16.04,  8 Cores at 3.6GHz, 16GB RAM and 1TB HDD

You will need a registered account in the network to get started.

Setup Steps:
-Some basic steps to get your server secured before you install the node can be found here:
https://bitsharestalk.org/index.php/topic,24005.0.html

Open terminal window and navigate to the directory where you want bitshares to download to as an example:
Code: [Select]
$ cd /home/sahkan
Download your sources with git:
$ git clone https://github.com/bitshares/bitshares-2

[10 APR 2017 Edit - On my production server I have changed this to reflect the latest bitshers github repo:]
Code: [Select]
$ git clone https://github.com/bitshares/bitshares-core
your sources are now downloaded to /bitshares-2 ; Since the repository makes use of so called submodules which are repositories on their own, you need to refresh those:
$ cd bitshares-2
$ git submodule update --init --recursive


[10 APR 2017 Edit:]
Code: [Select]
$ cd bitshares-core
$ git submodule update --init --recursive

Install dependencies for your development toolbox:
$ sudo apt-get install gcc-4.9 g++-4.9 cmake make \
                     libbz2-dev libdb++-dev libdb-dev \
                     libssl-dev openssl libreadline-dev \
                     autoconf libtool git


[10 APR 2017 Edit: I tested the install with the latest gcc (5.X) and it worked fine, so I adjusted the install of dependencies to reflect it:
Code: [Select]
$ sudo apt-get install gcc g++ cmake make \
                     libbz2-dev libdb++-dev libdb-dev \
                     libssl-dev openssl libreadline-dev \
                     autoconf libtool git

Now you can run cmake for configuration and compile with make: (Quick note here: I did not have to update boost, if you do, refer to bitshares docs)
Code: [Select]
$ cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Release
$ make

Now you can test your install, run a full node to update the blockchain: (took me about 1.5 hrs or so...)
$./programs/witness_node/witness_node --rpc-endpoint="0.0.0.0:8090"

Once your blockchain catches up CTRL-C to stop your node and you can move on to create a witness.

[10 APR 2017 Edit: On the production server I skipped this per @rnglab 's below comments, the difference was the synch time to the blockchain - 12Hrs+]

Run your Full node without block production:
Code: [Select]
$ programs/witness_node/witness_node --rpc-endpoint 127.0.0.1:8090
Now open a second terminal/SSH and and navigate to your bitshares directory:
Code: [Select]
$ cd bitshares-core
Run CLI wallet:
Code: [Select]
$ programs/cli_wallet/cli_wallet -s ws://127.0.0.1:8090
Your prompt will change to ">>>" indicating you are in CLI
Create password for your new CLI wallet:
>>> set_password <password>
null
Example:
Code: [Select]
>>> set_password G5rrzhZ6FCLI Responds:
null

Now unlock the wallet:
Code: [Select]
>>> unlock G5rrzhZ6F
You can import the account name (owner and active keys) to be able to access your funds in BitShares 2.0:
>>> import_key <accountname> <owner wif key>

(You can find your public and private keys in your light wallet under SETTINGS, ACCOUNTS, Click on the LOCK)
Example:
Code: [Select]
>>> import_key sahkan GPH7vQ7GmRSJfDHxKdBmWMeDMFENpmHWKn99J457BNApiX1T5TNM8
Now check your balances in CLI:
>>> list_account_balances <accountname>

Eample:
Code: [Select]
>>> list_account_balances sahkan
If all done correctly It will list all your balances.
To become a witness and be able to produce blocks, you first need to create a witness object that can be voted in,
THE BELOW COMMAND WILL CHARGE YOUR ACCOUNT CURRENT WITNESS CREATION FEE:
>>> create_witness <accountname> "url-to-proposal" true

Example:
Code: [Select]
>>> create_witness sahkan "www. MyCoolBitshares .com" true
Now you need some votes for your new witness, so vote all your shares in:
>>> vote_for_witness <accountname> <accountname> true true

Example:
Code: [Select]
>>> vote_for_witness sahkan sahkan true true
You need to wait until the next maintenance interval until you can see your votes. Check the time left to the next maintenance  here: https://www.cryptofresh.com/

Once all the votes are tallied you can move on, check your witness id:
>>> get_witness <accountname>

Example:
Code: [Select]
>>> get_witness sahkan
CLI responds with:
{
  [...]
  "id": "1.6.10",
  "signing_key": "GPH7vQ7GmRSJfDHxKdBmWMeDMFENpmHWKn99J457BNApiX1T5TNM8",
  [...]
}

Warning: dump_private_keys will display your keys unencrypted on the terminal, don’t do this with someone looking over your shoulder.
The id and the signing_key are the two important parameters, above. Let’s get the private key for that signing key with:
Code: [Select]
>>> dump_private_keys
CLI responds with:
[[
  ...
  ],[
"GPH7vQ7GmRSJfDHxKdBmWMeDMFENpmHWKn99J457BNApiX1T5TNM8",
"5JGi7DM7J8fSTizZ4D9roNgd8dUc5pirUe9taxYCUUsnvQ4zCaQ"
  ]
]

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 and its keypair:
Code: [Select]
$ ./witness_node  \
       --rpc-endpoint=127.0.0.1:8090 \
       --witness-id '"1.6.10"' \
       --private-key '["GPH7vQ7GmRSJfDHxKdBmWMeDMFENpmHWKn99J457BNApiX1T5TNM8", "5JGi7DM7J8fSTizZ4D9roNgd8dUc5pirUe9taxYCUUsnvQ4zCaQ"]'

Note: Make sure to use YOUR public/private keys instead of the once given above!

If you monitor the output of the witness_node, and get voted in to become an active 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 #1500367 with timestamp 2017-03-05T20:46:30 at time 2017-03-05T20:46:30


If you are not an active witness, you will simply see your node receiving transactions and blocks. And look for confirmation that you are running a witness node at start up:
1448052ms th_a       witness.cpp:122               plugin_startup       ] witness plugin:  plugin_startup() begin
1448055ms th_a       witness.cpp:127               plugin_startup       ] Launching block production for 1 witnesses.
1448055ms th_a       witness.cpp:138               plugin_startup       ] witness plugin:  plugin_startup() end



Here are some notes on installing and running my witness:  sahkan-bitshares

1. My 16GB RAM runs at 95% utilization, in comparison CPUs at 5% and Network around .5% [10 APR 2017, this now my seed node, witness runs on a 24 core 64GB dedicated server]
2. I am one of 56 witness nodes, only 19 are block producing (Active) I would say that it is extremely  centralized ATM.
3. To vote yourself in as an active node as of today you need over 403mln votes, around $23MLN?
4. 11 Committee members control most of the votes and settings on the network, including voting in witness nodes.

My witness runs in NY (Dedicated server), See/backup/test node in Hawaii[10 APR 2017 Update], if it ever goes active I will update this post with the MPA Price Feeds guide [10 APR 2017 Update - After working on this for few days and learning Bitshares I think I can write couple more guides without actually being an active witness, the setup should work it will just not publish any feeds until the witness becomes active]. Any feedback on fine tuning my witness will be appreciated and I will be grateful for any votes for  witness sahkan-bitshares!
« Last Edit: April 15, 2017, 06:59:14 pm by sahkan »