ubantu16.04
狗狗币节点服务器下载地址
https://github.com/dogecoin/dogecoin/releases
下载到Download文件夹中,将压缩包解压
1、mkdir ~/.dogecoin
2、vim ~/.dogecoin/dogecoin.conf
#将以下内容添加到配置文件中
server=1
rpcuser=username
rpcpassword=password
rpcport=×××× #rpc端口号
rpcthreads=64 #线程数
txindex=1
#reindex-chainstate=1
daemon=1
rpcallowip=::/0
在dogecoin-1.10.0/bin目录下输入: ./dogecoind #会提示服务已开启
1、./dogecoin-cli help #查询都有那些命令
2、./dogecoin-cli getinfo #查询区块链节点同步信息
3、./dogecoin-cli getblockhash
例如:
$~./dogecoin-cli getblockhash 500000
$~
92ae1083b7b3c22fd7b4ce2eae121d518f8e1aa81d0be9432ce5aa20a2954fcc
4、./dogecoin-cli getblock <上面命令的结果 > #获取某个区块的信息
例如:
$~./dogecoin-cli getblock 92ae1083b7b3c22fd7b4ce2eae121d518f8e1aa81d0be9432ce5aa20a2954fcc
$~
{
"hash" : "92ae1083b7b3c22fd7b4ce2eae121d518f8e1aa81d0be9432ce5aa20a2954fcc",
"confirmations" : 1926208,
"size" : 5295,
"height" : 500000,
"version" : 6422786,
"merkleroot" : "f4d89871b12fae9b69bb6d7ebbdecbf3047a490f0e608b113c279193cd5cdd57",
"tx" : [
"343d2151fcb81f5d072b27cddf5ab4bcece2bc02d51fb21623769098d732dcc4",
"771672edf80ad0d72e1576f4a5fdd20ce09885a542aeea22743ee36716dadbfe",
"a1293bca7902c98c44a2c55382d517d9cdbbb5ff8e7420db081fd2f4689899d2",
"a49167c0f82c99f7c84b2ae04ef386dad081e6be9a83f500da16bddd16ea30fe",
"30532708127cd0b1e3a2ad4f7e0945f868dd0ed907e776bc6e4808f0fa4b0528",
"355172bcc2656092c749bf4c73204f97ab0ca3f505c127aa7082f80d3a2602a3",
"d4f9f68fc98b0cfd3c992768679d9fde080aa3b6ef06de3b2fa5238f38740a88",
"9ace1001748d120d7359ebe6571dc96af8366d8f6130dda9a6b755e7d4faf944",
"2e6ad1b83c42519b5a6173463ea8df606b5d1220126c311a4f06eef3eb7f04c9",
"5593937f0faf5a1071c6e31e0ef592b56c0695868d4c11fc4190b74a13ba8cc6",
"504bfe5cc3a72d6f46f020c7695985815b8125f82f6728812d4847d74f2b62da",
"532a0ee998f1490e652b52a728b39138589cff655099120d794e8d983af03e44",
"9adca50a4123ff5f8a005afb33641e333e33bcb25605b2c0798c75e387e7514a"
],
"time" : 1418570422,
"nonce" : 0,
"bits" : "1b04f203",
"difficulty" : 13251.82046227,
"chainwork" : "00000000000000000000000000000000000000000000000086ab79c4c61e8a63",
"auxpow" : {
"tx" : {
"hex" : "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff5e03a9970a062f503253482f04b8aa8d5408fabe6d6d92ae1083b7b3c22fd7b4ce2eae121d518f8e1aa81d0be9432ce5aa20a2954fcc0100000000000000402a29636829010018393436383834322f6d696e65722073686172705f66697265000000000100f2052a010000001976a9146a2ca895057c3b94136c8776e731cece18b46c8688ac00000000",
"txid" : "b29b0d546b967e06aa01c74d03e91865c16af9534895ba915df9b4f1f12c0dcc",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"coinbase" : "03a9970a062f503253482f04b8aa8d5408fabe6d6d92ae1083b7b3c22fd7b4ce2eae121d518f8e1aa81d0be9432ce5aa20a2954fcc0100000000000000402a29636829010018393436383834322f6d696e65722073686172705f66697265",
"sequence" : 0
}
],
"vout" : [
{
"value" : 50.00000000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 6a2ca895057c3b94136c8776e731cece18b46c86 OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "76a9146a2ca895057c3b94136c8776e731cece18b46c8688ac",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"DEpVfXBEq8Q1xp1Qbtuwd6CT5WNY6MXNg4"
]
}
}
],
"blockhash" : "040290bc699f9cc500b676c9a782b2cd398524d6279079b3b59a74069396f816"
},
"index" : 0,
"chainindex" : 0,
"merklebranch" : [
"471572336dcb374399bcae8a989ef7cf4a25f559bba41fa02442cde63f7ffeed",
"16d212ab7d45700b4df87538f0879adf8149c56040b68e501e0636e4cb237841"
],
"chainmerklebranch" : [
],
"parentblock" : "02000000f7e6f6aff383b6e2bb1d7968ccca5b6ceeaeda130879b50f09f29982431e26afbefd1c78ab2711ebd12d4c6c6e54e3ddab8cf2d860283a6ca7452f9865d32c9c6daa8d54e12a011b57975dc9"
},
"previousblockhash" : "3740d4391f70c688468be03661fc7ee184f648f1931299936ed8b7bc97b19d1b",
"nextblockhash" : "f46d9def3b8ddbd031db6bddc27a92de510a804c79c27fc3bc1a1cb99d33f3d4"
}
5、./dogecoin-cli getrawtransaction
例如:
$~ ./dogecoin-cli getrawtransaction 343d2151fcb81f5d072b27cddf5ab4bcece2bc02d51fb21623769098d732dcc4(tx) 1
$~
{
"hex" : "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0d0320a1070101062f503253482fffffffff0100da95316c010000232103255a3c1a33df6d47dc805d92d92ee7cad389da0a27288a27e608abc630409136ac00000000",
"txid" : "343d2151fcb81f5d072b27cddf5ab4bcece2bc02d51fb21623769098d732dcc4",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"coinbase" : "0320a1070101062f503253482f",
"sequence" : 4294967295
}
],
"vout" : [
{
"value" : 15642.00000000,
"n" : 0,
"scriptPubKey" : {
"asm" : "03255a3c1a33df6d47dc805d92d92ee7cad389da0a27288a27e608abc630409136 OP_CHECKSIG",
"hex" : "2103255a3c1a33df6d47dc805d92d92ee7cad389da0a27288a27e608abc630409136ac",
"reqSigs" : 1,
"type" : "pubkey",
"addresses" : [
"D973fXygkFhWjgpJaQUjsfEuw463JZpfhz"
]
}
}
],
"blockhash" : "92ae1083b7b3c22fd7b4ce2eae121d518f8e1aa81d0be9432ce5aa20a2954fcc",
"confirmations" : 1926211,
"time" : 1418570422,
"blocktime" : 1418570422
}