Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the process of building IOTA private chain?

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

IOTA private chain building process is how, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

Version description

Currently tried and successful versions:

V0.5.3 is perfectly compatible

V0.5.6.... Continuous iterative ING

Implement the process warehouse:

Official: https://github.com/iotaledger/hornet

Steps

Compile and add environment variables

Go build-o hornet & & mv hornet / use/bin/hornet

Modify the configuration file to enable watchdog mode

Node.enablePlugins add Coordinator

Snapshots mode changed to global

Configure Coordinator

Depth control, up to 24 depth, 16 seconds is enough to run for 45 days

MerkleTreeDepth depth parameter

IntervalSeconds outbound interval

The difficulty of mwm used in POW affects the parameters of attachToTangle

StateFilePath manages the current chain state. If the db does not match the status, it cannot start.

Basic parameter description

Generate watchdog seeds

Cat / dev/urandom | LC_ALL=C tr-dc 'AmurZ9' | fold-w 81 | head-n 1

Get a similar placeholder

KKSFLBYKDCAVQHDVNCXQLHJXZZJJWLXGY9RNUQSLFEEVYVMGXFMZLKJPNRUNKSBRPCFKFWEUXCVRBBCDB

The seed rule is a random 81-bit character of Amurz plus the number 9.

Generate Merkle tree

$YOURSEED is the seed generated in the previous step

$HORNETPATH is the project address

-u hornet is the executive user

# # creating users

Sudo-u hornet COO_SEED=$YOURSEED hornet-d $HORNETPATH tool merkle

# # receiving the following information is considered a success

The process of spanning tree depends on the configuration.

The root address that will output merkle tree from above needs to be manually configured to confing.json

Configure coordinator.address

Create creation data (allocation of initial coins)

For example, 9FJYQPJQZGXWLEUZJFFUBHIEOHRPTCPMBHOBCYPFPWN9YW9YTQ9GYKNGGYI9OYHCIENGUXTRTHVREBAX 270000000000

Address must be an 81-bit address, not a 90-bit address with check

The total amount of amount is determined by itself, but the total amount of verification in the official sdk is 2779530283277761.

Create a seed and get a valid address (the rules for the specific seed and address are detailed in another document)

Fill the address and the currency to be allocated into the snapshots.global.path in the file format of address;amount

Supervised person-guided operation

Sudo-u hornet COO_SEED= "$YOURSEED" hornet-- cooBootstrap

You must wait for the first block to be paused

After output like the above, you can exit and add the program to the daemon and so on as a startup

Running

So far, it is possible to use SDK to operate API normally.

Configure peer neighbor node

Configure peering.json

After configuration, restart the service.

After the ordinary node is set up, the synchronization can be completed by configuring the monitor checkpoint as a fixed neighbor node.

There is no difference between ordinary nodes.

You just have to check the exact same config.json as the watchdog and then remove the Coordinator plug-in.

A total of files that need to be copied are files in config.json and snapshots.global.path

Say some mistakes that may prompt

In terms of calculating the validity of the address, the creation file address of 0.5.3 can support 90-bit addresses, but not above 0.5.6.

This happens all the time, so let's take care of it by ourselves.

In fact, the configuration of state does not match that of db. Most of this happens because the node exits abnormally.

To fix this, just clear the db and state files and start

At this point, the previous data will be resynchronized from the neighbor node.

This happens only on nodes with inspectors.

Network aleady bootstrapped

Try to keep at least one inspector healthy, or data recovery will be a problem. I am also continuing to study the official data preservation scheme.

Authority problem

There is a big algorithm change between V0.5.3 and V0.5.6

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report