TERA
$0.00268 -2.16%
高TPS公链,3秒出块,10秒确认,支持智能合约。主网上线时间2018年7月1日
TERA分片测试文档
a62242123

基于POW共识机制下的TERA区块链,正在如火如荼的进行全球首个分片测试网,呼叫全球玩家,即时参与!


以下为TERA分片测试文档:

Create shard in TERA

ENG1

RUS1


ENG


Let's start with the location of the files in Tera. When you download Tera source codes, they are usually located in the wallet/Source directory on your computer. At the same time, data such as the blockchain database, constants, and other settings are created and stored in the wallet/DATA directory. The General view of folders is as follows:

DATA

Source


This is how data and codes are separated.


But in Tera sharding is not just a division of the blockchain into fragments, but it is an independent (sovereign) blockchain with its own laws. In the world of blockchain, it is accepted that the code is the law, so you need a place to put the code, but so that it is not overwritten when updating.


Therefore, in Tera, unique shard settings, including changed codes, are placed in a file

DATA/shard.js


So if there is a file in the DATA directory shard.js, then with the standard launch command: node run-node.js actually starts the shard.


Here is an example of the settings file for creating your own shard http://212.80.217.191/shard.js You can use them as a basis when creating your own shard.


To launch other nodes of your shard, you need to place this file in the DATA folder on these nodes. You can do this by copying files manually or by specifying the address with the shard already running in the from parameter, example:

node set from:212.80.217.191



2020年11月18日 15:04图文分享