ZelCash-Bitcore Node

ZelCash-Bitcore Node

Blockchain Technology
September 6, 2019 by admin
190
bitcore node

Bitcore Node ZelCash

A ZelCash full node for building applications and services with Node.js. A node is extensible and can be configured to run additional services. Additional services can be enabled to make a node more useful such as exposing new APIs, running a block explorer and wallet service.

 

Explorer Guide

 

Part 1. Zelcash with extended RPC functionalities

 

wget -qO- https://raw.githubusercontent.com/TheTrunk/bitcore-node-zelcash/master/installZelcashd.sh | bash

 

Part 2. Latest Zelcash insight explorer = bitcore-node-zelcash with insight-api and insight-ui

 

wget -qO- https://raw.githubusercontent.com/TheTrunk/bitcore-node-zelcash/master/installExplorer.sh | bash

 

Install

 

git clone https://github.com/TheTrunk/bitcore-node-zelcash.git
cd bitcore-node-zelcash
npm install
bitcore-node start

 

Prerequisites

 

  • GNU/Linux x86_32/x86_64, or OSX 64bit (for zelcashd distributed binaries)
  • Node.js v0.10, v0.12 or v4
  • ZeroMQ (libzmq3-dev for Ubuntu/Debian or zeromq on OSX)
  • ~30GB of disk storage
  • ~2GB of RAM

 

Configuration

Bitcore includes a Command Line Interface (CLI) for managing, configuring and interfacing with your Bitcore Node.

 

bitcore-node create -d <bitcoin-data-dir> mynode
cd mynode
bitcore-node install <service>
bitcore-node install https://github.com/yourname/helloworld

This will create a directory with configuration files for your node and install the necessary dependencies. For more information about (and developing) services, please see the Service Documentation.

 

Add-on Services

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

 

 

Documentation

 

  • Upgrade Notes
  • Services
    • Bitcoind – Interface to Bitcoin Core
    • 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.

 

License

Code released under the MIT license.

Copyright 2013-2015 BitPay, Inc.

 

  • bitcoin: Copyright (c) 2009-2015 Bitcoin Core Developers (MIT License)
No description, website, or topics provided.
JavaScriptShell
Branch: master 

Clone or download 
 Pull request  CompareThis branch is 1 commit ahead of TheTrunk:master.
@TheTrunk
Latest commit1d159073 days ago
Type Name Latest commit message Commit time
  benchmarks Initial 2 years ago
  bin Initial 2 years ago
  docs Initial 2 years ago
  lib listzelnodes 7 months ago
  regtest Initial 2 years ago
  scripts Initial 2 years ago
  test node update last year
  .gitignore Initial commit 2 years ago
  LICENSE Initial 2 years ago
  README.md links correction last year
  index.js Initial 2 years ago
  installExplorer.sh update installscripts last year
  installZelcashd.sh update installscripts last year
  npm-debug.log Initial 2 years ago

Setting up Development Environment

Install Node.js

Install Node.js by your favorite method, or use Node Version Manager by following directions at https://github.com/creationix/nvm

nvm install v4

Fork and Download Repositories

To develop bitcore-node:

cd ~
git clone git@github.com:<yourusername>/bitcore-node.git
git clone git@github.com:<yourusername>/bitcore-lib.git

To develop bitcoin or to compile from source:

git clone git@github.com:<yourusername>/bitcoin.git
git fetch origin <branchname>:<branchname>
git checkout <branchname>

Note: See bitcoin documentation for building bitcoin on your platform.

Install Development Dependencies

For Ubuntu:

sudo apt-get install libzmq3-dev
sudo apt-get install build-essential

Note: Make sure that libzmq-dev is not installed, it should be removed when installing libzmq3-dev.

For Mac OS X:

brew install zeromq

Install and Symlink

cd bitcore-lib
npm install
cd ../bitcore-node
npm install

Note: If you get a message about not being able to download bitcoin distribution, you’ll need to compile bitcoind from source, and setup your configuration to use that version.

We now will setup symlinks in bitcore-node (repeat this for any other modules you’re planning on developing):

cd node_modules
rm -rf bitcore-lib
ln -s ~/bitcore-lib
rm -rf bitcoind-rpc
ln -s ~/bitcoind-rpc

And if you’re compiling or developing bitcoin:

cd ../bin
ln -sf ~/bitcoin/src/bitcoind

Run Tests

If you do not already have mocha installed:

npm install mocha -g

To run all test suites:

cd bitcore-node
npm run regtest
npm run test

To run a specific unit test in watch mode:

mocha -w -R spec test/services/bitcoind.unit.js

To run a specific regtest:

mocha -R spec regtest/bitcoind.js

Running a Development Node

To test running the node, you can setup a configuration that will specify development versions of all of the services:

cd ~
mkdir devnode
cd devnode
mkdir node_modules
touch bitcore-node.json
touch package.json

Edit bitcore-node.json with something similar to:

{
  "network": "livenet",
  "port": 3001,
  "services": [
    "bitcoind",
    "web",
    "insight-api",
    "insight-ui",
    "<additional_service>"
  ],
  "servicesConfig": {
    "bitcoind": {
      "spawn": {
        "datadir": "/home/<youruser>/.bitcoin",
        "exec": "/home/<youruser>/bitcoin/src/bitcoind"
      }
    }
  }
}

Note: To install services insight-api and insight-ui you’ll need to clone the repositories locally.

Setup symlinks for all of the services and dependencies:

cd node_modules
ln -s ~/bitcore-lib
ln -s ~/bitcore-node
ln -s ~/insight-api
ln -s ~/insight-ui

Make sure that the <datadir>/bitcoin.conf has the necessary settings, for example:

server=1
whitelist=127.0.0.1
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubrawtx=tcp://127.0.0.1:28332
zmqpubhashblock=tcp://127.0.0.1:28332
rpcallowip=127.0.0.1
rpcuser=bitcoin
rpcpassword=local321

From within the devnode directory with the configuration file, start the node:

../bitcore-node/bin/bitcore-node start
  • zelcashZelCash (ZEL) $ 0.055853 4.39%
  • ycashYcash (YEC) $ 0.297985 6.05%
  • bitcoin-privateBitcoin Private (BTCP) $ 0.161683 17.18%
  • bitcoinzBitcoinZ (BTCZ) $ 0.000102 3.77%
  • hushHush (HUSH) $ 0.081871 9.5%
  • snowgemSnowGem (XSG) $ 0.018996 4.08%
  • bithereumBithereum (BTH) $ 0.004908 115.92%