体验篇 - 部署IOTA私链

科技 科技 1785 人阅读 | 0 人回复

<
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.
  1. git clone https://github.com/iotaledger/cliri
  2. cd cliri
  3. mvn clean compile
  4. mvn package
  5. cp ./target/cliri-0.2.1.jar  ~/cliri_testnet/
复造代码
2. private-iota-testnet (java)

  Generating Snapshot for Creation
  1. git clone https://github.com/schierlm/private-iota-testnet
  2. cd private-iota-testnet
  3. mvn package
  4. //Build your own snapshot
  5. java -jar target/iota-testnet-tools-0.1-SNAPSHOT-jar-with-dependencies.jar SnapshotBuilder
  6. // Will generate Snapshot.txt, Snapshot.log
  7. cp Snapshot.txt  ~/cliri_testnet/
复造代码
3. config

  1. cd ~/cliri_testnet
  2. vim iota.ini
  3. # input
  4. [IRI]
  5. PORT = 14265
  6. TCP_RECEIVER_PORT = 15600
  7. IXI_DIR = ixi
  8. DEBUG = false
  9. DB_PATH = db
  10. # input end
复造代码
4. run

  1. 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.
  1. cd client_js
  2. # First time you need to run
  3. npm install
  4. # getNodeInfo
  5. node index.js
  6. # Create transactions
  7. node transactions.js
复造代码

     往期超卓回忆:     区块链常识系列     暗码教系列     整常识证实系列     共鸣系列     公链调研系列     比特币系列     以太坊系列     EOS系列     Filecoin系列     联盟链系列     Fabric系列     智能开约系列     Token系列  
免责声明:假如进犯了您的权益,请联络站少,我们会实时删除侵权内乱容,感谢协作!
1、本网站属于个人的非赢利性网站,转载的文章遵循原作者的版权声明,如果原文没有版权声明,按照目前互联网开放的原则,我们将在不通知作者的情况下,转载文章;如果原文明确注明“禁止转载”,我们一定不会转载。如果我们转载的文章不符合作者的版权声明或者作者不想让我们转载您的文章的话,请您发送邮箱:Cdnjson@163.com提供相关证明,我们将积极配合您!
2、本网站转载文章仅为传播更多信息之目的,凡在本网站出现的信息,均仅供参考。本网站将尽力确保所提供信息的准确性及可靠性,但不保证信息的正确性和完整性,且不对因信息的不正确或遗漏导致的任何损失或损害承担责任。
3、任何透过本网站网页而链接及得到的资讯、产品及服务,本网站概不负责,亦不负任何法律责任。
4、本网站所刊发、转载的文章,其版权均归原作者所有,如其他媒体、网站或个人从本网下载使用,请在转载有关文章时务必尊重该文章的著作权,保留本网注明的“稿件来源”,并自负版权等法律责任。
回复 关闭延时

使用道具 举报

 
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则