This tutorial assumes Ubuntu Server 18.04 LTS 2GB RAM and 200GB SSD/HDD.
This tutorial assumes Ubuntu Server 18.04 LTS 16GB RAM and 300GB SSD/HDD.
Running a testnet can be done on minimal hardware, but in order to build a snapshot of accounts, you should already be running your own local Steem node because getting the snapshot is time consuming and if this process is interrupted, you'll have to start over.
Running a testnet can be done on minimal hardware, but in order to build a snapshot of accounts, you should already be running your own local Hive node because getting the snapshot is time consuming and if this process is interrupted, you'll have to start over.
Not only are we going to use `tinman` to build the snapshot, we also need to compile `steemd` and configure it to run our testnet.
Not only are we going to use `tinman` to build the snapshot, we also need to compile `hived` and configure it to run our testnet.
### Building `steemd`<a style="float: right" href="#sections"><i class="fas fa-chevron-up fa-sm" /></a>
### Building `hived`<a style="float: right" href="#sections"><i class="fas fa-chevron-up fa-sm" /></a>
Next, let's build `steemd`. Note, we are using the `develop` branch but you can use whatever branch you want. To see a list of branches that are currently being worked on, refer to: https://github.com/steemit/steem/branches/active
Next, let's build `hived`. Note, we are using the `develop` branch but you can use whatever branch you want. To see a list of branches that are currently being worked on, refer to: https://gitlab.syncad.com/hive/hive/-/branches/active
**A note on `steemd` branches:** Selecting a branch depends on why you're running a testnet. If you are doing blockchain development, you're likely going to select your own branch where you've done some work that needs to be verified. If you're a witness, you're likely going to select `develop` or `master` to check stability. If you're an application developer, you should probably select the `stable` branch because you want to test your app more than test the blockchain. Application developers might also select `develop` to try out blockchain features that have not been released yet.
**A note on `hived` branches:** Selecting a branch depends on why you're running a testnet. If you are doing blockchain development, you're likely going to select your own branch where you've done some work that needs to be verified. If you're a witness, you're likely going to select `develop` or `master` to check stability. If you're an application developer, you should probably select the `stable` branch because you want to test your app more than test the blockchain. Application developers might also select `develop` to try out blockchain features that have not been released yet.
In the above example, we assume that `http://mainnet-steem-node:8090` is our Steem node on our local network. If you use a public node to build the `snapshot.json` file instead (not recommended), just remember that this process could take quite a while and can be interrupted or rate-limited. You should consider running your own node.
In the above example, we assume that `http://mainnet-hive-node:8090` is our Hive node on our local network. If you use a public node to build the `snapshot.json` file instead (not recommended), just remember that this process could take quite a while and can be interrupted or rate-limited. You should consider running your own node.
As of September 2019, assuming the Steem mainnet node is local, this process takes approximately 15 minutes to produce a 3 GB output file.
As of August 2020, assuming the Hive mainnet node is local, this process takes approximately 20 minutes to produce a 3.6 GB output file.
We can optionally adjust `total_port_balance` to adjust the supply on the testnet. But keep in mind, there is a blockchain limit defined by `STEEM_INIT_SUPPLY`.
We can optionally adjust `total_port_balance` to adjust the supply on the testnet. But keep in mind, there is a blockchain limit defined by `HIVE_INIT_SUPPLY`.
At the startup banner, press `^C` (Ctrl+C) to exit `steemd`. As a side effect, a default data-dir is created. Now we can purge the empty blockchain and create `config.ini` as follows:
At the startup banner, press `^C` (Ctrl+C) to exit `hived`. As a side effect, a default data-dir is created. Now we can purge the empty blockchain and create `config.ini` as follows:
Note, the secret can be any string. In this tutorial, we are using `new-steem-rocks` as the secret. Keep in mind that any person with knowledge of the secret will be able to transact using any account on your testnet.
Note, the secret can be any string. In this tutorial, we are using `hive-is-alive` as the secret. Keep in mind that any person with knowledge of the secret will be able to transact using any account on your testnet.
At this point, our Seed Node will sync blocks from the Bootstrap Node.
...
...
@@ -332,9 +332,9 @@ Congratulations! Your testnet is running!
If you'd like your testnet to mirror mainnet transactions as they happen, you should run the gatling module. Make sure your Seed Node is fully sync'd before running gatling. Also make sure you use the same secret.