Giter Club home page Giter Club logo

docker-dashd's Introduction

Dashd for Docker

Docker Stats

Build Status

Docker image that runs the Dash dashd node in a container for easy deployment.

Requirements

  • Physical machine, cloud instance, or VPS that supports Docker (i.e. Vultr, Digital Ocean, KVM or XEN based VMs) running Ubuntu 18.04 or later (not OpenVZ containers!)
  • At least 40 GB to store the block chain files
  • At least 2 GB RAM + 2 GB swap file

Really Fast Quick Start

One liner for Ubuntu 18.04 LTS machines with JSON-RPC enabled on localhost and adds upstart init script:

curl https://raw.githubusercontent.com/dashpay/docker-dashd/master/bootstrap-host.sh | sh -s bionic

Quick Start

  1. Create a dashd-data volume to persist the dashd blockchain data, should exit immediately. The dashd-data container will store the blockchain when the node container is recreated (software upgrade, reboot, etc):

     docker volume create --name=dashd-data
     docker run -v dashd-data:/dash --name=dashd-node -d \
         -p 9999:9999 \
         -p 127.0.0.1:9998:9998 \
         dashpay/dashd
    
  2. Verify that the container is running and dashd node is downloading the blockchain

     $ docker ps
     CONTAINER ID        IMAGE                         COMMAND             CREATED             STATUS              PORTS                                              NAMES
     d0e1076b2dca        dashpay/dashd:latest          "dash_oneshot"      2 seconds ago       Up 1 seconds        127.0.0.1:9998->9998/tcp, 0.0.0.0:9999->9999/tcp   dashd-node
    
  3. You can then access the daemon's output thanks to the docker logs command

     docker logs -f dashd-node
    
  4. Install optional init scripts for upstart and systemd are in the init directory.

Documentation

  • To run in testnet, add environment variable TESTNET=1 to docker run as such:

      docker run -v dashd-data:/dash --name=dashd-node -d \
          --env TESTNET=1 \
          -p 9999:9999 \
          -p 127.0.0.1:9998:9998 \
          dashpay/dashd
    
  • Additional documentation in the docs folder.

Credits

Original work by Kyle Manna https://github.com/kylemanna/docker-bitcoind. Modified to use Dash Core instead of Bitcoin Core.

docker-dashd's People

Contributors

achristianson avatar alexdcox avatar andrewbadura avatar hectorj avatar hex2a avatar illia-v avatar jhodges10 avatar kelostrada avatar kylemanna avatar nmarley avatar olegabr avatar phuongnd08 avatar prettymuchbryce avatar schinzelh avatar strophy avatar thephez avatar udjinm6 avatar uzyn avatar

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  avatar  avatar  avatar

Watchers

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

docker-dashd's Issues

"dash_init": executable file not found in $PATH:

when i run this command from docker

docker run -v dashd-data:/dash --rm $DASH_IMAGE dash_init

I am receiving this error

docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "dash_init": executable file not found in $PATH: unknown.
ERRO[0000] error waiting for container: context canceled

The file dash_init is definitely on the host:

wal@ubuntu:~$ ls -l dash_init
-rwxrwxr-x 1 wal wal 621 May 20 14:23 dash_init
wal@ubuntu:~$

what am i missing?

-reindex option when running dashd

Attaching to 9ab47c9e9a64_dashd
9ab47c9e9a64_dashd | + dash_init
9ab47c9e9a64_dashd | + '[' '!' -e /dash/.dashcore/dash.conf ']'
9ab47c9e9a64_dashd | + cat /dash/.dashcore/dash.conf
9ab47c9e9a64_dashd | rpcport=9998
9ab47c9e9a64_dashd | rpcconnect=127.0.0.1
9ab47c9e9a64_dashd | rpcuser=winstantpay
9ab47c9e9a64_dashd | rpcpassword=iwillchangethat
9ab47c9e9a64_dashd | server=1
9ab47c9e9a64_dashd | Initialization completed successfully
9ab47c9e9a64_dashd | + echo 'Initialization completed successfully'
9ab47c9e9a64_dashd | + '[' 0 -gt 0 ']'
9ab47c9e9a64_dashd | + args=("-rpcallowip=::/0")
9ab47c9e9a64_dashd | + exec dashd -rpcallowip=::/0
9ab47c9e9a64_dashd | : Error opening block database.
9ab47c9e9a64_dashd | Please restart with -reindex or -reindex-chainstate to recover.
9ab47c9e9a64_dashd exited with code 1

how can i modify the entrypoint of the image? I want to run dashd with -reindex options

cannot access wallet rpc's

The dash version being downloaded in dockerfile is probably not built with wallet support and therefore I can't access those RPC's.

dash-cli help gives:

sudo docker exec eb dash-cli help
== Addressindex ==
getaddressbalance
getaddressdeltas
getaddressmempool
getaddresstxids
getaddressutxos

== Blockchain ==
getbestblockhash
getblock "blockhash" ( verbose )
getblockchaininfo
getblockcount
getblockhash height
getblockhashes timestamp
getblockheader "hash" ( verbose )
getblockheaders "hash" ( count verbose )
getchaintips ( count branchlen )
getdifficulty
getmempoolancestors txid (verbose)
getmempooldescendants txid (verbose)
getmempoolentry txid
getmempoolinfo
getrawmempool ( verbose )
getspentinfo
gettxout "txid" n ( include_mempool )
gettxoutproof ["txid",...] ( blockhash )
gettxoutsetinfo
preciousblock "blockhash"
pruneblockchain
verifychain ( checklevel nblocks )
verifytxoutproof "proof"

== Control ==
debug ( 0|1|addrman|alert|bench|coindb|db|lock|rand|rpc|selectcoins|mempool|mempoolrej|net|proxy|prune|http|libevent|tor|zmq|dash|privatesend|instantsend|masternode|spork|keepass|mnpayments|gobject )
getinfo
getmemoryinfo
help ( "command" )
stop

== Dash ==
getgovernanceinfo
getpoolinfo
getsuperblockbudget index
gobject "command"...
masternode "command"...
masternodebroadcast "command"...
masternodelist ( "mode" "filter" )
mnsync [status|next|reset]
sentinelping version
spork "command"
voteraw <masternode-tx-hash> <masternode-tx-index> <governance-hash> <vote-signal> [yes|no|abstain] <time> <vote-sig>

== Generating ==
generate nblocks ( maxtries )
generatetoaddress nblocks address (maxtries)

== Mining ==
getblocktemplate ( TemplateRequest )
getmininginfo
getnetworkhashps ( nblocks height )
prioritisetransaction <txid> <priority delta> <fee delta>
submitblock "hexdata" ( "jsonparametersobject" )

== Network ==
addnode "node" "add|remove|onetry"
clearbanned
disconnectnode "address" 
getaddednodeinfo ( "node" )
getconnectioncount
getnettotals
getnetworkinfo
getpeerinfo
listbanned
ping
setban "subnet" "add|remove" (bantime) (absolute)
setnetworkactive true|false

== Rawtransactions ==
createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,"data":"hex",...} ( locktime )
decoderawtransaction "hexstring"
decodescript "hexstring"
getrawtransaction "txid" ( verbose )
sendrawtransaction "hexstring" ( allowhighfees instantsend bypasslimits)
signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )

== Util ==
createmultisig nrequired ["key",...]
estimatefee nblocks
estimatepriority nblocks
estimatesmartfee nblocks
estimatesmartpriority nblocks
signmessagewithprivkey "privkey" "message"
validateaddress "address"
verifymessage "address" "signature" "message"

Build release candidates

Evo masternodes are set up using mn-bootstrap to enable easier deploy of platform services. In order to be able to properly test deploying with this tool on evonet and testnet, it would be great to have access to release candidate builds from Docker Hub by specifying a tag, i.e. here: https://hub.docker.com/repository/docker/dashpay/dashd

There is also an option to use https://hub.docker.com/repository/docker/dashpay/dashd-develop but these images track the develop branch and may cause problems troubleshooting RC builds on testnet.

Auto-update this repo to new dashd version

In the past, this repo was slow to be updated and is done manually. This seems both inefficient and leads to delays in propagation of the different installation options on new releases.

Looks like it can all be wrapped up into an AWS lambda function that gets called by a Github deploy Webhook.

The deploy webhook for www.github.com/dashpay/dash would trigger an AWS lambda function which would update this repo.

Here's a link to a gist which covers most of what needs to be done as well as a blog post that goes into further details.

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.