How to update your Steem-in-a-box witness or seed to AppBase (0.19.12)

in witness-category •  27 days ago

As some people may know already from the witness chats, I released a new version of Steem-in-a-box for Appbase/Chainbase.

Appbase is a major overhaul of the steemd software, it brings many breaking changes, such as the removal of plugin numbering (thus apps that still use @xeroc's piston will break if connecting to an appbase server).

For most witnesses, these breaking changes will not affect the software itself. Over the past few appbase releases, bugs have been ironed out, and I've now upgraded to v0.19.12 myself after holding out for a while (when I first tested 0.19.10 I found several bugs immediately).

Why upgrade to Appbase?

Appbase brings many new features (soft fork, so it's not mandatory), such as the ability to change posts older than 30 days, memory and performance improvements, and an overhauled config format. It also includes a change to shared memory (shm), where it will automatically resize the shared memory file as needed.

I will still be maintaining non-appbase versions until they're no longer supported (probably in 1 month when HF20 hits).

Until then, you'll need to follow some slightly different instructions than the standard upgrade procedure, as steem-docker has appbase on a separate branch.

Upgrading from non-appbase

Please be warned. Upgrading from non-appbase (anything lower than 0.19.10) to appbase will require a replay. It's strongly recommended to do this on your backup server first, or change to your backup server during the upgrade.

Server Version Check

First, you'll want to check your server's version.

This is as simple as:

docker logs seed | grep "blockchain version"

You should see something like:

blockchain version: 0.19.6

If your version is lower than 0.19.10, then you're not on appbase, and will have to re-make your config.

Upgrade procedure

Again, upgrading from non-appbase to appbase will require a replay. Do this on your backup server, or disable your witness during the upgrade!

First, checkout the appbase branch. To avoid upgrading unsuspecting users to appbase, it's on a separate git branch, meaning you have to activate this branch first.

~/steem-docker $ git fetch
~/steem-docker $ git checkout appbase

Move your old config out of the way. Appbase has a new config format, Steem-in-a-box will create a new example config for you.

mv data/witness_node_data_dir/config.ini data/witness_node_data_dir/config.ini.bak-aug2018

Download the appbase docker image using this command. Assuming you've renamed your config file, this will also generate a new example config for you into config.ini.

./run.sh install

Fixing your config

Now, you'll want to put your witness name and key back into the new config.

This command will quickly obtain your witness name and private key for copy pasting:

cat data/witness_node_data_dir/config.ini.bak-aug2018 | grep -E "^witness|private-key"

You'll see something like this:

~/steem-docker $ cat data/witness_node_data_dir/config.ini.bak-aug2018 | grep -E "^witness|private-key"
witness = "someguy123"
private-key = 5xxxxxxxxxxxxxxxxx

Open your new config:

nano data/witness_node_data_dir/config.ini

Comment out p2p-endpoint (put a # at the start of it) if this is for a witness. You don't want your witness node running a seed.

# p2p-endpoint = 0.0.0.0:2001

Place your witness name and private key somewhere in the middle of the file (near the "name of witness controlled" comment makes it easy to find), like this:

# Percent of witnesses (0-99) that must be participating in order to produce blocks
required-participation = 33

# name of witness controlled by this node (e.g. initwitness )
# witness =
witness = "someguy123"
private-key = 5xxxxxxxxxxxxxxxxx

For the shared memory settings at the top, I strongly recommend leaving it at 60G, as it will automatically expand (new appbase feature) when it needs to.

A server with 64gb RAM is still the recommended size for witnesses, however this may change over the next few weeks as the chain grows.

Now for the slow part - replaying

When upgrading from non-appbase to appbase, you'll need to replay.

To replay your witness, do the following (this will shutdown and remove the pre-appbase software, and start an appbase one in replay mode)

./run.sh stop
./run.sh replay

You can check the status of the replay with the logs command

./run.sh logs

Note: the command now automatically updates in realtime. to exit the logs press CTRL-C

If all is well, you'll see it replaying on v0.19.12 (or whatever appbase version is out by the time you read this):

blockchain version: 0.19.12
------------------------------------------------------
1075751ms main.cpp:121                  main                 ] Backtrace on segfault is enabled.
1075751ms chain_plugin.cpp:394          plugin_startup       ] Starting chain with shared_file_size: 64424509440 bytes
1075751ms chain_plugin.cpp:472          plugin_startup       ] Replaying blockchain on user request.
1075751ms database.cpp:173              reindex              ] Reindexing Blockchain
1078354ms block_log.cpp:142             open                 ] Log is nonempty
1078355ms block_log.cpp:151             open                 ] Index is nonempty
1078355ms database.cpp:181              reindex              ] Replaying blocks...
   0.395276%   100000 of 25298786   (61434M free)
   0.790552%   200000 of 25298786   (61434M free)
   1.18583%   300000 of 25298786   (61433M free)
   1.5811%   400000 of 25298786   (61432M free)

Once it's replayed (may take 3 or more hours), you'll see the standard "got x transactions on block y".

1668107ms p2p_plugin.cpp:210            handle_block         ] Got 54 transactions on block 25299003 by cervantes -- latency: 107 ms
1671090ms p2p_plugin.cpp:210            handle_block         ] Got 36 transactions on block 25299004 by blocktrades -- latency: 90 ms
1674098ms p2p_plugin.cpp:210            handle_block         ] Got 28 transactions on block 25299005 by roelandp -- latency: 98 ms

If you see this, you can now re-enable this server :)

You're successfully upgraded to 0.19.12 (or higher).

For future appbase releases, it will now be as simple as ./run.sh install && ./run.sh restart, but as always, be careful, always assume a replay may be needed. Test on your backup, or disable your witness before attempting to update.

To see if I've released a new version of the docker image and haven't made a post yet, just check my docker hub: https://hub.docker.com/r/someguy123/steem/tags/


GIF Avatar by @stellabelle


Do you like what I'm doing for STEEM/Steemit?

Vote for me to be a witness - every vote counts.

Don't forget to follow me for more like this.


Have you ever thought about being a witness yourself? Join the witness channel. We're happy to guide you! Join in shaping the STEEM economy.

Are you looking for a new server provider? My company @privex offers highly-reliable and affordable dedicated and virtual servers for STEEM, LTC, and BTC! Check out our website at https://www.privex.io


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:  

Just replayed. Thanks legend

Thank you! I'm currently replaying and updating to AppBase.

As always this is just great. Thank you very much.
Just a remark, in previous update of the blockchain we had to add these 3 lines in the config file:
seed-node = seed-east.steemit.com:2001
seed-node = seed-central.steemit.com:2001
seed-node = seed-west.steemit.com:2001

There are not present in this new version of the config file.
It is a missed up or it is just no important?

I have added them just to be sure.
@exnihilo.witness

·

It's not needed any more. That was during a network failure, and steemit had the first reliable seeds up.

AFAIK they're actually used by default, regardless of your config choices. They're hard coded into the STEEM software as default seeds, which include various reliable seeds including @privex's.

Be aware you'll want p2p-seed-node not seed-node due to config changes.

·
·

I have deleted the 3 lines from my config file and have also added p2p-seed-node and then I have restarted.
@enihilo.witness is officially in v0.19.12
Thank you very much, see you for the HF20...

I can't start my witness back up after all these instructions.

I get this error in the wallet:

Assert Exception:_network_broadcast_api: network_broadcast_api_plugin not enabled.

·

Got it working.

changed: enable-plugin = witness

to: plugin = network_broadcast_api database_api condenser_api witness

·
·

Thanks for this. v Just ran my replay.

plugin = network_broadcast_api database_api condenser_api witness

I vote you for witness ! O.ob

Thanks and congratulations for sharing this publication. Great, follow me and I'll follow you friend

To listen to the audio version of this article click on the play image.

Brought to you by @tts. If you find it useful please consider upvoting this reply.

Thanks...

You got a 25.77% upvote from @upmewhale courtesy of @someguy123!

Earn 100% earning payout by delegating SP to @upmewhale. Visit http://www.upmewhale.com for details!

You got a 23.95% upvote from @postpromoter courtesy of @someguy123!

Want to promote your posts too? Check out the Steem Bot Tracker website for more info. If you would like to support the development of @postpromoter and the bot tracker please vote for @yabapmatt for witness!

You have recieved a free upvote from minnowpond, Send 0.1 -> 10 SBD with your post url as the memo to recieve an upvote from up to 100 accounts!


BluePages_PromoBanner.jpg

Hi @someguy123, your SteemValue site has been listed in the new @steembluepages directory of useful things! Check out our listings if you have a moment. Keep up the great work!

Woow great man i m searching this from one week thanks mate !!

Posted using Partiko Android

Your account creation tool has been featured here on this post.
I've outlined the cost to create Steemit accounts and compared it to other providers.
https://steemit.com/steem/@steemitbuzz/where-to-buy-steemit-com-account-and-the-costs-updated-august-31st-2018-cheapest-is-3-steem

I will definitively use this for the @utopian-io servers.

Can we talk about @privex? Contact me please.

Hello, I want to install a witness node. According to your guide, I'm using Ubuntu 16.x LTS.
Does not the HF20 need to upload the Ubuntu version?