体验篇 - 部署IOTA私链
Posted 搬砖魁首
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了体验篇 - 部署IOTA私链相关的知识,希望对你有一定的参考价值。
IOTA-private-network
solution: cliri + private-iota-testnet
0. dependencies
- Make sure to have Maven and Java 8 installed on your computer.
- 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
以上是关于体验篇 - 部署IOTA私链的主要内容,如果未能解决你的问题,请参考以下文章