DigixGlobal / info-server

Server for blockchain-related queries regarding DigixDAO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Info Server

Info-server is a NodeJS server responsible for maintaining an off-chain replica of the DigixDAO storage contracts. Essentially, it watches for newly mined Ethereum blocks and updates its own database.

Setup

Prerequisites
Run info-server
  • Get the source
$ git clone https://github.com/DigixGlobal/info-server.git
$ git checkout develop
  • Install dependencies
$ npm install
  • Run MongoDB
$ sudo service mongod start
  • Run info-server

    Info-server can be started with multiple configurations, that are included in the development.config.js file. A few npm scripts have been added in the package.json file, also listed below:

    • Forcefully drop database and restart info-server with a fresh instance. This also starts watching blocks from the START_BLOCK config value.
    $ npm run dev:force
    
    • Re-sync all transactions from the blockchain, and then process them. This does not drop the database.
    $ npm run dev:resync
    
    • Only re-process the transactions that already exist in the database. You may want to choose this option if you have modified certain logic in the scripts/ directory, but do not want to re-sync all transactions from the blockchain
    $ npm run dev:reprocess
    

DigixDAO Architecture

DigixDAO Architecture

Contributing

Refer CONTRIBUTING.md for the process for submitting pull requests to us.

Copyright DIGIXGLOBAL PRIVATE LIMITED.

The code in this repository is licensed under the BSD-3 Clause BSD-3-clause, 2017.

About

Server for blockchain-related queries regarding DigixDAO

License:Apache License 2.0


Languages

Language:JavaScript 100.0%