体验篇 - 部署IOTA私链

IOTA-private-network

solution: cliri + private-iota-testnet

0. dependencies

  1. Make sure to have Maven and Java 8 installed on your computer.
  2. Prepare the run path. for example: mkdir ~/cliri_testnet

1. cliri (java)

No need for a coordinator, you can use js to connect and send the transaction successfully.

git clone https://github.com/iotaledger/cliri
cd cliri
mvn clean compile
mvn package

cp ./target/cliri-0.2.1.jar  ~/cliri_testnet/

2. private-iota-testnet (java)

Generating Snapshot for Creation

git clone https://github.com/schierlm/private-iota-testnet
cd private-iota-testnet
mvn package
//Build your own snapshot
java -jar target/iota-testnet-tools-0.1-SNAPSHOT-jar-with-dependencies.jar SnapshotBuilder
// Will generate Snapshot.txt, Snapshot.log

cp Snapshot.txt  ~/cliri_testnet/

3. config

cd ~/cliri_testnet
vim iota.ini
# input
[IRI]
PORT = 14265
TCP_RECEIVER_PORT = 15600
IXI_DIR = ixi
DEBUG = false
DB_PATH = db
# input end

4. run

nohup java -jar cliri-0.2.1.jar  --testnet true --testnet-no-coo-validation true  --snapshot=Snapshot.txt  --api-host 0.0.0.0 --config iota.ini &

Test the private chain through js script

Make sure to have Node.js 10 and npm(Included in Node.js) installed on your computer.

cd client_js
# First time you need to run
npm install

# getNodeInfo
node index.js

# Create transactions
node transactions.js

往期精彩回顾:
区块链知识系列
密码学系列
零知识证明系列
共识系列
公链调研系列
比特币系列
以太坊系列
EOS系列
Filecoin系列
联盟链系列
Fabric系列
智能合约系列
Token系列

猜你喜欢

转载自blog.csdn.net/wcc19840827/article/details/120133100