We put our best effort into covering all topics related to Dimecoin. Each section will cover a different category. Not all documentation may be 100% accurate, if you spot an error, please report it or submit a PR request on GitHub.
REMINDER: This documentation is always evolving. If you have not been here for a while, perhaps check again. Things may have been added or updated since your last visit!
Mining RPCs#
GetBlockTemplate#
The getblocktemplate
RPC gets a block template or proposal for use with mining software. For more
information, please see the following resources:
Parameter #1—a JSON request object
Name |
Type |
Presence |
Description |
---|---|---|---|
Request |
object |
Optional |
A JSON request object |
→ |
string |
Optional |
This must be set to \template” or omitted” |
→ |
array (string) |
Optional |
A list of strings |
→ → |
string |
Optional |
Client side supported feature, |
→ |
array (string) |
Optional |
A list of strings |
→ → |
string |
Optional |
Client side supported softfork deployment, |
Result—block template
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
A object containing a block template |
→ |
array (string) |
Required |
The client side supported features |
→ → |
string |
Optional |
A client side supported feature |
→ |
number (int) |
Required |
The block version |
→ |
array (string) |
Required |
The specific block rules that are to be enforced |
→ → |
string |
Optional |
A specific block rule to be enforced |
→ |
object |
Required |
Contains the set of pending, supported versionbit (BIP 9) softfork deployments |
→ → |
number |
Required |
The bit number the named softfork rule |
→ |
number |
Required |
The bit mask of versionbits the server requires set in submissions |
→ |
string (hex) |
Required |
The hash of current highest block |
→ |
array (objects) |
Optional |
Non-coinbase transactions to be included in the next block |
→ → |
object |
Optional |
Non-coinbase transaction |
→ → → |
string (hex) |
Optional |
Transaction data encoded in hex (byte-for-byte) |
→ → → |
string (hex) |
Optional |
The hash/id encoded in little-endian hex |
→ → → |
array (numbers) |
Required |
An array holding TXIDs of unconfirmed transactions this TX depends upon (parent transactions). |
→ → → → |
number |
Optional |
Transactions before this one (by 1-based index in |
→ → → |
number |
Required |
The difference in value between transaction inputs and outputs (in dimecoins). For coinbase transactions, this is a negative number of the total collected block fees (ie., not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn’t one |
→ → → |
number |
Required |
Total SigOps. If not present, the count is unknown (clients MUST NOT assume there aren’t any) |
→ |
object |
Required |
A object containing data that should be included in the coinbase scriptSig content |
→ |
number |
Required |
The maximum allowable input to coinbase transaction, including the generation award and transaction fees (in dimecoins) |
→ |
number |
Required |
Version identifier that represents the current state of the blockchain as seen by the node. |
→ |
string |
Required |
The hash target |
→ |
number |
Required |
The minimum timestamp appropriate for next block time in seconds since epoch |
→ |
array (string) |
Required |
The list of ways the block template may be changed |
→ → |
string |
Required |
A way the block template may be changed, e.g. ‘time’, ‘transactions’, ‘prevblock’ |
→ |
string |
Required |
A range of valid nonces |
→ |
number |
Required |
The limit of sigops in blocks |
→ |
number |
Required |
The limit of block size |
→ |
number |
Required |
The current timestamp in seconds since epoch |
→ |
string |
Required |
The compressed target of next block |
→ |
string |
Required |
The compressed target of the current highest block |
→ |
number |
Required |
The height of the next block |
→ |
array (objects) |
Required |
Required masternode payments that must be included in the next block |
→ → |
object |
Optional |
Object containing a masternode payee’s information |
→ → → |
string |
Required |
Payee address |
→ → → |
string |
Required |
Payee scriptPubKey |
→ → → |
number |
Required |
Required amount to pay |
→ |
boolean |
Required |
True if masternode payments started |
→ |
boolean |
Required |
True if masternode payments enforced |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli -mainnet getblocktemplate
Result:
{
"capabilities": [
"proposal"
],
"version": 536870912,
"rules": [
],
"vbavailable": {
},
"vbrequired": 0,
"previousblockhash": "00000000000a042c4806b6cae473b2c07afcf572b5906b2911c9deb6ae95fb3c",
"transactions": [
],
"coinbaseaux": {
"flags": ""
},
"coinbasevalue": 1355700000,
"longpollid": "00000000000a042c4806b6cae473b2c07afcf572b5906b2911c9deb6ae95fb3c5782997",
"target": "00000000000f3f86000000000000000000000000000000000000000000000000",
"mintime": 1709932218,
"mutable": [
"time",
"transactions",
"prevblock"
],
"noncerange": "00000000ffffffff",
"sigoplimit": 20000,
"sizelimit": 1000000,
"curtime": 1709932679,
"bits": "1b0f3f86",
"height": 5782847,
"masternode": [
{
"payee": "7BBVpSS7roduwe2ruiRLS1MGHG51ePikpu",
"script": "76a91458f93f060d23eca36d8a5b30a3961d7262fc16e088ac",
"amount": 610065000
}
],
"masternode_payments_started": false,
"masternode_payments_enforced": false
}
See also
GetMiningInfo: returns various mining-related information.
SubmitBlock: accepts a block, verifies it is a valid addition to the blockchain, and broadcasts it to the network. Extra parameters are ignored by Dimecoin Core but may be used by mining pools or other programs.
PrioritiseTransaction: adds virtual priority or fee to a transaction, allowing it to be accepted into blocks mined by this node (or miners which use this node) with a lower priority or fee. (It can also remove virtual priority or fee, requiring the transaction have a higher priority or fee to be accepted into a locally-mined block.)
GetMiningInfo#
The getmininginfo
RPC returns various mining-related information.
Parameters: none
Result—various mining-related information
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
Various mining-related information |
→ |
number (int) |
Required |
The height of the highest block on the local best blockchain |
→ |
number (int) |
Optional |
If generation was enabled since the last time this node was restarted, this is the size in bytes of the last block built by this node for header hash checking. |
→ |
number (int) |
Optional |
If generation was enabled since the last time this node was restarted, this is the number of transactions in the last block built by this node for header hash checking. |
→ |
number (real) |
Required |
If generation was enabled since the last time this node was restarted, this is the difficulty of the highest-height block in the local best blockchain. Otherwise, this is the value |
→ |
number (int) |
Required |
An estimate of the number of hashes per second the network is generating to maintain the current difficulty. See the |
→ |
number (int) |
Required |
The number of transactions in the memory pool |
→ |
string |
Required |
Set to |
→ |
string |
Required |
Any network or blockchain warnings |
→ |
string |
Optional |
Only shown when dimecoind is started with |
Example from Dimecoin Core 2.3.0.0
dimecoin-cli getmininginfo
Result:
{
"blocks": 5782848,
"currentblockweight": 4000,
"currentblocktx": 0,
"difficulty": {
"proof-of-work": 3234.210187053827,
"proof-of-stake": 201952203.5483864
},
"networkhashps": 435726190377064.9,
"pooledtx": 0,
"chain": "main",
"warnings": ""
}
See also
GetMemPoolInfo: returns information about the node’s current transaction memory pool.
GetRawMemPool: returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object.
GetBlockTemplate: gets a block template or proposal for use with mining software.
GetNetworkHashPS#
The getnetworkhashps
RPC returns the estimated network hashes per second based on the last n blocks.
Parameter #1—number of blocks to average
Name |
Type |
Presence |
Description |
---|---|---|---|
|
number (int) |
Optional |
The number of blocks to average together for calculating the estimated hashes per second. Default is |
Parameter #2—block height
Name |
Type |
Presence |
Description |
---|---|---|---|
|
number (int) |
Optional |
The height of the last block to use for calculating the average. Defaults to |
Result—estimated hashes per second
Name |
Type |
Presence |
Description |
---|---|---|---|
|
number (int) |
Required |
The estimated number of hashes per second based on the parameters provided. May be 0 (for Height= |
Example from Dimecoin Core 2.3.0.0
Get the average hashes per second for all the blocks since the last difficulty change before block 4000.
dimecoin-cli -mainnet getnetworkhashps -1 4000
Result:
938189.1678726483
See also
GetDifficulty: returns the proof-of-work and proof-of-stake difficulties as a multiple of the minimum difficulty.
GetBlock: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
PrioritiseTransaction#
The prioritisetransaction
RPC adds virtual priority or fee to a transaction, allowing it to be accepted into blocks mined by this node (or miners which use this node) with a lower priority or fee. (It can also remove virtual priority or fee, requiring the transaction have a higher priority or fee to be accepted into a locally-mined block.)
Parameter #1—the TXID of the transaction to modify
Name |
Type |
Presence |
Description |
---|---|---|---|
TXID |
string |
Required |
The TXID of the transaction whose virtual priority or fee you want to modify, encoded as hex in RPC byte order |
Parameter #2—the change to make to the virtual fee
Name |
Type |
Presence |
Description |
---|---|---|---|
Fee |
number (int) |
Required |
Warning: this value is in mDIME, not DIME |
Result—true
if the priority is changed
Name |
Type |
Presence |
Description |
---|---|---|---|
|
bool (true only) |
Required |
Always set to |
See also
GetRawMemPool: returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object.
GetBlockTemplate: gets a block template or proposal for use with mining software.
SubmitBlock#
The submitblock
RPC accepts a block, verifies it is a valid addition to the blockchain, and broadcasts it to the network. Extra parameters are ignored by Dimecoin Core but may be used by mining pools or other programs.
Parameter #1—the new block in serialized block format as hex
Name |
Type |
Presence |
Description |
---|---|---|---|
Block |
string (hex) |
Required |
The full block to submit in serialized block format as hex |
Parameter #2—dummy value
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Optional |
A dummy value for compatibility with BIP22. This value is ignored. |
Result—null
or error string
Name |
Type |
Presence |
Description |
---|---|---|---|
|
null/string |
Required |
If the block submission succeeded, set to JSON |
Example from Dimecoin Core 2.3.0.0
Submit the following block with the a dummy value, “test”.
dimecoin-cli -mainnet submitblock 01000000010000000000000000000000000000000000000\
000000000000000000000000000ffffffff2103423d58047a81eb650881008e81806400005468\
65426565506f6f6c2e636f6d00000000000208ddce00000000001976a914b153550dd81025c35\
42d95d0a744ccb2408d809488ac187aff4f000000001976a91446cb8dd813962ea615d115a445\
5d23179fe7c80688ac00000000\
"test"
Result (the block above was already on a copy of the local chain):
duplicate
See also
GetBlockTemplate: gets a block template or proposal for use with mining software.