I've mentioned tintoy
in the past. It's a tool that lets you test various scenarios using a tiny blockchain. If you take all of the defaults, you can use it to test your API clients or applications as if you're using the mainnet.
But we can do more even more.
The purpose of this tutorial is to set up our tiny blockchain so you can test your local changes to steemd
. Our tiny blockchain runs as a testnet, so you need to build it before sending it over to tintoy
(the default Dockerfile
for steemd
happens to already do this). Once it's up and running, you'll have about 2,000 accounts and even get a trickle of transactions coming in, automatically.
No need to spin up a full sized testnet!
TL;DR: Dockerize your local steemd
development branch, then run it in tintoy
.
For this tutorial, I'll be using Docker Desktop, but the general steps should work with any docker
provisioning.

First, we get a copy of of the steemd
from the official repo and do the Docker build method:
mkdir -p ~/src
cd ~/src
git clone https://github.com/steemit/steem
cd steem
Note: If you have skipped git clone
because you want to rebuild a pre-existing branch you're already developing on, don't forget to delete build
from here because it will interfere with docker build
.
Optional: Next, we can modify a few things like edit libraries/protocol/include/steem/protocol/config.hpp
and set a STEEM_INIT_SUPPLY
.
Now we can work on the project and add features or fix bugs, whatever. Before we commit/push our changes and do a pull request, we can take our modified version of steemd
for a spin:
docker build --build-arg BUILD_STEP=2 -t steemit/steem:mybranch .
Don't forget to add a period (.
) to the end of the above command.
Note: For compiling, the default size of your Docker Engine might need some fiddling. If your build fails, check these defaults and set Memory
and/or Swap
to something higher. Setting them both to 4.0 GiB
is usually sufficient, for doing builds.

Once it's done building, we can get a copy of tintoy
.
cd ~/src
git clone https://gist.github.com/b88e7bfff8862858e54c59392e2bce20.git tintoy
cd tintoy
Modify Dockerfile
in tintoy
and change the first line so it matches the previous docker build
we used for steemd
(above), e.g.:
FROM steemit/steem:mybranch
Next, build and run tintoy
:
docker build -t myname/tintoy:mybranch .
docker run -d -P myname/tintoy:mybranch
Now you can shell in or get the ports and attach your favorite JSON-RPC explorer to see how well your changes perform.
Or, instead of running on ephemeral ports (-P
), you can bind to the API, e.g.:
docker run -d -p 8090:8090 myname/tintoy:mybranch
Either way, once tintoy
has finished starting up, you'll see in the logs:
[√] testnet: true
[√] head block time: within 3 seconds
[√] scheduled witnesses: 21
[√] majority version: 0.21.0
This means the node has fully bootstrapped and synced. You can now access your blockchain (the following assumes we ran with bound ports as -p 8090:8090
):
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_count", "params":[], "id":1}' http://localhost:8090
Which returns:
{
"jsonrpc": "2.0",
"result": 2037,
"id": 1
}
Our toy blockchain has successfully launched using a modified version of steemd
with 2037 accounts to play with.