This is part 4 of EOS quick-start. Please makesure you have completed [ Part 2 ] Install from sources and have all requirements installed.
Also refer to [ Part 1 ] Introduction for basic information on EOS.IO
Run EOS.IO Local Testnet
after the build successfully finished, you need to run
nodeos --config-dir ./config --data-dir ./data
this will generate data
and config
folder with default config.ini
file in you working folder, then stop it with Ctrl + C
.
add a default testnet block producer to your config
producer-name = eosio
Now, we need yo enable production on a stale chain, since a single-node test chain is pretty much always stale. To do that find in your config file line that reads enable-stale-production = false
and change it to true
enable-stale-production = true
add the following plugins:
# Load the block producer plugin, so you can produce blocks
plugin = eosio::producer_plugin
# Wallet plugin
plugin = eosio::wallet_api_plugin
# As well as API and HTTP plugins
plugin = eosio::chain_api_plugin
plugin = eosio::http_plugin
# This will be used by the validation step below, to view account history
plugin = eosio::history_api_plugin
and now, our single-node testnet is up and running.
Next, we will need a wallet. We will define a name tesnet_wallet for it, in order to separate it from any other wallets that we might have initialized already:
cleos wallet create -n tesnet_wallet
Now, let’s import the private key of the eosio
testing account, in order to run API commands under it.
cleos wallet import -n tesnet_wallet 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
We will use this accontin next parts of EOS Quick-Start series to create users and testers accounts that will deploy and execute contracts/dapps functionality.
This concludes [Part 4] Running Local Testnet of EOS Quick-Start series
more from this series:
To be continued…
Disclaimer:
This article is not a financial advice and not an endorsement to use EOS or invest in EOS platform.