Applications that interface directly with the Steem blockchain will need to connect to a steemd node. Developers may choose to use one of the public API nodes that are available, or run their own instance of a node.

Public Nodes

URL

Owner

api.steemit.com

@steemit

api.steemitdev.com

@steemit

api.steemitstage.com

@steemit

api.steem.house

@gtg

appbasetest.timcliff.com

@timcliff

gtg.steem.house:8090

@gtg

rpc.curiesteem.com

@curie

rpc.steemliberator.com

@netuoso

rpc.steemviz.com

@ausbitbank

steemd.minnowsupportproject.org

@followbtcnews

steemd.privex.io

@privex

Private Nodes

The simplest way to get started is by deploying a pre-built dockerized container.

Dockerized p2p Node

To run a p2p node (ca. 2GB of memory is required at the moment):

Dockerized Full Node

to run a node with all the data (e.g. for supporting a content website) that uses ca. 14GB of memory and growing:

Syncing blockchain

Normally syncing blockchain starts from very first, 0 genesis block. It might take long time to catch up with live network. Because it connectes to various p2p nodes in the Steem network and requests blocks from 0 to head block. It stores blocks in block log file and builds up the current state in the shared memory file. But there is a way to bootstrap syncing by using trusted block_log file. The block log is an external append only log of the blocks. It contains blocks that are only added to the log after they are irreversible because the log is append only.

Trusted block log file helps to download blocks faster. Steemit Inc, provides public block log file which can be downloaded from here and there is also option from community witness @gtg which can be downloaded from here.

Both block_log files updated periodically, as of May 2018 uncompressed block_log file size ~110 GB. Docker container on stable branch of Steem source code has option to use USE_PUBLIC_BLOCKLOG=1 to download latest block log and start Steem node with replay.

Block log should be place in blockchain directory below data_dir and node should be started with --replay-blockchain to ensure block log is valid and continue to sync from the point of snapshot. Replay uses the downloaded block log file to build up the shared memory file up to the highest block stored in that snapshot and then continues with sync up to the head block.

Replay helps to sync blockchain in much faster rate, but as blockchain grows in size replay might also take some time to verify blocks.

Above bash script drops block_log from the OS cache, leaving more memory free for backing the blockchain database. It might also help while running live, but measurement would be needed to determine this.

Few other tricks that might help:

For Linux users, virtual memory writes dirty pages of the shared file out to disk more often than is optimal which results in steemd being slowed down by redundant IO operations. These settings are recommended to optimize reindex time.

Another settings that can be changed in config.ini is flush - it is to specify a target number of blocks to process before flushing the chain database to disk. This is needed on Linux machines and a value of 100000 is recommended. It is not needed on OS X, but can be used if desired.

Steem blockchain software is written in C++ and in order to modify the source code you need some understanding of the C++ programming language. Each Steem node runs an instance of this software, so in order to test your changes, you will need to know how to install dependencies which can be found in the Steem repo. This also means that some knowledge of System administration is also required. There are multiple advantages of running a testnet, you can test your scripts or applications on a testnet without extra spam on the live network, which allows much more flexibility to try new things. Having access to a testnet also helps you to work on new features and possibly submit new or improved pull requests to official the Steem GitHub repository.

Steemit’s Testnet

Steemit maintains a live testnet to which you can connect. In the near future, we expect the chain id to update with every code change. To get the current chain id for any HF20+ Steem testnet you can use the database_api.get_version api call (curl example included for your convenience). Be sure to point it at an api node on the testnet for which you want information!

Features

The official Steemit, Inc. Testnet is a mirror of the mainnet. This is achieved by copying the existing accounts and transactions from the mainnet state, as the they happen. Accounts are copied from a snapshot of mainnet while the module used to copy transactions in real time is called gatling. The gatling module runs at the final step of each testnet deployment.

The combination of snapshot and gatling means that this testnet approaches a subset of the same activity that the mainnet experiences. Not everything can be mirrored. For example, if someone comments or votes on a post that hasn’t been mirrored to the testnet (because the post itself pre-dates the testnet deploy), those operations will also not be included.

At the time of this writing, the connection information for Steemit’s testnet is as follows:

Now let it sync, and you’ll have a shiny new testnet seed node to play with.

Custom Testnet

In order to create a custom, isolated, testnet separate from the Steemit’s we need to modify a few things mentioned in the previous section.

In the file named steem/libraries/protocol/include/steem/protocol/config.hpp, we can see the first few lines dedicated to the Testnet section. The line starts with #ifdef IS_TEST_NET.

Let’s say we want to create a custom testnet with an initial supply of 1,000,000 STEEM. We can change STEEM_INIT_SUPPLY 1,000,000 and by changing STEEM_CHAIN_ID_NAME "testnet", testnet to mytestnet we will automatically get a unique Chain ID for our testnet. The address prefix can be set to something like MTN and of course, we need to change the public and private keys to the genesis account. Note that the genesis account will receive the entire pre-mined supply of 1,000,000. That way, you can execute a setup script to fund any newly created accounts. Such a custom testnet will not have any additional hardware requirements to run.

A minimum of 8GB RAM should be sufficient to run a custom testnet. Currently, Steem only has Linux and Mac compiling guides to build. A testnet can either be hosted locally, on a rented AWS, or dedicated bare metal servers so one can start testing functionality, explore different APIs, and start developing.

One more crucial point to modify is to change the number of witnesses required to accept hardforks for a custom testnet, by default it is set to 17, we can change it to 1STEEM_HARDFORK_REQUIRED_WITNESSES 1 so that only one node instance would be sufficient and the network will be still functional and fast.

Another thing to note is that you can start a new chain with all previous hardforks already accepted, by changing the file named steem/blob/master/libraries/chain/database.cpp with the following function: