Skip to content

triasteam/StreamNet

 
 

Repository files navigation

Build Status Codacy Badge Codacy Badge GitHub release license

StreamNet Logo

Trias StreamNet

The trias-lab/iri repository is the main StreamNet reference implementation, for the design details, please see yellow paper [StreamNet]. The original iri reference could be found at [iri].

-* License: GPLv3

1. Installing

The preferred option is that you compile yourself. The second option is that you utilize the provided jar, which is released whenever there is a new update here: Github Releases.

1.1 Running yourself

Make sure to have Maven and Java 8 installed on your computer.

1.1.1 How to run one streamnet service node

git clone https://github.com/triasteam/StreamNet.git
cd StreamNet/scripts/examples/one_node/
./conflux_dag.sh
cd  ../../front_end/server
./run_go.sh

1.1.2 How to run docker

Make sure to have docker-ce 18+ installed on your computer.

cd  StreamNet/scripts/examples
./run_docker.sh

1.1.3 How to Test

AddNode

curl -X POST \  
http://address:8000/AddNode \  
-H 'Content-Type: application/json' \  
-H 'cache-control: no-cache' \  
-d "{\"Attester\":\"<NODE1>\",\"Attestee\":\"<NODE2>\",\"Score\":<SCORE>}"

其中NODE1和NODE2为两个节点,Node1为Node2投了几分,SCORE为分数值
eg:curl -s -X POST http://127.0.0.1:8000/AddNode -H 'Content-Type:application/json' -H 'cache-control: no-cache' -d "{\"Attester\":\"192.168.130.1\",\"Attestee\":\"192.168.130.2\",\"Score\":1}"

QueryNode

curl -X POST \  
http://address:8000/QueryNode \  
-H 'Content-Type: application/json' \  
-H 'cache-control: no-cache' \  
-d "{\"period\":<PERIOD>,\"numRank\":<MAX_NUMBER>}"

其中period和numrank的意思是找到第几阶段的排名前多少位
eg:curl -s -X POST http://127.0.0.1:8000/QueryNodes -H 'Content-Type:application/json' -H 'cache-control: no-cache' -d "{\"period\":1,\"numRank\":100}"

2. MISC

2.1 Cluster deployment

Please refer [Cluster deployment] for details of how to deploy multiple nodes.

2.2 Frontend deployment

Please refer [Frontend deployment] for details of how to deploy the frontend

2.3 Portainer deployment

Please refer [Portainer deployment] for details of how to leverage the portainer to manage containers

3 Team

Zhaoming Yin, Junqing Wang, Yahui Wang, Haifeng Li, Huafeng Li

About

StreamNet Reference Implementation

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages

  • Java 57.9%
  • TeX 26.1%
  • Shell 5.0%
  • Python 4.7%
  • Vue 2.9%
  • Go 1.1%
  • Other 2.3%