You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
3.1 KiB

6 years ago
  1. # goBlockchainDataAnalysis
  2. blockchain data analysis, written in Go
  3. #### Not finished - ToDo list
  4. To Do list in DevelopmentNotes.md https://github.com/arnaucode/goBlockchainDataAnalysis/blob/master/DevelopmentNotes.md
  5. ## Instructions
  6. ### Install
  7. 1. Nodejs & NPM https://nodejs.org/ --> to get npm packages for the web
  8. 2. MongoDB https://www.mongodb.com/
  9. 3. Faircoin wallet https://download.faircoin.world/, or the Cryptocurrency desired wallet
  10. 4. goBlockchainDataAnalysis https://github.com/arnaucode/goBlockchainDataAnalysis
  11. ### Configure
  12. - Wallet /home/user/.faircoin2/faircoin.conf:
  13. ```
  14. rpcuser=faircoinrpc
  15. rpcpassword=password
  16. rpcport=3021
  17. rpcworkqueue=2000
  18. server=1
  19. rpcbind=127.0.0.1
  20. rpcallowip=127.0.0.1
  21. ```
  22. - goBlockchainDataAnalysis/config.json:
  23. ```json
  24. {
  25. "user": "faircoinrpc",
  26. "pass": "password",
  27. "host": "127.0.0.1",
  28. "port": "3021",
  29. "genesisTx": "7c27ade2c28e67ed3077f8f77b8ea6d36d4f5eba04c099be3c9faa9a4a04c046",
  30. "genesisBlock": "beed44fa5e96150d95d56ebd5d2625781825a9407a5215dd7eda723373a0a1d7",
  31. "startFromBlock": 0,
  32. "server": {
  33. "serverIP": "127.0.0.1",
  34. "serverPort": "3014",
  35. "webServerPort": "8080",
  36. "allowedIPs": [
  37. "127.0.0.1"
  38. ],
  39. "blockedIPs": []
  40. },
  41. "mongodb": {
  42. "ip": "127.0.0.1",
  43. "database": "goBlockchainDataAnalysis"
  44. }
  45. }
  46. ```
  47. ### Run
  48. 1. Start MongoDB
  49. ```
  50. sudo service mongod start
  51. ```
  52. 2. Start wallet
  53. ```
  54. ./faircoind -txindex -reindex-chainstate
  55. ```
  56. Wait until the entire blockchain is downloaded.
  57. 3. Run explorer, to fill the database
  58. ```
  59. ./goBlockchainDataAnalysis -explore
  60. ```
  61. 3.1. The next runs, once the database have data and just need to add last blocks added in the blockchain, can just run:
  62. ```
  63. ./goBlockchainDataAnalysis -continue
  64. ```
  65. 3.2. If don't want to fill the database, can just run:
  66. ```
  67. ./goBlockchainDataAnalysis
  68. ```
  69. Webapp will run on 127.0.0.1:8080
  70. 4. ADDITIONAL - Run the webserver, directly from the /web directory
  71. This can be useful if need to deploy the API server in one machine and the webserver in other.
  72. In the /web directory:
  73. ```
  74. npm start
  75. ```
  76. Webapp will run on 127.0.0.1:8080
  77. ### Additional info
  78. - Backend
  79. - Go lang https://golang.org/
  80. - MongoDB https://www.mongodb.com/
  81. - Frontend
  82. - AngularJS https://angularjs.org/
  83. - Angular-Bootstrap-Material https://tilwinjoy.github.io/angular-bootstrap-material
  84. ### Some screenshots
  85. Some screenshots can be old, and can contain errors.
  86. ![goBlockchainDataAnalysis](https://raw.githubusercontent.com/arnaucode/goBlockchainDataAnalysis/master/screenshots/goBlockchainDataAnalysis00.png "goBlockchainDataAnalysis")
  87. ![goBlockchainDataAnalysis](https://raw.githubusercontent.com/arnaucode/goBlockchainDataAnalysis/master/screenshots/goBlockchainDataAnalysis01.png "goBlockchainDataAnalysis")
  88. ![goBlockchainDataAnalysis](https://raw.githubusercontent.com/arnaucode/goBlockchainDataAnalysis/master/screenshots/goBlockchainDataAnalysis02.png "goBlockchainDataAnalysis")
  89. ![goBlockchainDataAnalysis](https://raw.githubusercontent.com/arnaucode/goBlockchainDataAnalysis/master/screenshots/goBlockchainDataAnalysis03.gif "goBlockchainDataAnalysis")