Git Product home page Git Product logo

dashcore-node's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dashcore-node's Issues

TypeError: Address has mismatched network type.

Hello Community!

I forked Dash's code to start a Community project, with learning in mind.

We managed to get all figured out, but this Insight explorer is killing us, and we want to learn basics.

When we start Insight node, it starts ok, we can see explorer website and even blocks with connection.

But if we click on any block or anything else, we get error and all node goes down.

Error that we get on console is

"error: uncaught exception: TypeError: Address has mismatched network type."

error: uncaught exception: TypeError: Address has mismatched network type.
at Function.Address._transformBuffer (/home/rxc/dashcore-node/mynode/node_modules/@dashevo/dashcore-lib/lib/address.js:217:11)
at Function.Address._transformString (/home/rxc/dashcore-node/mynode/node_modules/@dashevo/dashcore-lib/lib/address.js:296:22)
at Address._classifyArguments (/home/rxc/dashcore-node/mynode/node_modules/@dashevo/dashcore-lib/lib/address.js:116:20)
at new Address (/home/rxc/dashcore-node/mynode/node_modules/@dashevo/dashcore-lib/lib/address.js:76:19)
at Object.Address (/home/rxc/dashcore-node/mynode/node_modules/@dashevo/dashcore-lib/lib/address.js:54:12)
at TxController.transformOutput (/home/rxc/dashcore-node/mynode/node_modules/@dashevo/insight-api/lib/transactions.js:183:28)
at Array.map ()
at TxController.transformTransaction (/home/rxc/dashcore-node/mynode/node_modules/@dashevo/insight-api/lib/transactions.js:86:42)
at /home/rxc/dashcore-node/mynode/node_modules/@dashevo/insight-api/lib/transactions.js:280:16
at /home/rxc/dashcore-node/node_modules/async/dist/async.js:4617:26

As i understand that has something with networks.js file, where we define networkMagic to match our network.
File is located at /dashcore-node/mynode/node_modules/@dashevo/dashcore-lib/lib/networks.js

From our source code we have this information

pchMessageStart[0] = 0xd6;
pchMessageStart[1] = 0x93;
pchMessageStart[2] = 0xf3;
pchMessageStart[3] = 0x43;
vAlertPubKey = ParseHex("04e807f1caf222eb75de194e8b83c065c89fbce06b60d0968cdc832bd1ce17ef264362b43df7fd9 7cc7a1a38d69d6b7aab3c16cf7a3a9988fa8816c69a6a3016e1");
nDefaultPort = 23506;
nPruneAfterHeight = 100000;

So we changed networkMagic to 0x4693f343, and p2p port 23506

Should we change anything else from here?

addNetwork({
name: 'livenet',
alias: 'mainnet',
pubkeyhash: 0x4c,
privatekey: 0xcc,
scripthash: 0x10,
xpubkey: 0x488b21e, // 'xpub' (Bitcoin Default)
xprivkey: 0x488ade4, // 'xprv' (Bitcoin Default)
networkMagic: 0xd693f343,
port: 23506,

Our source code chainparams.cpp for reference
https://github.com/Ruxiol/ruxcryptoRXC/blob/master/src/chainparams.cpp

When i read error again, it says TypeError: Address has mismatched network type, could that be problem somewhere else, some other file?

If someone could help us understand we would be grateful

Could this be the problem? if yes, how can i get those values from my source code
pubkeyhash: 0x4c,
privatekey: 0xcc,
scripthash: 0x10,

Rux, Crypto.ba Community

OSX download

bitcore-node-dash is failing when attempting to retrieve OSX binaries, will get fixed soon (or disable automatic download for OSX)

main, test, and regtest default ports?

I've been scouring the interwebs and I can't find what the default ports are for Dash.

Can someone fill in the blanks for me?

[main]
bind=127.0.0.1:9999
rpcbind=127.0.0.1:9998
zmqpubrawtx=tcp://127.0.0.1:28332
zmqpubrawtxlock=tcp://127.0.0.1:28332

[test]
bind=127.0.0.1:19999
rpcbind=127.0.0.1:19998
zmqpubrawtx=tcp://127.0.0.1:?????      ???
zmqpubrawtxlock=tcp://127.0.0.1:?????  ???

[regtest]
bind=127.0.0.1:19899
rpcbind=127.0.0.1:19898
zmqpubrawtx=tcp://127.0.0.1:?????      ???
zmqpubrawtxlock=tcp://127.0.0.1:?????  ???

Connecting dashcore-node to dashd-docker

Hi,

I'm trying to connect dashcore to a Docker container running dashd, but when I start dash-core node my console is spammed with these messages.

2019-03-14T07:43:44.719Z] info: Using network: testnet
[2019-03-14T07:43:44.719Z] info: Starting dashd
[2019-03-14T07:43:44.809Z] info: Dash Daemon Ready
[2019-03-14T07:43:44.810Z] info: Starting web
[2019-03-14T07:43:44.825Z] info: Starting @dashevo/insight-api
[2019-03-14T07:43:44.825Z] info: Starting @dashevo/insight-ui
[2019-03-14T07:43:44.826Z] info: Dashcore Node ready
[2019-03-14T07:43:45.257Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2019-03-14T07:43:45.257Z] info: ZMQ connected to: tcp://127.0.0.1:28332
[2019-03-14T07:43:45.257Z] warn: ZMQ disconnect: tcp://127.0.0.1:28332
[2019-03-14T07:43:45.257Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2019-03-14T07:43:45.257Z] info: ZMQ connected to: tcp://127.0.0.1:28332
[2019-03-14T07:43:45.258Z] warn: ZMQ disconnect: tcp://127.0.0.1:28332
[2019-03-14T07:43:45.258Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2019-03-14T07:43:45.258Z] info: ZMQ connected to: tcp://127.0.0.1:28332
[2019-03-14T07:43:45.258Z] warn: ZMQ disconnect: tcp://127.0.0.1:28332
[2019-03-14T07:43:45.258Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2019-03-14T07:43:45.258Z] info: ZMQ connected to: tcp://127.0.0.1:28332
[2019-03-14T07:43:45.258Z] warn: ZMQ disconnect: tcp://127.0.0.1:28332

Here is my dash.conf

testnet=1
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
rpcuser=dash
rpcpassword=rpcpassword
rpcallowip=127.0.0.1
uacomment=dashcore

and my dashcore-node.json

{
  "network": "testnet",
  "port": 3001,
  "services": [
    "@dashevo/insight-api",
    "@dashevo/insight-ui",
    "dashd",
    "web"
  ],
  "servicesConfig": {
    "dashd": {
       "connect": [{
        "rpchost": "127.0.0.1",
        "rpcport": 19998,
        "rpcuser": "dash",
        "rpcpassword": "rpcpassword",
        "zmqpubrawtx": "tcp://127.0.0.1:28332",
	"zmqpubhashblock": "tcp://127.0.0.1:28332"
      }]
    },
"@dashevo/insight-api": {
      "disableRateLimiter": true
    }
  }
}

Any help to get it working would be greatly appreciated.

ZMQ connection delay: tcp://127.0.0.1:28332

Hi,

my Console is spammed with those messages and I can't figure out why.

[2018-08-02T11:21:19.108Z] info: Using config: /home/dash/.dashcore/dashcore-node.json
[2018-08-02T11:21:19.109Z] info: Using network: livenet
[2018-08-02T11:21:19.110Z] info: Starting dashd
[2018-08-02T11:21:19.141Z] info: Dash Daemon Ready
[2018-08-02T11:21:19.141Z] info: Starting web
[2018-08-02T11:21:19.152Z] info: Dashcore Node ready
[2018-08-02T11:21:19.635Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2018-08-02T11:21:19.636Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2018-08-02T11:21:19.636Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2018-08-02T11:21:19.636Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2018-08-02T11:21:20.137Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2018-08-02T11:21:20.137Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2018-08-02T11:21:20.137Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2018-08-02T11:21:20.638Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2018-08-02T11:21:20.638Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332

My dashcore-node.json:

{
  "network": "livenet",
  "port": 3001,
  "services": [
    "dashd",
    "web"
  ],
  "servicesConfig": {
    "dashd": {
      "connect": [
        {
          "rpchost": "127.0.0.1",
          "rpcport": 9998,
          "rpcuser": "dash",
          "rpcpassword": "rpcpassword",
          "zmqpubrawtx": "tcp://127.0.0.1:28332"
        }
      ]
    }
  }
}

my dash.conf:

testnet=0
disablewallet=1
printtoconsole=1
rpcuser=dash
rpcpassword=rpcpassword
rpcbind=0.0.0.0

Better documentation for existing node

HI,

I'm trying to get block events. I tried starting everything with your example, but I get the error that dashd is not defined. I can't find any examples that show how to properly get new block events.

Can you help me out?

Working node URL?

Hi, not an issue, rather the question. Is there any node actually running this code? I found only insight.dash.siampm.com, which is running some obsolete version.

Merging back changes from bitcore-node

Can you please merge changes back from bitcore-node 3.1.3 (and publish the result to npm)?

I am developing MyTrezor, there is a bug fixed in bitcore-node 3.1.3 with mempool, that would help us if it was fixed.

Segmentation fault (core dumped)

Im getting this error like every 10 minutes when blockchain is synced and dash node stops. Any ideas why this happening?
Edit:
2017-03-21 06:08:56 tor: Thread interrupt
2017-03-21 06:08:56 torcontrol thread exit
2017-03-21 06:08:56 addcon thread interrupt
2017-03-21 06:08:56 net thread interrupt
2017-03-21 06:08:56 scheduler thread interrupt
2017-03-21 06:08:56 mnbcon thread interrupt
2017-03-21 06:08:56 opencon thread interrupt
2017-03-21 06:08:56 msghand thread interrupt
2017-03-21 06:08:56 PrepareShutdown: In progress...
2017-03-21 06:08:56 StopNode()
2017-03-21 06:08:56 Verifying mncache.dat format...
2017-03-21 06:08:56 ERROR: Read: Failed to open file /home/sfwks/.bitcore/data/mncache.dat
2017-03-21 06:08:56 Missing file mncache.dat, will try to recreate
2017-03-21 06:08:56 Writting info to mncache.dat...
2017-03-21 06:08:56 Written info to mncache.dat 131ms
2017-03-21 06:08:56 Masternodes: 4170, peers who asked us for Masternode list: 0, peers we asked for Masternode list: 0, entries in Masternode list we asked for: 0, masternode index size: 4276, nDsqCount: 20439
2017-03-21 06:08:56 mncache.dat dump finished 134ms
2017-03-21 06:08:56 Verifying mnpayments.dat format...
2017-03-21 06:08:56 ERROR: Read: Failed to open file /home/sfwks/.bitcore/data/mnpayments.dat
2017-03-21 06:08:56 Missing file mnpayments.dat, will try to recreate
2017-03-21 06:08:56 Writting info to mnpayments.dat...
2017-03-21 06:08:56 Written info to mnpayments.dat 103ms
2017-03-21 06:08:56 Votes: 51517, Blocks: 5223
2017-03-21 06:08:56 mnpayments.dat dump finished 105ms
2017-03-21 06:08:56 Verifying governance.dat format...
2017-03-21 06:08:56 ERROR: Read: Failed to open file /home/sfwks/.bitcore/data/governance.dat
2017-03-21 06:08:56 Missing file governance.dat, will try to recreate
2017-03-21 06:08:56 Writting info to governance.dat...
2017-03-21 06:08:56 Written info to governance.dat 45ms
2017-03-21 06:08:56 Governance Objects: 33 (Proposals: 32, Triggers: 0, Watchdogs: 1/1, Other: 0; Seen: 785), Votes: 26727
2017-03-21 06:08:56 governance.dat dump finished 46ms
2017-03-21 06:08:56 Verifying netfulfilled.dat format...
2017-03-21 06:08:56 ERROR: Read: Failed to open file /home/sfwks/.bitcore/data/netfulfilled.dat
2017-03-21 06:08:56 Missing file netfulfilled.dat, will try to recreate
2017-03-21 06:08:56 Writting info to netfulfilled.dat...
2017-03-21 06:08:56 Written info to netfulfilled.dat 0ms
2017-03-21 06:08:56 Nodes with fulfilled requests: 11
2017-03-21 06:08:56 netfulfilled.dat dump finished 0ms
2017-03-21 06:08:56 Shutdown: done

Error: Could not load service "@dashevo/insight-ui"

I followed this installation guide https://docs.dash.org/en/stable/developers/insight.html
but I can't get the service to start:

dashcore-node start
/usr/local/lib/node_modules/@dashevo/dashcore-node/lib/scaffold/start.js:124
throw new Error(
^

Error: Could not load service "@dashevo/insight-ui" as it does not support necessary methods and properties.
at checkService (/usr/local/lib/node_modules/@dashevo/dashcore-node/lib/scaffold/start.js:124:11)
at Function.setupServices (/usr/local/lib/node_modules/@dashevo/dashcore-node/lib/scaffold/start.js:182:7)
at start (/usr/local/lib/node_modules/@dashevo/dashcore-node/lib/scaffold/start.js:85:31)
at Command. (/usr/local/lib/node_modules/@dashevo/dashcore-node/lib/cli/main.js:70:7)
at Command.listener (/usr/local/lib/node_modules/@dashevo/dashcore-node/node_modules/commander/index.js:315:8)
at emitTwo (events.js:126:13)
at Command.emit (events.js:214:7)
at Command.parseArgs (/usr/local/lib/node_modules/@dashevo/dashcore-node/node_modules/commander/index.js:651:12)
at Command.parse (/usr/local/lib/node_modules/@dashevo/dashcore-node/node_modules/commander/index.js:474:21)
at Object.main (/usr/local/lib/node_modules/@dashevo/dashcore-node/lib/cli/main.js:147:11)

Here's my dashcore-node.json config paths are ok, I double checked this.

{
"network": "livenet",
"port": 3001,
"services": [
"@dashevo/insight-api",
"@dashevo/insight-ui",
"dashd",
"web"
],
"servicesConfig": {
"dashd": {
"spawn": {
"datadir": "../.dashcore",
"exec": "../dashcore-0.13.2/bin/dashd"
}
}
}
}

bitcore-node-dash Installation error

Hi

Please help me.
Whenever i am installing bitcore-node-dash i am getting this error.

[email protected] preinstall /home/afzal/.nvm/versions/node/v4.8.4/lib/node_modules/bitcore-node-dash
> ./scripts/download

sh: 1: ./scripts/download: Permission denied
npm ERR! Linux 3.16.0-30-generic
npm ERR! argv "/home/afzal/.nvm/versions/node/v4.8.4/bin/node" "/home/afzal/.nvm/versions/node/v4.8.4/bin/npm" "install" "-g" "bitcore-node-dash"
npm ERR! node v4.8.4
npm ERR! npm  v2.15.11
npm ERR! code ELIFECYCLE

npm ERR! [email protected] preinstall: `./scripts/download`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script './scripts/download'.
npm ERR! This is most likely a problem with the bitcore-node-dash package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./scripts/download
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bitcore-node-dash
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls bitcore-node-dash
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/afzal/npm-debug.log

Thanks

npm ERR! notarget No matching version found for @dashevo/dashcore-node@^4.0.0

Greeting, I have been trying to run a node on testnet on my Mac, but went I try to create my node I get the following error:
`
MacBook-Air-de-Andres:~ andresavendano$ dashcore-node* create mynode โ€”t
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @dashevo/dashcore-node@^4.0.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/andresavendano/.npm/_logs/2018-11-12T03_03_30_394Z-debug.log
/Users/andresavendano/dashcore-node/lib/cli/main.js:43
throw err;
^

Error: There was an error installing dependencies.
at ChildProcess. (/Users/andresavendano/dashcore-node/lib/scaffold/create.js:140:25)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Socket.stream.socket.on (internal/child_process.js:381:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close (net.js:606:12)
`

According to https://www.npmjs.com/package/@dashevo/dashcore-node
The version of dashcore-node is 3.0.6

But on Github it says is 4.0.0.
What I'm I Doing wrong?

npm --version 6.4.1 node --version 10.13.0

https://bamboo.dash.org OFFLINE

It's trying to download the tar.gz from https://bamboo.dash.org which has been down for couple days. Update to github releases?

After migration from bitcore-node-dash: More than one instance of bitcore-lib found

I just migrated from bitcore-node-dash to dashcore-node and am getting this error upon dashcore-node start:

/root/dashcore-node/node_modules/bitcore-lib/index.js:12
    throw new Error(message);
    ^

Error: More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency.
    at Object.bitcore.versionGuard (/root/dashcore-node/node_modules/bitcore-lib/index.js:12:11)
    at Object.<anonymous> (/root/dashcore-node/node_modules/bitcore-lib/index.js:15:9)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/root/dashcore-node/node_modules/insight-api/lib/blocks.js:4:15)

There are no leftover node modules as this was build entirely in Docker (Dockerfile.txt):

#
# build with: docker build . -t mytag -f <Dockerfile>
#
FROM node:carbon-slim

# install dependencies etc in one big RUN statement
RUN apt-get update \
	&& extraPackages=" \
		python \
		libzmq3 \
	" \
	&& buildDepends=" \
		build-essential \
		libzmq3-dev \
	" \
	&& apt-get install -y --no-install-recommends \
		$extraPackages \
		$buildDepends \
	\
	&& npm install -g @dashevo/dashcore-node --unsafe-perm=true\
# they forgot to change the symlink name after forking :)
	&& mv /usr/local/bin/bitcore-node-dash /usr/local/bin/dashcore-node \
	\
	&& cd /root \
	&& dashcore-node create dashcore-node \
	&& perl -pi -e 's#/usr/[^\s]+/scaffold/data/dashd#/usr/local/bin/dashd#' dashcore-node/dashcore-node.json \
	\
	&& cd /root/dashcore-node \
	&& dashcore-node install insight-api \
	\
	&& ln -snf /usr/share/zoneinfo/Europe/Berlin /etc/localtime \
	&& echo 'Europe/Berlin' > /etc/timezone \
	\
# remove not needed files
	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDepends \
	&& rm -rf \
		/var/lib/apt/lists/* \
		/root/.npm \
		/root/.node-gyp \
		/usr/local/lib/node_modules/@dashevo/dashcore-node/test \
		/usr/local/lib/node_modules/@dashevo/dashcore-node/benchmarks \
		/usr/local/lib/node_modules/@dashevo/dashcore-node/node_modules/*/test

ENV DASHCORE_OS x86_64-linux-gnu
ENV DASHCORE_VERSION 0.12.3.3
ENV DASHCORE_FILENAME dashcore-${DASHCORE_VERSION}-${DASHCORE_OS}.tar.gz
ENV DASHCORE_SHA256 19191193a8eaf5a10be08eaa3f33ea60c6a2b8848cd8cfeb8aa2046c962b32bd

RUN set -xe \
	&& curl -fSL "https://github.com/dashpay/dash/releases/download/v${DASHCORE_VERSION}/${DASHCORE_FILENAME}" -o /tmp/dashcore.tar.gz \
        && echo "$DASHCORE_SHA256 /tmp/dashcore.tar.gz" | sha256sum -c - \
	&& tar -C /usr/local --strip-components=1 -xzf /tmp/dashcore.tar.gz \
	&& ldconfig \
	&& rm /tmp/dashcore.tar.gz

WORKDIR /root/dashcore-node
EXPOSE 3001

ENV NODE_ENV production

CMD dashcore-node start

Any ideas?

Lack of initial account address/tx information

For example, account address: Xo9UzA2B7yyEhsrQZyFPGCTuFbNGKgHkPU
tx: e0028eb9648db56b1ac77cf090b99048a8007e2bb64b68f092c03c7f56a662c7
/insight-api-dash/txs/?block=00000000fa6cf7367e50ad14eb0ca4737131f256fc4c5841fd3c3f140140e6b6
will return 'Not Found'

Dash-insight showed no historical records about it.
But if use Dash block explorer, we can search it.

How to change checking processes

Hi,

First of all it's not an issue, it's more like a question.
We are trying to set up bitcore-node-dash to work with other cryptocurrency core. Lets say that everything in core is pretty much the same like in dash core so everything should work.

After resolving some problems we stuck on starting and exiting node process. It looks like this:

[2017-11-09T12:20:29.239Z] info: Using config: /Users/gitsad/GIT/bitcore-node-dash/ourcoinNode/bitcore-node-dash.json
[2017-11-09T12:20:29.241Z] info: Using network: testnet
[2017-11-09T12:20:29.242Z] info: Starting bitcoind
[2017-11-09T12:20:29.244Z] info: Using bitcoin config file: /Users/gitsad/GIT/bitcore-node-dash/ourcoinNode/data/dash.conf
[2017-11-09T12:20:29.249Z] info: Starting dash process
OurCoin Core server starting
[2017-11-09T12:20:29.294Z] warn: Dash process unexpectedly exited with code: 0
[2017-11-09T12:20:29.295Z] warn: Restarting dash child process in 5000ms
[2017-11-09T12:20:29.315Z] info: Dash Height: 0 Percentage: 0.01
[2017-11-09T12:20:29.324Z] info: Dash Daemon Ready
[2017-11-09T12:20:29.325Z] info: Starting web
[2017-11-09T12:20:29.369Z] info: Bitcore Node ready
[2017-11-09T12:20:29.802Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332
[2017-11-09T12:20:29.802Z] info: ZMQ connected to: tcp://127.0.0.1:28332

Process exits and starts again:

[2017-11-09T12:20:34.301Z] info: Using bitcoin config file: /Users/gitsad/GIT/bitcore-node-dash/ourcoinNode/data/dash.conf
.
.
.
the same stuff

We found in lib code in bitcore-node-dash/lib/services/bitcoind.js

self.spawn.process.once('exit', function(code) {
      if (!self.node.stopping) {
        log.warn('Dash process unexpectedly exited with code:', code);
        log.warn('Restarting dash child process in ' + self.spawnRestartTime + 'ms');
        setTimeout(function() {
          self._spawnChildProcess(function(err) {
            if (err) {
              return self.emit('error', err);
            }
            log.warn('Dash process restarted');
          });
        }, self.spawnRestartTime);
      }
    });

We changed it by adding return; at the end of line:

self.spawn.process.once('exit', function(code) { return;

And this resolved our problem with the restarting process.

The question is:

Where can we find the conditions on which this function checks the process and how we can change it?

Every help will be appreciated. Thanks!

ERR npm install dashcore-node

npm ERR! Linux 4.15.0-132-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the zeromq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs zeromq
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls zeromq
npm ERR! There is likely additional logging output above.

dashd not gracefully shutdown when used with docker-compose

I've built a docker image consisting of dashcore-node that spawns the dashd process.

When started via docker run -it image-name the current shell keeps being attached to the docker process so that later pressing key combo CTRL+C results in dashd gracefully shutting down. This can be confirmed by looking at dashd's debug.log which contains

Shutdown: done

as the last entry.

When using docker-compose however upon stopping the container dashd is SIGKILLED, debug.log has no entry about shutting down and the berkeleydb directory "database" is still present in dashd's datadir which is a clear indication that no graceful shutdown happened.

I can only guess that dashcore-node has to handle SIGNALs here for a graceful shutdown of the spawned dashd.

Change symlink bitcore-node-dash to dashcore-node

After

npm install -g @dashevo/dashcore-node --unsafe-perm=true

there exists a symlink in /usr/local/bin:

bitcore-node-dash -> ../lib/node_modules/@dashevo/dashcore-node/bin/dashcore-node

This symlink should be named dashcore-node

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.