I.T. Spices The LINUX Way

Words
535
Reading
3 min
Listen
Play
9y

A BASIC STEEMD NODE FOR LOCAL DEVELOPMENT: MY EXPERIENCES - Post #37

One of the most famous and delicious of Filipino foods, the PANSIT.........

THE BLOCK_LOG BLOCKCHAIN FILE IS GETTING BIGGER FOR THIS

I spent the whole day today trying to configure a steemd node for the sole purpose of studying its blockchain protocols. As per this howto of jesta@jesta published last year, I can imagine that it is a very easy breeze to “./steemd --replay” at just 8 Gb of memory. Below is his howto link:

https://steemit.com/steem/@jesta/building-a-high-availability-steemd-node-for-web-apis

My experience in today’s configurations up to the point of the command “./steemd --replay” tells of another experience, and this is what I will share briefly in this post so that others can just go directly to the working config.

A DEV JUST NEEDS A PLAIN AND SIMPLE STEEMD INSTANCE

A developer, unlike the witnesses, needs just a simple steemd instance that he/she can play with locally. This means that one does not need to go to public RPC nodes for some queries regarding the blockchain. Others will tell you here that you just connect to any public RPCs which is also an easier approach, however, and for some developers who needs local steemd instance/s, then my direct experiences today is what you need as a starting point. A local RPC node is one that I prefer for local development as this will give me the liberty to do whatever I like as far as querying it is concerned.

All went well until the point where I need to start the steemd instance in a desktop computer with about 8Gb of memory. Here is my config.ini in its simplest entries:

*rpc-endpoint = 127.0.0.1:5090
*seed-node=”GTG’s node IP and port here”
*enable-plugin = account_history follow market_history private_message tags
*public-api = database_api login_api market_history_api tags_api follow_api

I changed my shared-files settings from 2G to 6G and the steemd service still can not move past the 40 percent task as completed. As I examined the already downloaded block_log blockchain file, I found out that it is already at 20 plus Gb filesize, no way for a desktop with 4Gb memory to have accommodated this filesize in the startup command “./steemd --replay”.

Here is the very simple solution if one just wants a simple and local RPC node for development purposes:

  1. Increase the shared-files setting at the config.ini file to 32 Gb.

  2. Make a new folder on the disk, mine is at the /mnt/shm (not the /dev/shm as per lots of howtos here!!!). The root disk of the /mnt/shm folder as mounted is about 450 Gb.

  3. Start the steemd service with this command: “./steemd --shared-files-folder /mnt/shm --replay”

What happens in the above steps is that I have to place the shared-files into the disk (450Gb), and not the memory (only 6Gb usable). This slows the “sync” of the blockchain to its latest state, but it sure will finish the sync so that any dev can start doing his/her very important tasks.

Be very aware that this is just for DEV purposes (slow queries) and not for production witness node purposes.

Fun time start guys!!!

“A Car To Cross States, A Spaceship To Cross Planets, A Pure Heart To Cross Into Heaven……...”

I.T. Spices The LINUX Way | Ecency