scrobble.life
#steem-pressure

Steem Pressure #7: Go Fork Yourself. Step by step guide to building and setting up a MIRA powered HF21-ready Steem consensus node.

The date of the next, 21st HardFork, has been set, and it is approaching quickly.

There's plenty of info around the web on how to build a Steem node from scratch. I also wrote a guide some time ago: Steem Pressure #3: Steem Node 101. But the trouble is that such tutorials are getting old and obsolete.

My previous one was made for version 19 at its early development stages. Now, we have version 21 released, so it is a good opportunity for an update.

https://www.youtube.com/watch?v=7IkI6yVvzHIVideo created for Steem Pressure series.

Hardware

Nothing fancy. Actually we will use something reasonably modest and cheap.

Meet the mirabelle: Intel Xeon CPU W3530 @2.80GHz 16GB DDR3 ECC 1333MHz RAM 2x 240GB SSD

Operating system

Ubuntu 18.04 LTS

Clean, basic server install. No fancy tweaks or customizations. /home is RAID0 because we need speed and space. In the case of a failure, we just use a new one.

Let's Go

Few steps needs to be done as root:

Make sure that your system is up to date:

apt update && apt upgrade

Use ntp or chrony to keep your system clock in sync:

apt install ntp

Create an account for steem purposes:

useradd -s /bin/bash -m steem

Set appropriate values for open files limits needed by MIRA:
cat << 'EOF' >> /etc/security/limits.conf
steem soft nofile 65535 
steem hard nofile 65535
EOF

limits-conf.gif

Install packages needed for building Steem:
apt install \
  automake \
  build-essential \
  cmake \
  doxygen \
  libbz2-dev \
  libboost-date-time-dev \
  libboost-chrono-dev \
  libboost-context-dev \
  libboost-coroutine-dev \
  libboost-filesystem-dev \
  libboost-iostreams-dev \
  libboost-locale-dev \
  libboost-program-options-dev \
  libboost-serialization-dev \
  libboost-system-dev \
  libboost-test-dev \
  libboost-thread-dev \
  libreadline-dev \
  libsnappy-dev \
  libssl-dev \
  libtool \
  ncurses-dev
Now we continue as a user steem:

su - steem

Clone the steem repository:

git clone https://github.com/steemit/steem

Checkout the latest release:

cd steem git checkout v0.21.0

Create build directory:

mkdir ~/build

Configure steem build:

cd ~/build

cmake -DCMAKE_BUILD_TYPE=Release \
  -DLOW_MEMORY_NODE=ON \
  -DCLEAR_VOTES=ON \
  -DSKIP_BY_TX_ID=OFF \
  -DENABLE_MIRA=ON \
  -DSTEEM_STATIC_BUILD=ON \
  ../steem

git-checkout-cmake.gif

Build steemd:

make -j4 steemd

build-steemd.gif

Build cli_wallet:

make -j4 cli_wallet

Create local bin directory for convenience:

mkdir ~/bin

Copy steemd and cli_wallet binaries to local bin directory:

cp -v ~/build/programs/steemd/steemd ~/bin cp -v ~/build/programs/cli_wallet/cli_wallet ~/bin

Congratulations!

~/bin/steemd --version

Now you have required binaries. Time to configure and run your node.

Create proper directory tree:

mkdir -pv ~/.steemd/blockchain

Create minimalistic config file for consensus node:
cat << 'EOF' >> ~/.steemd/config.ini
plugin = witness
plugin = condenser_api network_broadcast_api block_api
webserver-http-endpoint = 127.0.0.1:8090
webserver-ws-endpoint = 127.0.0.1:8090
EOF

config-ini.gif

Yes, you really don't need more than that for a very basic node defaults are OK.

To speed up reaching the head block:

Download blocks from a trusted source:
wget https://gtg.steem.house/get/blockchain/block_log \
  -O ~/.steemd/blockchain/block_log

block_log.gif

Now run:

~/bin/steemd --replay and have fun!

This configuration is expected to reach the head block within 72 hours.

Footnotes:

  • You might want to run above inside screen.
  • Once it replays all the blocks from block_log, it will sync with Steem p2p network up to the head block and continue running.
  • Next time start steemd without --replay. You need to do that only if your changes will affect the state (such as adding or re-configuring plugins).
  • You might want to add account_by_key (for cli_wallet’s list_my_accounts feature) and account_history (to track your own account history) but in this guide I wanted to focus on a simplest case.
  • You need to wait for replay to complete before you can use API endpoint.

Previous episodes of Steem Pressure series

Introducing: Steem Pressure #1 Steem Pressure #2 - Toys for Boys and Girls Steem Pressure #3 - Steem Node 101 Steem Pressure: The Movie ;-) Steem Pressure #4 - Need for Speed Steem Pressure #5 - Run, Block, Run! Steem Pressure #6 - MIRA: YMMV, RTFM, TLDR: LGTM Stay tuned for next episodes of Steem Pressure :-)


If you believe I can be of value to Steem, please vote for me ([**gtg**](/@gtg)) as a witness on [Steemit's Witnesses List](https://steemitwallet.com/~witnesses) or set ([**gtg**](/@gtg)) as a proxy that will vote for witnesses for you. ***Your vote does matter!*** You can contact me directly on [steem.chat](https://steem.chat), as [Gandalf](https://steem.chat/direct/gandalf)
[Steem On](/)

Comments · 24

  • @isnochys(67)· 2551d

    Max open files on my node is 5mil. Still the mira replay crashes at 5%. Too many open files. 0.21.9 did run smoothly though:(

  • @solominer(82)· 2562d

    @gtg great to see guides coming out to set up MIRA. Loving the console animations.

    Posted using Partiko Android

  • @furion(71)· 2563d

    I would be interested to see benchmarks on the new AMD Epyc chips...

  • @gtg(76)· 2564d

    For the record: Replayed 35538728 blocks in 75h:51m:36s Then it had to catch up 98913 blocks that were generated in the meantime. That took another 31m:45s So in total it took 76h:23m:21s

    Also: steem@mirabelle:~/.steemd/blockchain$ du -csh *

    215G    block_log
    273M    block_log.index
    269M    rocksdb_account_authority_object
    14M     rocksdb_account_history_object
    14M     rocksdb_account_metadata_object
    406M    rocksdb_account_object
    32M     rocksdb_account_recovery_request_object
    27M     rocksdb_block_summary_object
    25M     rocksdb_change_recovery_account_request_object
    14M     rocksdb_comment_content_object
    20G     rocksdb_comment_object
    263M    rocksdb_comment_vote_object
    53M     rocksdb_convert_request_object
    18M     rocksdb_decline_voting_rights_request_object
    31M     rocksdb_dynamic_global_property_object
    21M     rocksdb_escrow_object
    24M     rocksdb_feed_history_object
    13M     rocksdb_hardfork_property_object
    75M     rocksdb_limit_order_object
    19M     rocksdb_liquidity_reward_balance_object
    17M     rocksdb_operation_object
    39M     rocksdb_owner_authority_history_object
    14M     rocksdb_pending_optional_action_object
    14M     rocksdb_pending_required_action_object
    27M     rocksdb_proposal_object
    17M     rocksdb_proposal_vote_object
    84M     rocksdb_rc_account_object
    14M     rocksdb_rc_pool_object
    11M     rocksdb_rc_resource_param_object
    24M     rocksdb_reward_fund_object
    70M     rocksdb_savings_withdraw_object
    24M     rocksdb_transaction_object
    47M     rocksdb_vesting_delegation_expiration_object
    85M     rocksdb_vesting_delegation_object
    35M     rocksdb_withdraw_vesting_route_object
    14M     rocksdb_witness_custom_op_object
    6.9G    rocksdb_witness_object
    24M     rocksdb_witness_schedule_object
    83M     rocksdb_witness_vote_object
    244G    total
    
  • @forykw(71)· 2564d

    I would use a hybrid RAID0 NVMe with RAID5/6 disks... but not recommended on Ubuntu... CentOS or RedHAT 100% ok! =) Tested. With snapshots backups daily and MANY recovery tests ...

  • @guiltyparties(74)· 2565d

    I've been re-forking myself for over a week now, hoping to finish it up one century soon.

  • @anthonyadavisii(73)· 2565d

    If I set up a node in this fashion, would I be able to execute RPC calls against it using Beem? I specifically believe I need the reward API from previous discussions.

    I would guess I would not be needing condenser in that case. My intent is to test the SFR bot at some point and explore a mechanism so reward flags different coming from downvote mana.

    Any thoughts / guidance would be appreciated.

    Posted using Partiko Android

  • @paulag(74)· 2565d

    Nice to see a new steem pressure post. I wonder how many new witnesses there will be and how many will stop over the next year.

    Posted using Partiko Android

  • @arcange(79)· 2565d

    Congratulations @gtg! Your post was mentioned in the Steem Hit Parade in the following category:

    • Pending payout - Ranked 3 with $ 80,84
  • @ajks(69)· 2565d

    Can I start one with dule core 8 gb ram and 500gb hard drive

    Posted using Partiko Android

  • @steem2100(42)· 2566d

    Looking forward for an updated Steem Node setup guide !!!!!!

  • @cryptogecko(61)· 2566d

    So if a full-fledged system is to be made from the instructions you have given here, how much time would it take for it to be made available to the public and what about the security of the chain?

  • @adedapo-glory(60)· 2566d

    Everybody is looking forward to the date and the kickstart of the 21 hardfork and I must say, majority people can't wait

  • @beerlover(65)· 2566d

    To view or trade BEER go to steem-engine.com.

    Hey @gtg, here is your BEER token. Enjoy it!

    Do you already know our BEER Crowdfunding

  • @donald.porter(67)· 2566d

    Perfect timing 👨🏾‍🚀👍🏽

    can get @reggaesteem node up asap

    🍻!BEER

    Posted using Partiko iOS

  • @apshamilton(73)· 2566d

    Thanks. I’ve been looking for an updated Steem Node setup guide. If I have a much more powerful machine with 128Gb RAM what can I add to make it a full node?

    Posted using Partiko iOS

  • @kharma.scribbles(58)· 2566d

    What the heck is the purpose for a witness proxy?

    Off-topic yes, but maybe an idea for you to do a witness episode?

    Anyways, this was an awesome and super easy step-by step! Thanks!

  • @distantsignal(66)· 2566d

    Thank you for this! I swear I’m gonna do this someday!

    Posted using Partiko iOS

  • @enjoykarma(60)· 2566d

    ..sounds like being possible also for me (one day..)..thx..up..follow you..

  • @schlafhacking(62)· 2566d

    Amazing howto, amazing title. Forking myself in the next days. ☕️😃

    Posted using Partiko iOS

  • @drakos(70)· 2566d

    1333MHz RAM 😲

  • @blockchainstudio(72)· 2566d

    Go fork yourself

    lol

  • @javiersebastian(63)· 2566d

    Thanks. I would love to set a node someday. Maybe today? ;)

  • @witnessnews(2)· 2566d

    This post has been resteemed by @witnessnews.

    Follow @witnessnews to keep up with active witness updates.