Telos Technical How To #1
There is certainly much excitement around Telos in 2021, with the official launch of Telos Decide and Telos Wallet already behind us, and now Telos EVM just about to be put into production there are many reasons to get involved with the Telos Community and Ecosystem.
A great starting point is getting familiar with Telos Technology to be able to offer services or support your own Telos homed DApps.
Running EOSIO infrastructure to support the Telos Blockchain Platform can be a bit daunting when first starting out. This series of articles aims to demystify the infrastructure and operational requirements required to run Rock Solid services for the Telos Network.
Of course these articles are not just for Block Producers, they are also for Developers, Services Providers and DApps that may need a pointer on how to get started with the Telos Blockchain Platform.
Be sure to connect with other Telos technical community members by joining the Telos Testnet Telegram → Here
Find out more about Telos and it’s focus on real World Blockchain Adoption → Here
Lets do this! This First Edition will show you how to get started with building a Telos node on the Public Telos Testnet.
How to Set Up a Telos Testnet Node
The Telos Testnet has relatively low system requirements compared to the Mainnet, however it is fully functional with freely available Telos Tokens and therefore an ideal place to get familiar with the software and network itself.
An ideal place to “break stuff” as Michael from Team EOS USA would say.
There is an excellent Block Explorer provided by EOS Authority where you can see the Testnet Live in action:
EOS Authority Telos Testnet Explorer
Testnet Requirements
Hardware
- 4 Core CPU / 4Ghz+ recommended if you would like to produce blocks
- 128GB Disk / Preferably SSD or NVMe
- 4GB RAM
Operating System (Linux Based Only)
- Amazon Linux 2
- CentOS 7
- CentOS 7.x
- CentOS 8
- Ubuntu 16.04
- Ubuntu 18.04 (Recommended)
- Ubuntu 20.04 (Recommended)
- MacOS 10.14 (Mojave)
- MacOS 10.15 (Catalina)
Internet
- Modern Broadband / Fibre Connection (1Mb/s and above)
- Static Public IP Address (Either terminating on this node or forwarded with NAT)
Build the Software
The Telos Blockchain Platform uses freely available opensource EOSIO software provided by block.one
Currently the accepted Telos Block Producer software build and version is v2.1.0
The latest build tag is always available on the EOSIO GitHub repository
Building Process
There are two suggested ways to install the required EOSIO software on your server, either build from source using an eosio script or install from a precompiled .deb file.
The example below uses Ubuntu Linux to build the eosio software from source via script following the process below:
> cd ~
> git clone https://github.com/EOSIO/eos.git
> cd eos
> git checkout v2.1.0
> git submodule update --init --recursive
> cd scripts
> ./eosio_build.sh -P#Binaries are in ~/eos/build/programs#If you want to install
> ./eosio_install.sh
As the -P
option is used on the above build script this may take some time to compile as it will build with pinned clang and libcxx
The example below uses Ubuntu Linux to install the eosio software from a precompiled .deb file.
> wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-20.04_amd64.deb> sudo apt install ./eosio_2.1.0-1-ubuntu-20.04_amd64.deb#To uninstall
> sudo apt remove eosio
Configuration
Now that a clean build of the eosio software has been compiled lets get into configuring the Telos node for operation.
To configure and start the Telos node nodeos
will be used, nodeos
is the core service daemon that runs on every Telos Blockchain node.
nodeos
can be configured to process smart contracts, validate transactions, produce blocks containing valid transactions, and confirm blocks to record them on the blockchain. You can read more about it here.
The primary operational functions of nodeos
are; running it as a Block Producer, Network API Endpoint, P2P Seed Node or State-History Node. Typically on a busy network such as the Telos Mainnet you would separate these functions across physically discrete servers.
In this Telos Testnet example you will make your node connect to other network peers, offer a P2P Seed Node service and make the node available as a Network API Endpoint. This node won’t be providing historical data query support.
nodeos
requires two files to connect to peers and run on the Telos Testnet:
config.ini
Create a default config.ini
by running nodeos
without config as per the command below:
> mkdir ~/telosdata
> nodeos --data-dir ~/telosdata --config-dir ~/telosdata
You will then be able to edit the newly created config.ini
and see all the available parameters:
> cd ~/telosdata
> nano config.ini
Now edit the config.ini
and add the following configuration settings:
wasm-runtime = eos-vm-jitchain-state-db-size-mb = 16384
chain-state-db-guard-size-mb = 1024
enable-account-queries = truehttp-server-address = 0.0.0.0:8888
access-control-allow-origin = *
access-control-allow-headers = Origin, X-Requested-With, Content-Type, Accept
http-max-response-time-ms = 100
verbose-http-errors = true
http-validate-host = falsep2p-listen-endpoint = 0.0.0.0:9876# blindblocart: US, Denver
p2p-peer-address = testnet.blindblocart.io:9876
# caleosblocks: US, San Jose
p2p-peer-address = testnet.telos.caleos.io:9879
# edeniaedenia: CR, San Jose
p2p-peer-address = telos-testnet.eosio.cr:9879
# eosphereiobp: AU, Sydney
p2p-peer-address = peer1-telos-testnet.eosphere.io:9876
# katalyotelos: FI, Finland
p2p-peer-address = tlos-p2p-test.katalyo.com:29877
# telosarabia1: DE, Munich
p2p-peer-address = testnet2p2p.telosarabia.net:9876
# telosgermany: DE, Frankfurt
p2p-peer-address = telosgermany-testnet.genereos.io:9876
# telosmadrid1: DE, FN1
p2p-peer-address = seed-testnet.telosmadrid.io:9886
# telosuknodes: DE, Falkenstein
p2p-peer-address = testnet-p2p.telosuk.io:9877
# telosunlimit: CA, St. Louis
p2p-peer-address = p2p.testnet.telosunlimited.io:9876#A great list for active peers can be found here thanks to EOS Nation - https://validate.eosnation.io/telostest/reports/config.htmlagent-name = "<yourname> Telos Testnet"max-clients = 100
sync-fetch-span = 500plugin = eosio::http_plugin
plugin = eosio::history_api_plugin
plugin = eosio::history_plugin
plugin = eosio::chain_plugin
plugin = eosio::chain_api_plugin
genesis.json
These are the initial state parameters required by every new starting node on the Telos Testnet. Create the file as below:
cd ~/telosdata
nano genesis.json
Add the following parameters to the genesis.json
file for the Telos Public Testnet:
{
"initial_timestamp": "2019-08-07T12:00:00.000",
"initial_key": "EOS7xyPWfh6743fhZ46zQQcXSctddoqG65d44YsyRnCJCs54mJLrH",
"initial_configuration": {
"max_block_net_usage": 1048576,
"target_block_net_usage_pct": 1000,
"max_transaction_net_usage": 524288,
"base_per_transaction_net_usage": 12,
"net_usage_leeway": 500,
"context_free_discount_net_usage_num": 20,
"context_free_discount_net_usage_den": 100,
"max_block_cpu_usage": 5000000,
"target_block_cpu_usage_pct": 1000,
"max_transaction_cpu_usage": 150000,
"min_transaction_cpu_usage": 100,
"max_transaction_lifetime": 3600,
"deferred_trx_expiration_window": 600,
"max_transaction_delay": 3888000,
"max_inline_action_size": 4096,
"max_inline_action_depth": 4,
"max_authority_depth": 6
}
}
Running Nodeos
Now that the config.ini
has been configured and the initial Telos Testnet chain parameters genesis.json
have been created, you can now join the network and sync up the node.
Use GNU Screen to keep your session live even when you disconnect, usage below:
# Create a new screen session
> screen -US telos # Disconnect screen session
> ctrl-a+d # Reconnect screen session
> screen -r telos
Run nodeos
with pointers to the config, data directory and genesis file:
> nodeos --data-dir ~/telosdata --config-dir ~/telosdata --genesis-json ~/telosdata/genesis.json
Your Telos Testnet node will now start syncing with the configured peers until it catches up and is current with the Telos Testnet Blockchain Headblock.
The Next Edition of Telos Technical How To .. will look at the role of state database snapshots and how they can expedite syncing a node.
Be sure to ask any questions in the EOSphere Telegram