Skip to content

jaymansfield/nr-service

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nr-service

Nebulas rank offline service

Nebulas node dependency

Compile and install nebulas, tutorial here.

Development environment dependency

  • Boost version >= 1.67.0
  • LLVM/Clang++ version >= 6.0.0
  • Python version 2.7
  • Flask version >= 1.0.2

Arangodb dependency

Build

$ cd /path/to/nr-service
$ mkdir build && cd build
$ cmake .. && make

Run

  • Run nebulas node, sync blocks from genesis block to the latest
  • Run arangodb, build arangodb collections, script in $PATH_TO_NR-SERVICE/python/graph/arango_graph.py
  • Run transaction_writer and account_writer in directory $PATH_TO_NR-SERVICE/cpp/bin, to build transaction graph
  • Run nr in the same directory

Query

  • Query transaction by block height, curl -s "http://localhost:6000/transaction?start_block=400100&end_block=400200"
  • Query transaction by address, curl -s "http://localhost:6000/transaction?address=n1Q6JhXKWXCkyvoqymN4LPd6J1tentyKRVF"
  • Query account by address, curl -s "http://localhost:6000/account?address=n1Q6JhXKWXCkyvoqymN4LPd6J1tentyKRVF"
  • Query nebulas rank by date, curl -s "http://localhost:6000/nr?date=20180620"

About

Nebulas rank offline service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 73.2%
  • Python 22.6%
  • CMake 4.0%
  • Other 0.2%