dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

Nodes built by docker report errors #3583

Closed shixiaofeia closed 4 years ago

shixiaofeia commented 4 years ago

This issue tracker is only for technical issues related to Dash Core.

General Dash questions and/or support requests and are best directed to the Dashpay Reddit.

To report critical security issues, email infosec@dash.org and/or see the DASH bug bounty program on Bugcrowd instead of creating Github issues.

Describe the issue

My test node built with docker reported an error

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. dash.conf:
    
    testnet=1
    printtoconsole=1
    rpcuser=dashrpc
    rpcpassword=v13euZORwUQbsd0gAZzCUYJeXJxD70X7MUmif1fTl4uf
    addressindex=1
    txindex=1
    rpcallowip=0.0.0.0/0
    rpcbind = 0.0.0.0

2.  docker volume create --name=dashd-data
3. docker run -it  -v dashd-data:/dash --name=dashd-test -d  -p 19998:19998 dashpay/dashd

### Screenshots.
If the issue is related to the GUI, screenshots can be added to this issue via drag & drop.
![image](https://user-images.githubusercontent.com/63829677/86112091-21ce9b00-bafa-11ea-8ae7-e32a297dc0da.png)
![image](https://user-images.githubusercontent.com/63829677/86198541-69046c80-bb8a-11ea-9f1c-296c58939572.png)

### What version of Dash Core are you using?
List the version number/commit ID, and if it is an official binary, self compiled or a distribution package such as PPA.
dashpay/dashd:latest
### Machine specs:
- OS:  CentOs
- CPU:
- RAM: 8G
- Disk size: 240G
- Disk Type (HD/SDD):

### Any extra information that might be useful in the debugging process.
This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred.

请求 listunspent 结果为空, 不报错
shixiaofeia commented 4 years ago

I still have a question, how to calculate the size of the transaction data, because I want to use the estimatesmartfee ​​method to calculate the miner's fee, Or there are other better ways, look forward to your answer

strophy commented 4 years ago

Hello, the problem in your first post is you are not passing your dash.conf file to Docker in step 3, so it is auto-generating a dash.conf file for you instead of using your file. Try to start it like this instead:

docker run  \
  -v dashd-data:/dash/data  \
  -v "$(pwd)"/dash.conf:/dash/.dashcore/dash.conf \
  --name=dashd-test -d \
  -p 19999:19999 \
  -p 127.0.0.1:19998:19998 \
  dashpay/dashd dashd -conf=/dash/.dashcore/dash.conf -datadir=/dash/data

The estimatesmartfee RPC should work fine once dashd is fully synced.

shixiaofeia commented 4 years ago

Hello, the problem in your first post is you are not passing your dash.conf file to Docker in step 3, so it is auto-generating a dash.conf file for you instead of using your file. Try to start it like this instead:

docker run  \
  -v dashd-data:/dash/data  \
  -v "$(pwd)"/dash.conf:/dash/.dashcore/dash.conf \
  --name=dashd-test -d \
  -p 19999:19999 \
  -p 127.0.0.1:19998:19998 \
  dashpay/dashd dashd -conf=/dash/.dashcore/dash.conf -datadir=/dash/data

The estimatesmartfee RPC should work fine once dashd is fully synced.

I generated the .dashcore and dash.conf files in advance, and then mount them to docker startup, but it does occasionally happen that the connection is refused, etc. thank you for your reply