GithubHelp home page GithubHelp logo

oipwg / flocore-node Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bitpay/bitcore-node

2.0 5.0 3.0 42.31 MB

Extensible full node using the Bitcore build of Bitcoin

Home Page: https://bitcore.io/

License: Other

JavaScript 98.71% Shell 1.08% Dockerfile 0.22%

flocore-node's Introduction

Flocore Node

A Florincoin blockchain indexing and query service. Intended to be used with as a Florincoin full node or in conjunction with a Florincoin full node.

Upgrading from previous versions of Flocore Node

There is no upgrade path from previous versions of Flocore Node due to the removal of the included Florincoin Core software. By installing this version, you must resynchronize the indexes from scratch.

Install

npm install
./bin/flocore-node start

Note: A default configuration file is placed in the flocore user's home directory (~/.flocore/flocore-node.json). Or, alternatively, you can copy the provided "flocore-node.json.sample" file to the project's root directory as flocore-node.json and edit it for your preferences. If you don't have a preferred block source (trusted peer), Bcoin will be started automatically and synchronized with the mainnet chain.

Prerequisites

  • Node.js v8.2.0+
  • ~500GB of disk storage
  • ~4GB of RAM

Configuration

The main configuration file is called "flocore-node.json". This file instructs flocore-node for the following options:

  • location of database files (datadir)
  • tcp port for web services, if configured (port)
  • florincoin network type (e.g. mainnet, testnet3, regtest), (network)
  • what services to include (services)
  • the services' configuration (servicesConfig)

Add-on Services

There are several add-on services available to extend the functionality of Flocore:

Documentation

  • Services
    • Fee - Creates a service to handle fee queries
    • Header - Creates a service to handle block headers
    • Block - Creates a service to handle blocks
    • Transaction - Creates a service to handle transactions
    • Address - Creates a service to handle addresses
    • Mempool - Creates a service to handle mempool
    • Timestamp - Creates a service to handle timestamp
    • Db - Creates a service to handle the database
    • p2p - Creates a service to handle the peer-to-peer network
    • Web - Creates an express application over which services can expose their web/API content
  • Development Environment - Guide for setting up a development environment
  • Node - Details on the node constructor
  • Bus - Overview of the event bus constructor
  • Release Process - Information about verifying a release and the release process.

Contributing

Please send pull requests for bug fixes, code optimization, and ideas for improvement. For more information on how to contribute, please refer to our CONTRIBUTING file.

License

Code released under the MIT license.

Copyright 2013-2017 BitPay, Inc.

  • florincoin: Copyright (c) 2009-2015 Florincoin Core Developers (MIT License)

flocore-node's People

Contributors

bitjson avatar braydonf avatar chjj avatar gabegattis avatar gasteve avatar igorbarinov avatar isghe avatar jpochyla avatar karelbilek avatar kleetus avatar matiu avatar micahriggan avatar nitsujlangston avatar ostlerdev avatar pnagurny avatar posita avatar ralphtheninja avatar sexual avatar strml avatar unusualbob avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flocore-node's Issues

CRASH! Error: block not in index

[2018-09-08T01:08:19.747Z] info: ::ffff:127.0.0.1 "GET /api/status?q=getInfo" 200 143 0.622 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
[2018-09-08T01:08:19.759Z] info: ::ffff:127.0.0.1 "GET /api/sync" 200 121 0.670 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
[2018-09-08T01:08:19.842Z] info: ::ffff:127.0.0.1 "GET /api/peer" 200 49 0.513 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
[2018-09-08T01:08:19.851Z] info: ::ffff:127.0.0.1 "GET /api/status?q=getInfo" 304 - 0.504 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
[2018-09-08T01:08:19.917Z] info: ::ffff:127.0.0.1 web socket subscribe: inv
[2018-09-08T01:08:19.997Z] info: ::ffff:127.0.0.1 web socket subscribe: inv
[2018-09-08T01:08:19.998Z] info: ::ffff:127.0.0.1 web socket subscribe: sync
[2018-09-08T01:08:19.998Z] info: ::ffff:127.0.0.1 web socket subscribe: inv
[2018-09-08T01:08:19.998Z] info: ::ffff:127.0.0.1 web socket subscribe: sync
[2018-09-08T01:08:19.998Z] info: ::ffff:127.0.0.1 web socket subscribe: sync
[2018-09-08T01:08:20.082Z] info: ::ffff:127.0.0.1 "GET /api/currency" 200 47 321.794 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
[2018-09-08T01:08:34.270Z] error: Error: block not in index
    at /home/floc/flocore/livenet/node_modules/flosight-api/lib/blocks.js:84:41
    at /home/floc/flocore/livenet/node_modules/flocore-node/lib/services/block/index.js:471:14
    at /home/floc/flocore/livenet/node_modules/flocore-node/lib/services/db/index.js:107:16
    at /home/floc/flocore/livenet/node_modules/levelup/lib/levelup.js:168:14
[2018-09-08T01:08:34.271Z] info: ::ffff:127.0.0.1 "GET /api/block/2500000" 503 18 34.074 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36"
[2018-09-08T01:08:34.277Z] error: uncaught exception: TypeError: Cannot read property 'blockHash' of undefined
    at paramCallback (/home/floc/flocore/livenet/node_modules/express/lib/router/index.js:392:35)
    at /home/floc/flocore/livenet/node_modules/flosight-api/lib/blocks.js:132:5
    at /home/floc/flocore/livenet/node_modules/flocore-node/lib/services/block/index.js:187:5
    at /home/floc/flocore/livenet/node_modules/flocore-node/lib/services/block/index.js:475:5
    at /home/floc/flocore/livenet/node_modules/flocore-node/lib/services/db/index.js:114:7
    at /home/floc/flocore/livenet/node_modules/levelup/lib/levelup.js:170:5
[2018-09-08T01:08:34.278Z] error: TypeError: Cannot read property 'blockHash' of undefined
    at paramCallback (/home/floc/flocore/livenet/node_modules/express/lib/router/index.js:392:35)
    at /home/floc/flocore/livenet/node_modules/flosight-api/lib/blocks.js:132:5
    at /home/floc/flocore/livenet/node_modules/flocore-node/lib/services/block/index.js:187:5
    at /home/floc/flocore/livenet/node_modules/flocore-node/lib/services/block/index.js:475:5
    at /home/floc/flocore/livenet/node_modules/flocore-node/lib/services/db/index.js:114:7
    at /home/floc/flocore/livenet/node_modules/levelup/lib/levelup.js:170:5
[2018-09-08T01:08:34.279Z] info: Beginning shutdown
[2018-09-08T01:08:34.279Z] info: P2P Service: disconnecting pool and peers. SIGINT issued, system shutdown initiated
[2018-09-08T01:08:34.280Z] info: Disconnected from peer: 127.0.0.1
[2018-09-08T01:08:34.280Z] warn: Node is stopping, gently closing the database. Please wait, this could take a while.
[2018-09-08T01:08:34.280Z] info: Stopping insight-websocket-service
Error: Can't set headers after they are sent.
    at validateHeader (_http_outgoing.js:491:11)
    at ServerResponse.setHeader (_http_outgoing.js:498:3)
    at ServerResponse.header (/home/floc/flocore/livenet/node_modules/express/lib/response.js:767:10)
    at ServerResponse.send (/home/floc/flocore/livenet/node_modules/express/lib/response.js:170:12)
    at Common.handleErrors (/home/floc/flocore/livenet/node_modules/flosight-api/lib/common.js:28:23)
    at BlockController.checkBlockHash (/home/floc/flocore/livenet/node_modules/flosight-api/lib/blocks.js:54:24)
    at Layer.handle [as handle_request] (/home/floc/flocore/livenet/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/floc/flocore/livenet/node_modules/express/lib/router/route.js:137:13)
    at /home/floc/flocore/livenet/node_modules/flosight-api/lib/index.js:75:5
    at Layer.handle [as handle_request] (/home/floc/flocore/livenet/node_modules/express/lib/router/layer.js:95:5)
[2018-09-08T01:08:34.281Z] info: Stopping flosight-ui
[2018-09-08T01:08:34.281Z] info: Stopping flosight-api
[2018-09-08T01:08:34.282Z] info: Stopping fee
[2018-09-08T01:08:34.282Z] info: Stopping web
[2018-09-08T01:08:34.282Z] info: Stopping address
[2018-09-08T01:08:34.283Z] info: Stopping transaction
[2018-09-08T01:08:34.283Z] info: Stopping block
[2018-09-08T01:08:34.283Z] info: Stopping mempool
[2018-09-08T01:08:34.283Z] info: Stopping timestamp
[2018-09-08T01:08:34.283Z] info: Stopping header
[2018-09-08T01:08:34.283Z] info: Stopping db
[2018-09-08T01:08:34.387Z] info: Stopping p2p
[2018-09-08T01:09:51.059Z] info: ::ffff:127.0.0.1 web socket disconnect
[2018-09-08T01:09:51.059Z] info: ::ffff:127.0.0.1 unsubscribe: p2p/transaction total: 1
[2018-09-08T01:09:51.059Z] info: ::ffff:127.0.0.1 unsubscribe: p2p/block total: 2
[2018-09-08T01:09:51.059Z] info: ::ffff:127.0.0.1 unsubscribe: p2p/headers total: 0
[2018-09-08T01:09:51.059Z] info: ::ffff:127.0.0.1 unsubscribe: header/block total: 0
[2018-09-08T01:09:51.059Z] info: ::ffff:127.0.0.1 unsubscribe: mempool/transaction total: 2
[2018-09-08T01:09:51.059Z] info: ::ffff:127.0.0.1 unsubscribe: block/block total: 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.