Introducing conductor, a simple Steem Witness Toolkit

in steem •  7 years ago  (edited)

conductor - Steem Witness Toolkit

conductor is a user friendly, KISS utility for creating, updating and management of your witness.

Install

Requirements:

  • Python 3.5 or higher
pip install -U git+https://github.com/Netherdrake/conductor

First Steps

conductor is built on top of steem-python, and leverages it's BIP38 encrypted wallet to store our witness Active key. This key is required for price feed updates.

To create the wallet, and add our key to it, simply run:

steempy addkey

Creating or importing your witness

conductor init

conductor will ask you for your witness (Steem account) name. If the witness already exists, it will import its current settings from the blockchain.

Otherwise, it will guide you trough the setup wizard, and create the witness for you.

Updating your witness

If you wish to change one or more of your witness properties, such as witness url, interest rate, block size, etc., you can do so using conductor update command.

~ % conductor update
What should be your witness URL? [https://steemdb.com/@furion/witness]:
How much should be account creation fee? [0.500 STEEM]:
What should be the maximum block size? [65536]:
What should be the SBD interest rate? [0]: 10

Configuration:
---------------
{'props': {'account_creation_fee': '0.500 STEEM',
           'maximum_block_size': 65536,
           'sbd_interest_rate': 10},
 'witness': {'name': 'furion', 'url': 'https://steemdb.com/@furion/witness'}}

Do you want to commit the updated values? [y/N]: n
Aborted!
~ %

Enabling your witness

Enabling your witness is as simple as setting a public signing key. This command can also be used for key rotation (for example, if you're falling back to a backup witness node).

To set a public signing key on your witness run:

conductor enable <PUBLIC_SIGNING_KEY>

Disabling a witness

Sometimes you might want to disable your witness yourself. For example, if you're upgrading your witness server, and don't want to miss any blocks.

To disable your witness run:

conductor disable

Kill Switch

Kill Switch is a witness monitoring utility, that tracks block misses. If your witness server bugs out, and stops producing blocks, this tool will automatically disable your witness to avoid further misses.

To run a killswitch, simply run:

conductor kill-switch

Optionally, we can provide number of blocks number of blocks we are allowed to miss before kill-switch disables our witness. We can achieve this by providing -n argument, like so: conductor kill-switch -n 25. By default -n is 10.

Price Feeds

Price feeds are a vital component of STEEM ecosystem, as they power SBD->STEEM conversions, as well as rewards estimates. Witnesses act as an oracle between the blockchain and real-world, by providing honest input on what the implied price of STEEM is. Furthermore, the prices may contain bias to loosely support the SBD stablecoin's peg to USD.

conductor ships with markets module from SteemData. This module interfaces with 3rd party exchanges to fetch VWAP (volume weighted average prices) mean (average of VWAP's from all exchanges) prices.

Exchanges Used:

  • Bitstamp, Bitfinex, Kraken, OKCoin, BTC-E for BTC/USD
  • Poloniex, Bittrex for STEEM/BTC and SBD/BTC

To run pricefeeds, simply run:

conductor feed

Usage

~ % conductor
Usage: conductor [OPTIONS] COMMAND [ARGS]...

  Steem Witness Toolkit.

Options:
  -h, --help  Show this message and exit.

Commands:
  disable      Disable a witness.
  enable       Enable a witness, or change key.
  feed         Update Price Feeds.
  init         Add your witness account.
  kill-switch  Monitor for misses w/ disable.
  status       Print basic witness info.
  tickers      Print Tickers.
  update       Update witness properties.

There are two additional, read only commands we haven't covered yet. status and tickers. They simply print some info for us.

Status

~ % conductor status
+---------+--------+-------------------------------------------------------+
| Enabled | Misses | Key                                                   |
+---------+--------+-------------------------------------------------------+
| True    | 105    | STM7WDG2QpThdkRa3G2PYXM7gH9UksoGm4xqoFBrNet6GH7ToNUYx |
+---------+--------+-------------------------------------------------------+

Tickers

~ % conductor tickers
| Symbol    |   Price |
|-----------+---------|
| BTC/USD   | 2444.31 |
| SBD/USD   |   1.804 |
| STEEM/USD |    1.19 |

License

MIT.

Pull requests are welcome.

Source: https://github.com/Netherdrake/conductor

DQmeBtkDw9J3evsQdzL4MNFepWxkdn55QUpvxz5dCGkzgWY_1680x8400.png

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Impressive! Congrats! Seems like your last witness interruption led to something really good.

Yeah, I really had to invest some time into better infrastructure.

This is amazing. I've held off on running my own witness because I'm more of a programer than an OPS guy, but this is really tempting me to try it out.

Can you recommend a solid host for your witness? Roughly how much do you spend on hosting/bandwidth costs each month to keep your Witness up?

Thanks again for this fantastic resource. When it's this easy to get going, I think we'll always have plenty of witnesses in the Steemit ecosystem.

vultr.com Vitrual Private Server (vps). $40/mth for an 8gig ram system. I think that might work. Still figuring it out myself.

I use hetzner.de, I'm pretty happy with them.

Thanks for replying.

My company @privex offers a small 8GB VPS, perfect for witnesses, for just $30/mo - unlike other hosts, we guarantee you won't miss any blocks (assuming your witness is configured correctly, which we can help you with).

If you miss a block on our network, we'll refund you $2 for each block.

We also take STEEM, LTC, and BTC, unlike most big hosts :)

PM me on STEEMIT.CHAT if you're interested

Thanks, I may give that a shot! I like the idea of supporting a fellow Steemian and paying in STEEM currency.

I highly recommend contabo.com

Note that @furion did not mention: do not run these scripts on a machine you don't have physical control of, setting price feeds requires your active key.

i'm trying on contabo to install a witness node, without success. i can non update_witness in the wallet.

appreciable comment. going to follow you too :)

Thank you!

you could try omkhost.com

I've been up and running for just under two months as @lukestokes.mhth using @privex and I'm quite happy so far with it.

Nice! I'm gonna try it out!

So, I'm trying to do this as a non-programmer. I've run into a couple of issues. I setup a ubuntu 16.04 server with 8g of ram. I tried running the command you mention. It tells me I need pip. So, I installed pip, then it said I need to upgrade pip, so I upgraded pip, then it said I need setup tools. So, I used sude apt-get install python3-setuptools. Then I reran your code and it tells me-
"Could not import setuptools which is required to install from a source distribution. Please install setuptools."

What am I missing?

I don't recommend using OS Python for end user applications.

2 alternatives:
1.) Run in Docker
2.) Use Anaconda.

Anaconda is probably the easiest if you don't know Docker.

I keep forgetting :(
I have a few more goodies coming out soon, hopefully I get #steemdev into muscle memory.

Kind of late... but trying to set this to use. Looks very useful.

  ·  7 years ago (edited)

Working! =) nice tool. Now I need to create a docker for it. I have noticed that if the spread is too high... it kind of hangs no?

EDIT: Fixing my comment above. It does not hang. I was using it against a node that did not have the right API. And to be fair it actually does the other way around, which is, it only updates if the spread starts to increase.

This is awesome work, again! Thanks a bunch for sharing with us all! All for one and one for all. Namaste :)

All witnesses would have to agree on that interest rate though? Good tool; paging @klye.

Good page! I've actually got a few scripts similar to this I use to do my price feeds and failover to backup. :)

  ·  7 years ago (edited)

You can set any interest rate you like. In the end, the average of all witnesses input is taken.

Congratulations @furion!
Your post was mentioned in my hit parade in the following categories:

  • Upvotes - Ranked 2 with 642 upvotes
  • Pending payout - Ranked 1 with $ 1752,81

Great work. For security, have you thought about a read only hard drive for the OS, Server, and data separate? Great work my friend @furion

nice :D I don't know what a witness is. Noob 101

We run the servers all over the world that produce the STEEM blockchain blocks which this site runs on top of. :)

Nice :D thanks for clarifying

meep

hahaha :D

meep

hahaha :D another meep

WHAT A N00B!

meep

Nice work
I'm barely 48hrs in steemit and i have voted my first witness
See the details here https://steemit.com/growth/@digital-entrep/what-s-next-after-the-introduceyourself-tag
Feel free to upvote and follow :)

Quite technical but educative. What is the benefit of this?

If you want to create a Steem witness, this is an easy way to do so.

Ok I wana do that now but I want to ask if there is any added benefit of creating it as a steemit user?

No. Unless its your specific intent to run* as a witness, there is no benefit to having one.

*Its sort of like running for president, if people vote for you, you might get to have a privilege of minting blocks.

Ok Let me vote for you but remember me when you become president. Lol

  ·  7 years ago (edited)

He is already one of the current 20 steem presidents :)

Not anymore.

Awesome. I'm always learning new things here.

I'm​ following you, please follow me and upvote me. An upvote from you may help​ me to turn competitive in steemit :)

amazing :) going to upvote follow resteem @furion

Impressive but my mind is locked in the dreams of #STEEMQ . Any updates will be highly appreciated. I am working on the contents everyday can wait to publish. Anyway the witness feature looks cool and it will look cooler to me once i find a few more uses. Thanks for everything. Cheers!!!!!

Good here I leave this link to see if I can help with this thanks and sorry for the inconvenience https://steemit.com/blocktrades/@fannyamor/question-to-see-if-you-can-help-me-thank-you

I have to be honest. I'm lost. :(

@furion I have no idea what are you writing about... Followed :D

this is awesome
you are the great man

Pretty Cool!!!! STEEM on..

Thank you for your work.
You are my witness from now.

great post!

superb!!! followed you!

I resteemed this...

I am only now starting to understand what witnesses are, nevermind what they do... But I am ambitious, who knows what will happen down the line.

nice post,pleas upvote my post thank you.....

Upvote and followed! Thank you for the clear explanation. Good luck with your own witness

I liked your post. I follow you, you follow me

Good job!

Have you thought of officially supporting bitshares as well ?

i like your post

Awesome

Doesn't work.

1.) You need Python 3.5 or higher
2.) I'm not sure if it works under Windows.

  ·  7 years ago (edited)


In Ubuntu, on Python 3.5. Errors start at "Failed building wheel for Scrypt".

sudo apt-get install libffi-dev libssl-dev, then retry.

That did it! You're the man @furion.

Now voting for @furion

Congratulations @furion! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Your post got the highest payout on one day

Click on any badge to view your own Board of Honnor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

If you want to support the SteemitBoard project, your upvote for this notification is welcome!

Great stuff. Thanks for the continued flow of info. With the fear in the markets its important to continue to increase our knowledge.

Cheers

If I want to rock this out on a VPS what are the minimum requirements?

I'd go with atleast 8GB of RAM (More is better).

A solid double or quad CPU should do the trick.. Also SSD is key for data storage.

How much memory will it require?

congratulations @furion great tool

👍

nice...resteem and upvote for your post....

Thank you for the Guide.
How i can install Python 3.5 or higher and make it running on Ubuntu. For make it possible to run.

pip install -U git+https://github.com/Netherdrake/conductor

Thank you for helping

with conductor docker bases on this guide, i have now i running witness

https://steemit.com/witness-category/@drakos/witness-tools-conductor-docker

thank you ;-)

So, are you furion or viper? I am confused

Both.

Damn. That must be annoying

Very informative post. Thank you for sharing your knowledge.

congratulations @furion great tool.

thank for your great information and post.

Anything that can simplify witnessing more convenient is very much welcome. I'll eventually try it.