Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this api together with docker-dashd #41

Open
devluist opened this issue Feb 28, 2019 · 3 comments
Open

How to use this api together with docker-dashd #41

devluist opened this issue Feb 28, 2019 · 3 comments

Comments

@devluist
Copy link

Hi I can't figure it out how should be set the dash.conf to listen to the daemon from a docker image (https://github.com/dashpay/docker-dashd)

I have like this

addressindex=1
txindex=1
listen=1
server=1
daemon=1
timestampindex=1
spentindex=1

and dashcore-node.json

It's like this

{
  "network": "livenet",
  "port": 3001,
  "services": [
    "@dashevo/insight-api",
    "dashd",
    "web"
  ],
  "servicesConfig": {
    "dashd": {
      "spawn": {
        "datadir": "/dashcore-node/dash-data",
        "exec": "/dashcore-node/dash-data/dashd"
      }
    }
  }
}

I've installed dashcore-node outside of the docker image (as i am kind new to docker development)
when a run
./bin/dashcore-node start

it says

"starting dashd"

and then it fails with error

RPCError: Dash JSON-RPC: Request Error: connect ECONNREFUSED 127.0.0.1:9998

I have placed a question in SO but i'm on a deadline and nobody has answered, so please any help thank you

@nmarley
Copy link

nmarley commented Feb 28, 2019

Hi,

      "spawn": {
        "datadir": "/dashcore-node/dash-data",
        "exec": "/dashcore-node/dash-data/dashd"
      }

This "spawn" method isn't supported by us anymore (it's terrible software architecture anyway). I recommend you start your dashd node separately, and that your dashcore-node.json file look something like this:

{
  "network": "livenet",
  "port": 3001,
  "services": [
    "dashd",
    "@dashevo/insight-api",
    "@dashevo/insight-ui",
    "web"
  ],
  "servicesConfig": {
    "dashd": {
      "connect": [{
        "rpchost": "dashcore",
        "rpcport": 9998,
        "rpcuser": "dashrpc",
        "rpcpassword": "password",
        "zmqpubrawtx": "tcp://dashcore:29998",
        "zmqpubhashblock": "tcp://dashcore:29998"
      }]
    },
    "@dashevo/insight-api": {
      "disableRateLimiter": true
    }
  }
}

Using this config, your dashd node must be reachable via the name "dashcore" (or just change the name or use an IP address).

Does this help get you closer?

@airstring
Copy link

airstring commented Nov 28, 2022

@nmarley The application will not start without zmqpubrawtx in dashcore-node.json ,why?

@nmarley
Copy link

nmarley commented Nov 29, 2022

I don't know, what error message are you seeing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants